简体   繁体   English

离子3 - 与cocoapods的xcode错误

[英]Ionic 3 - xcode error with cocoapods

I try to build an ionic 3 app with push notification and I have some problem with iOS deployment. 我尝试使用推送通知构建离子3应用程序,我在iOS部署时遇到了一些问题。

I have this 3 error in xcode : 我在xcode中有这3个错误:

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.

I have try a lot of solution I found on internet : 我尝试了很多在互联网上找到的解决方案:

  • use command "pod install", "pod update" 使用命令“pod install”,“pod update”

  • delete and install CocoaPods 删除并安装CocoaPods

  • update CocoaPods 更新CocoaPods

  • Delete "Pods" folder, "Podfile.lock" and "Podfile" and run "pod install" command. 删除“Pods”文件夹,“Podfile.lock”和“Podfile”并运行“pod install”命令。

  • Remove libPods-myApp.a from Link Binary From Librairies. 从Link Binary From Librairies中删除libPods-myApp.a。

But nothing is effective... 但没有什么是有效的......

I really don't know what I have to do. 我真的不知道自己要做什么。

My Podfile : 我的Podfile:

# DO NOT MODIFY -- auto-generated by Apache Cordova
platform :ios, '8.0'
target 'MyProject' do
    project 'MyProject.xcodeproj'
    pod 'GoogleCloudMessaging', '~> 1.2.0'
    pod 'GGLInstanceID', '~> 1.2.1'
end

My Podfile.lock : 我的Podfile.lock:

PODS:
  - GGLInstanceID (1.2.1)
  - GoogleCloudMessaging (1.2.0):
    - GoogleInterchangeUtilities (~> 1.0)
    - GoogleIPhoneUtilities (~> 1.0)
    - GoogleSymbolUtilities (~> 1.0)
  - GoogleInterchangeUtilities (1.2.2):
    - GoogleSymbolUtilities (~> 1.1)
  - GoogleIPhoneUtilities (1.2.1):
    - GoogleSymbolUtilities (~> 1.0)
    - GoogleUtilities (~> 1.0)
  - GoogleSymbolUtilities (1.1.2)
  - GoogleUtilities (1.3.2):
    - GoogleSymbolUtilities (~> 1.1)

DEPENDENCIES:
  - GGLInstanceID (~> 1.2.1)
  - GoogleCloudMessaging (~> 1.2.0)

SPEC CHECKSUMS:
  GGLInstanceID: 4a317044f744281b82cd03015f379899f277cad3
  GoogleCloudMessaging: f37ea14dd0f41d4d889c10b5559dd35bbfd9ac26
  GoogleInterchangeUtilities: d5bc4d88d5b661ab72f9d70c58d02ca8c27ad1f7
  GoogleIPhoneUtilities: 63f25e93a3ddcb66884d182aab3a660d98f1479b
  GoogleSymbolUtilities: 631ee17048aa5e9ab133470d768ea997a5ef9b96
  GoogleUtilities: 8bbc733218aad26306f9d4a253823986110e3358

PODFILE CHECKSUM: 0ff66d442dc6f28bf0fbc7a6b12af811ecc9a43c

COCOAPODS: 1.2.1

UPDATE UPDATE

My [CP] Check Pods Manifest.lock : 我的[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

I really need help please. 我真的需要帮助。 :( :(

UPDATE UPDATE

I have modify my [CP] Check Pods Manifest.lock to this : 我修改了我的[CP] Check Pods Manifest.lock到这个:

diff "${SRCROOT}/Podfile.lock" "${SRCROOT}/Pods/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

My tree errors are disapear but I have this new error : 我的树错误消失但我有这个新错误:

 Module 'FirebaseInstanceID' not found

在此输入图像描述

I don't know why. 我不知道为什么。 I tried to run pod install but no difference. 我试图运行pod install但没有区别。

Try 尝试

pod repo update
pod install

Please check the path of the xcode project 请检查xcode项目的路径

project 'MyProject.xcodeproj' 项目'MyProject.xcodeproj'

Does your podfile and the 'MyProject.xcodeproj' are located on the same directory ? 您的podfile和“MyProject.xcodeproj”是否位于同一目录中? If so you can try removing the ligne above from your podfile 如果是这样,您可以尝试从podfile中删除上面的ligne

Open up terminal and run 打开终端并运行

pod deintegrate

This will remove all connections of pods and your project. 这将删除pod和项目的所有连接。

Then you can run 然后你就可以跑了

pod install

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM