dpa99c / cordova-plugin-firebasex-test

A Cordova app project to test cordova-plugin-firebasex
38 stars 50 forks source link

Failing build from fresh clone #14

Closed eduardoewgo closed 1 year ago

eduardoewgo commented 3 years ago

Environment

Script

git clone https://github.com/dpa99c/cordova-plugin-firebasex-test.git && cd cordova-plugin-firebasex-test
npm install

cordova platform add ios
cordova run ios

Output running cordova build ios

PhaseScriptExecution [CP]\ Copy\ Pods\ Resources /Users/eduardo/Library/Developer/Xcode/DerivedData/FirebaseTest-fgmbbyzhnpzirydwiqdcbxrrqyzp/Build/Intermediates.noindex/FirebaseTest.build/Debug-iphonesimulator/FirebaseTest.build/Script-8A672495FED87DA4CDF32A51.sh (in target 'FirebaseTest' from project 'FirebaseTest')
    cd /Users/eduardo/Documents/Code/cordova-plugin-firebasex-test/platforms/ios
    /bin/sh -c /Users/eduardo/Library/Developer/Xcode/DerivedData/FirebaseTest-fgmbbyzhnpzirydwiqdcbxrrqyzp/Build/Intermediates.noindex/FirebaseTest.build/Debug-iphonesimulator/FirebaseTest.build/Script-8A672495FED87DA4CDF32A51.sh
/Users/eduardo/Documents/Code/cordova-plugin-firebasex-test/platforms/ios/Pods/FirebaseFirestore/FirebaseFirestore/Resources/gRPCCertificates-Cpp.bundle
error: Resource "/Users/eduardo/Library/Developer/Xcode/DerivedData/FirebaseTest-fgmbbyzhnpzirydwiqdcbxrrqyzp/Build/Products/Debug-iphonesimulator/FirebaseInAppMessaging/InAppMessagingDisplayResources.bundle" not found. Run 'pod install' to update the copy resources script.

warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'GoogleSymbolUtilities' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'GoogleTagManager' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'GoogleAnalytics' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'GoogleUtilitiesLegacy' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseFirestore' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseAnalytics' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'GoogleAppMeasurement' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebasePerformance' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'GoogleSignIn' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseInstallations' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseCrashlytics' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'nanopb' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseABTesting' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'GoogleUtilities' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'GoogleDataTransport' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseMessaging' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'GTMAppAuth' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseRemoteConfig' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseInstanceID' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseCoreDiagnostics' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseCore' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseAuth' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'AppAuth' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'GoogleTagManager-TagManagerResources' from project 'Pods')
** BUILD FAILED **

The following build commands failed:
    PhaseScriptExecution [CP]\ Copy\ Pods\ Resources /Users/eduardo/Library/Developer/Xcode/DerivedData/FirebaseTest-fgmbbyzhnpzirydwiqdcbxrrqyzp/Build/Intermediates.noindex/FirebaseTest.build/Debug-iphonesimulator/FirebaseTest.build/Script-8A672495FED87DA4CDF32A51.sh
(1 failure)
xcodebuild: Command failed with exit code 65

Output trying to build through xcode

Could not build module Firebase
FirebaseCore/FirebaseCore.h' file not found

Pods

I also tried going into the plugins folder and manually running pod repo update && pod install and just pod install, as suggested in the readme.

eduardoewgo commented 3 years ago

cc: @phiferd

JBtje commented 3 years ago

It took about 8 hours, but we managed to get it to work.

After adding ios as platform, add the below to the PodFile. Make sure to run pod install. You might get away with targeting lower ios or using older firebase versions, however don't go too low as Crashlitics does not exist for e.g. 6.13 (not sure since when it is available).

Using the below, we were able to build the project. However... Sending a notification from the Firebase website (the build in tool voor test messages) was not received on the iPhone (no problems on Android). Perhaps this interface doesn't work for iPhones? i have to read up on that...

platform :ios, '12.1'
use_frameworks!
target 'FirebaseTest' do
  pod 'GoogleSignIn', '5.0.0'
  pod 'Firebase/Core', '6.34.0'
  pod 'Firebase'
  pod 'Firebase/Firestore', '6.34.0'
  pod 'Firebase/Auth', '6.34.0'
  pod 'Firebase/Messaging', '6.34.0'
  pod 'Firebase/Performance', '6.34.0'
  pod 'Firebase/RemoteConfig', '6.34.0'
  pod 'Firebase/Crashlytics', '6.34.0'
end

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['DEBUG_INFORMATION_FORMAT'] = 'dwarf'
            config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
        end
    end
end

Edit: 2021-03-10 I did not uploaded the .p8 certificate file to Firebase. After uploading this file all works as expected.