J'essaie d'ajouter Firebase à mon projet. Je viens d'ajouter des pods ci-dessous dans mon projet Xcode.
pod 'Firebase'
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'Firebase/Database'
pod 'Firebase/Auth'
Après avoir installé le podfile, j'essaie d'importer Firebase dans mon projet. Mais cela me donne une erreur que Firebase.h est introuvable.
Le problème ci-dessus se produira lorsque je décocherai le Run script only when installing
de [CP] Check pods Manifest.lock
. Après cela, j'installerai pod en utilisant pod install
. Et puis le problème se produira.
Erreur que j'ai eue après avoir décoché la case:
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
J'ai la même erreur lorsque j'exécute, en ligne de commande, "cordova build ios --release --device" et je suis sûr que la compilation utilise le fichier .xcworkspace. Quand je construis le projet à partir de xCode fonctionne bien.
version Cordova: 8.0.0 et 9.0.0 Ionic: 1.0.0 cordova-Android: ^ 8.1.0 cordova- ios: ^ 5.1.1
Ceci est le journal ...
Checking config.xml for pods.
No new pods detects
Reading build config file: /mobile/build.json
Building project: /mobile/platforms/ios/MyProject.xcworkspace
Configuration: Release
Platform: device
Target:
Adding xcodebuildArg: -UseModernBuildSystem=0
Running command: xcodebuild -workspace MyProject.xcworkspace -scheme MyProject -configuration Release -destination generic/platform=iOS -archivePath MyProject.xcarchive archive CONFIGURATION_BUILD_DIR=/mobile/platforms/ios/build/device SHARED_PRECOMPS_DIR=/mobile/platforms/ios/build/sharedpch -UseModernBuildSystem=0
User defaults from command line:
IDEArchivePathOverride = /mobile/platforms/ios/MyProject.xcarchive
UseModernBuildSystem = 0
Build settings from command line:
CONFIGURATION_BUILD_DIR = /mobile/platforms/ios/build/device
SHARED_PRECOMPS_DIR = /mobile/platforms/ios/build/sharedpch
Prepare build
note: Using legacy build system
...
/mobile/platforms/ios/MyProject/Plugins/cordova-plugin-fcm-with-dependecy-updated/FCMPlugin.m:7:9: fatal error:
'Firebase.h' file not found
#import "Firebase.h"
^~~~~~~~~~~~
1 error generated.
** ARCHIVE FAILED **
The following build commands failed:
CompileC /Users/myUser/Library/Developer/Xcode/DerivedData/MyProject-dwfxupwwzcbssmamqfftsijvblyb/Build/Intermediates.noindex/ArchiveIntermediates/MyProject/IntermediateBuildFilesPath/MyProject.build/Release-iphoneos/MyProject.build/Objects-normal/armv7/FCMPlugin.o MyProject/Plugins/cordova-plugin-fcm-with-dependecy-updated/FCMPlugin.m normal armv7 objective-c com.Apple.compilers.llvm.clang.1_0.compiler
(1 failure)
(node:8380) UnhandledPromiseRejectionWarning: Error: xcodebuild: Command failed with exit code 65
at ChildProcess.whenDone (/mobile/node_modules/cordova-common/src/superspawn.js:135:23)
at ChildProcess.emit (events.js:197:13)
at maybeClose (internal/child_process.js:984:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
(node:8380) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:8380) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.