Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specs satisfying the FirebaseInAppMessaging (= 11.2.0-beta) dependency were found, but they required a higher minimum deployment target. #895

Open
Afnan0711 opened this issue Sep 26, 2024 · 8 comments

Comments

@Afnan0711
Copy link

Afnan0711 commented Sep 26, 2024

Still facing the issue even after following the below steps?

17.0.0 works well for me, with such configuration:

"IOS_FIREBASE_SDK_VERSION": "11.2.0",
"IOS_FIREBASE_IN_APP_MESSAGING_VERSION": "11.2.0-beta",
"IOS_GOOGLE_SIGIN_VERSION": "7.0.0",
"IOS_GOOGLE_TAG_MANAGER_VERSION": "8.0.0",

and config.xml

<platform name="ios">
        <preference name="deployment-target" value="13.0" />
</platform>

Build succeeds! 🎉

And for Android builds. Could you please check that build succeed at example project? Right now I got this:

Execution failed for task ':app:checkDebugAarMetadata'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
   > 2 issues were found when checking AAR metadata:
     
       1.  Dependency 'androidx.credentials:credentials:1.2.0-rc01' requires libraries and applications that
           depend on it to compile against version 34 or later of the
           Android APIs.
     
           :app is currently compiled against android-33.
     
           Also, the maximum recommended compile SDK version for Android Gradle
           plugin 7.4.2 is 33.
     
           Recommended action: Update this project's version of the Android Gradle
           plugin to one that supports 34, then update this project to use
           compileSdkVerion of at least 34.
     
           Note that updating a library or application's compileSdkVersion (which
           allows newer APIs to be used) can be done separately from updating
           targetSdkVersion (which opts the app in to new runtime behavior) and
           minSdkVersion (which determines which devices the app can be installed
           on).
     
       2.  Dependency 'androidx.credentials:credentials-play-services-auth:1.2.0-rc01' requires libraries and applications that
           depend on it to compile against version 34 or later of the
           Android APIs.
     
           :app is currently compiled against android-33.
     
           Also, the maximum recommended compile SDK version for Android Gradle
           plugin 7.4.2 is 33.
     
           Recommended action: Update this project's version of the Android Gradle
           plugin to one that supports 34, then update this project to use
           compileSdkVerion of at least 34.
     
           Note that updating a library or application's compileSdkVersion (which
           allows newer APIs to be used) can be done separately from updating
           targetSdkVersion (which opts the app in to new runtime behavior) and
           minSdkVersion (which determines which devices the app can be installed
           on).

Originally posted by @roman-rr in #892 (comment)

@Afnan0711 Afnan0711 changed the title Thank you @dpa99c Specs satisfying the FirebaseInAppMessaging (= 11.2.0-beta) dependency were found, but they required a higher minimum deployment target. Sep 26, 2024
@dpa99c
Copy link
Owner

dpa99c commented Sep 26, 2024

@Afnan0711 please provide the console output of the build failure of the example project and if possible a zip file of the project (without node_modules)

@Afnan0711
Copy link
Author

Afnan0711 commented Sep 27, 2024

@dpa99c

image

@dpa99c
Copy link
Owner

dpa99c commented Sep 27, 2024

This screenshot doesn't tell me anything:
please provide the console output of the build failure of the example project and if possible a zip file of the project (without /node_modules, /plugins or /platforms)

@roman-rr
Copy link

roman-rr commented Sep 27, 2024

@Afnan0711

image

Set this to your cordova config.xml

<platform name="ios">
        <preference name="deployment-target" value="13.0" />
</platform>

@Afnan0711
Copy link
Author

@roman-rr - I already added this preference but I am still getting this error

@Afnan0711
Copy link
Author

FirebaseXDemo.zip
@dpa99c

@roman-rr
Copy link

roman-rr commented Sep 30, 2024

@Afnan0711

Here is your error

Cannot read properties of undefined (reading 'replace')
TypeError: Cannot read properties of undefined (reading 'replace')
    at Object.ensureEncodedAppIdInUrlSchemes (/Users/romanrr/Desktop/FirebaseXDemo/plugins/cordova-plugin-firebasex/scripts/ios/helper.js:441:47)

Something in that lines:

 ensureEncodedAppIdInUrlSchemes: function (iosPlatform){
        var googlePlist = plist.parse(fs.readFileSync(path.resolve(iosPlatform.dest), 'utf8')),
            appPlist = plist.parse(fs.readFileSync(path.resolve(iosPlatform.appPlist), 'utf8')),
            googleAppId = googlePlist["GOOGLE_APP_ID"],
            encodedAppId = 'app-'+googleAppId.replace(/:/g,'-');

        var result = ensureUrlSchemeInPlist(encodedAppId, appPlist);
        if(result.modified){
            fs.writeFileSync(path.resolve(iosPlatform.appPlist), plist.build(result.plist));
        }
    }

I assume that GoogleService-Info.plist not exist or damaged.
Be sure there is <key>GOOGLE_APP_ID</key

Additionally, you might want to set "IOS_USE_PRECOMPILED_FIRESTORE_POD": "true" to reduce your build time for x3-x5 times.

Have a nice day :)

@ajmakoni
Copy link

ajmakoni commented Oct 5, 2024

@roman-rr - I already added this preference but I am still getting this error

Hi,
For this deployment-target preference to work, you need to remove cordova ios platform by running cordova platform rm ios. Once ios platform is successfully removed, re-add ios platform by running cordova platform add ios

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants