Error: “The sandbox is not in sync with the Podfile.lock…” after installing RestKit with cocoapods

后端 未结 30 2225
小蘑菇
小蘑菇 2020-11-27 10:12

I\'ve encounter an strange issue after installing RestKit with cocoapods. after resolving RestKit dependency for my project with cocoapods and trying to build it, I face thi

相关标签:
30条回答
  • 2020-11-27 10:15

    When you do

    pod install --verbose
    

    make sure:

    1- you are in the correct directory. Most times, when a github project is downloaded, there will be a master folder. You need to be inside the actual project name folder(masterfolder/project folder) in the terminal before you invoke pod install --verbose

    2- Delete the old pod lock folder then clean the project using xcode clean & do pod install.

    3- Keep your rvm updated.

    0 讨论(0)
  • 2020-11-27 10:16

    After changing target name

    My problem was xcconfig with old target names.

    • Went to project file -> info -> configuration
    • Removed old xcconfig (both Debug & Release)
    • pod install

    It would update to new ones.

    Also if you had missing .h files that's the reason (pods header search path is in these xcconfig)

    0 讨论(0)
  • 2020-11-27 10:20

    In my case, I got same error after integrating WatchKit app. To solve problem I needed to add both targets of WatchKit in Podfile:

    target 'MyProject WatchKit App' do
        platform :watchos, '2.0'
        shared_pods
    end
    
    target 'MyProject WatchKit App Extension' do
        platform :watchos, '2.0'
        shared_pods
    end
    

    PS: Maybe this happened for me because I mistakenly installed pods for MyProject WatchKit App target initially.

    0 讨论(0)
  • 2020-11-27 10:20

    The steps that worked for me (XCode 8.3.3/XCode 9 beta with a Swift 3.1 project)

     - Navigate to your project directory
     - pod install //which then asks you to do the next step
     - pod repo update //takes a while to update the repo
     - pod update
     - pod install
     - Close Xcode session
     - Open and Clean the project
     - Build/Run
    

    Also make sure you open the .xcworkspace file rather than the project file (.xcodeproj) when working with pods. That should solve any errors with linking such as "Apple Mach -O Linker command failed"

    0 讨论(0)
  • 2020-11-27 10:20

    I had same error. First I update cocoapods using

    sudo gem install cocoapods
    

    then install pods using Pod install command worked for me.

    0 讨论(0)
  • 2020-11-27 10:20

    Fixed my issue with ionic app by installing cordova version 9, tried all above solution mostly linked with xcode neither worked for my ionic app

    If anyone facing same issue with their cordova app kindly update to cordova 9 to fix this

    0 讨论(0)
提交回复
热议问题