PODS_ROOT and other env variables not set when compiling an Ionic application

I created an Ionic 2 application that uses Intercom (a third-party extension). An intercom is installed using cocoapods.

When compiling my application, they give me errors:

diff: /Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.

This is generated by the build phase [CP] Check Pods Manifest.lock:

diff "${PODS_PODFILE_DIR_PATH}/Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
if [ $? != 0 ] ; then
    # print error to STDERR
    echo "error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation." >&2
    exit 1
fi
# This output is used by Xcode 'outputs' to avoid re-running this script phase.
echo "SUCCESS" > "${SCRIPT_OUTPUT_FILE_0}"

I tried to bring the environment variables PODS_PODFILE_DIR_PATHand PODS_ROOTin STDERROR echofrom the script above, and both of them are empty. I can probably get around this specific error by changing these paths myself, but obviously something even more fundamental is broken, so I need to fix the actual problem.

Why are these variables empty?

[CP] Copy Pods Resources [CP] Embed Pods Frameworks, . .

Podfile.lock Podfile ( ) :

Podfile:

# DO NOT MODIFY -- auto-generated by Apache Cordova
platform :ios, '8.0'
target 'niix' do
    project 'niix.xcodeproj'
    pod 'Intercom', '~> 3.2.2'
end

Podfile.lock:

PODS:
  - Intercom (3.2.12)

DEPENDENCIES:
  - Intercom (~> 3.2.2)

SPEC CHECKSUMS:
  Intercom: 3119e8ebf76d3da425bab717a08067398fcabfe6

PODFILE CHECKSUM: f99283bb8a4e56cb037a02390d2fbc4e76c97db9

COCOAPODS: 1.3.1

pod install , , , .

, :

  • pod install ()
  • pod deintegrate, a > XCode, pod install
  • Podfile.lock Pods, XCode, pod install
  • !

:

  • project.xcworkspace project.xcodeproj
  • XCode 8.3.3
  • Cocoapods 1.3.1
+4
1

, , . Ionic 2, XCode.

XCode. .xcodeproj, .xcworkspace, . .

, Pods , , . - .

, , Cocoapods, Ionic pod install . , , pod install .

, , , iOS:

ionic cordova platform rm ios

:

ionic cordova platform add ios

:

ionic cordova run ios --device

, Cocoapods .

+2

Source: https://habr.com/ru/post/1685280/


All Articles