Thursday, February 7, 2019

The sandbox is not in sync with the Podfile.lock in ionic


In my case, I was building an ionic project. This error comes when I try to run the project in iSO. I spend much time to resolve this issue, Some say we can run pod update OR pod install command to resolve this issue. But noting work in my case. Finally, I found the solution for this. This is very simple. Just follow the below steps to resolve the issue -    

1. First Quit your Xcode.
2. Now move in iOS platform folder. (i.e, Project Dir/platforms/ios)
3. Delete Pods folder from here.
4. Delete Podfile.lock from here.
5. Now open ios platform in the terminal and run "pod install" command in terminal. Make sure to run this command without admin (without sudo).
6. Now open your project in Xcode. Note - Open project via .xcworkspace file.

Now build and run the project, If that does not work follow below more steps - 

7. In Xcode, From navigation go to root node and from the Xcode on the right choose 'Build Settings' option.  Check more information in below image -




8. Now scroll down and there should be following entries - PODS_PODFILE_DIR_PATH and PODS_ROOT. If this available please correct the entry and if not available please add the entry by using below details - 


8.1 Click on the plus (+) icon to add the entry and select "Add user-defined settings". Check below image -




8.2 Add "PODS_PODFILE_DIR_PATH" and for both Debug and Release add "${SRCROOT}/." entry.
8.3 Now again add "PODS_ROOT" and for both Debug and Release add "${SRCROOT}/Pods" entry.

After adding the above details it will look like this -





Now try to build your project. It will build successfully. If still, you are facing any issue please post your error in the comment section. I will try to resolve this issue.

7 comments:

  1. It worked...Very useful..Thanks

    ReplyDelete
  2. Showing Recent Messages
    :-1: /Users/mac/Desktop/ionic-capacitor-app/ios/App/Pods/Target Support Files/Pods-App/Pods-App.debug.xcconfig: unable to open file (in target "App" in project "App") (in target 'App')

    ReplyDelete
    Replies
    1. Can you try to update your pod file. Make sure to run pod file without sudo.

      Delete
  3. " Module 'FirebaseInstanceID' not found" :(

    ReplyDelete
  4. I followed your mentioned steps. No luck. I am getting the error Firebase.h file not found. Please help.

    ReplyDelete
  5. This worked for me, now I have this error:

    The following build commands failed:
    CompileC /var/root/Library/Developer/Xcode/DerivedData/-/Build/Intermediates.noindex/\.build/Debug-iphonesimulator/Heathen\ Mingle.build/Objects-normal/x86_64/FirebaseAnalyticsPlugin.o /Users/anonymous/project//platforms/ios/Heathen\ Mingle/Plugins/cordova-plugin-firebase-analytics/FirebaseAnalyticsPlugin.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    (1 failure)
    xcodebuild: Command failed with exit code 65

    ReplyDelete