Search code examples
firebasenativescriptfirebase-app-check

Firebase AppCheck failed to install using NativeScript


I am trying the install pod 'FirebaseAppCheck', '8.0.0-beta' in the Podfile of my NativeScript project using target iOS 14.4. However, it gives an error below

[!] CocoaPods could not find compatible versions for pod "FirebaseAppCheck": In Podfile: FirebaseAppCheck (= 8.0.0-beta)

Specs satisfying the FirebaseAppCheck (= 8.0.0-beta) dependency were found, but they required a higher minimum deployment target. 'pod install' command failed.

Is this a bug in Firebase AppCheck which requires a future iOS version, or is this an issue with NativeScript that cannot install a beta pod?


Solution

  • I found out the root cause of this issue and there are 2 parts:

    (1) In App_Resources/iOS/Podfile, add platform :ios, '11.0' This is for Cocoapods

    (2) in App_Resources/iOS/build.xcconfigh, add IPHONEOS_DEPLOYMENT_TARGET = 11.0, this is for XCode

    The app should work even after (1) is done. However, in order to be consistent with the target build, I recommend to change both.

    However, in my case, I have one more issue after fixing the 2 points above. Because AppCheck requires requires 'Firebase/Core', '~>8.0', but on the other hand, I also have @nativescript/firebase in my project, which hardcodes to use Firebase/Core ~>6.34.0. Therefore, I still cannot make the project working with AppCheck without sacrificing @nativescript/firebase.