Android first, already put google-services.json and selected build variant is googleDebug
it build failed
Compilation error:
> Task :app:compileGoogleDebugKotlin FAILED
e: file:///C:/Users/user/.gradle/caches/transforms-3/06a85c92cb14c9b90e73303ac62102ec/transformed/play-services-measurement-api-22.2.0-api.jar!/META-INF/java.com.google.android.gmscore.integ.client.measurement_api_measurement_api.kotlin_moduleModule was compiled with an incompatible version of Kotlin. The binary version of its metadata is 2.1.0, expected version is 1.9.0.
e: file:///C:/Users/user/.gradle/caches/transforms-3/764584a5dcaa928172e95dfbe0ffdd27/transformed/play-services-measurement-impl-22.2.0-api.jar!/META-INF/java.com.google.android.gms.libs.filecompliance.proto_file_access_api_type_kt_proto_lite.kotlin_moduleModule was compiled with an incompatible version of Kotlin. The binary version of its metadata is 2.1.0, expected version is 1.9.0.
e: file:///C:/Users/user/.gradle/caches/transforms-3/764584a5dcaa928172e95dfbe0ffdd27/transformed/play-services-measurement-impl-22.2.0-api.jar!/META-INF/third_party.kotlin.protobuf.src.commonMain.kotlin.com.google.protobuf.kotlin_only_for_use_in_proto_generated_code_its_generator_and_tests.kotlin_moduleModule was compiled with an incompatible version of Kotlin. The binary version of its metadata is 2.1.0, expected version is 1.9.0.
e: file:///C:/Users/user/.gradle/caches/transforms-3/764584a5dcaa928172e95dfbe0ffdd27/transformed/play-services-measurement-impl-22.2.0-api.jar!/META-INF/third_party.kotlin.protobuf.src.commonMain.kotlin.com.google.protobuf.kotlin_shared_runtime.kotlin_moduleModule was compiled with an incompatible version of Kotlin. The binary version of its metadata is 2.1.0, expected version is 1.9.0.
not sure, it wrong any dependencies version in build.gradle or am I doing something wrong?
Please help advice. Thank you.
investigation and finding information and gpt help.
now Build passed and run with notify to work.
from build error: kotlin incompatible version: (The binary version of its metadata is 2.1.0, expected version is 1.9.0.)
fixed to change kotlin version in build.gradle file of project from 1.9.0 to version 2.1.0
select build variant googleDebug
Rebuild Project again and try to run app on Emulator
Test send Notify from web app
Next Xcode for iOS. I will try to do and share again.
thanks.
For iOS app
we have created iOS app in Firebase project
and created APNs key
in Xcode project we have put GoogleService-Info.plist file in project and edit script in AppDelegate to comment code #if FIREBASE
start run (Simulator) app alert to Allow Notify
We already allowed Notify and then send Test Message on web app, for Android devices it works, received a notify, but iOS still doesn't work. no any notify in device.
Not sure if I did something wrong?
Look at log file. found response error when send notify.
WARN: Firebase user 8 error - 401 Unauthorized
POST https://fcm.googleapis.com/v1/projects/marstian-XXXXf/messages:send
{
"error": {
"code": 401,
"message": "Auth error from APNS or Web Push Service",
"status": "UNAUTHENTICATED",
"details": [
{
"@type": "type.googleapis.com/google.firebase.fcm.v1.FcmError",
"errorCode": "THIRD_PARTY_AUTH_ERROR"
},
{
"@type": "type.googleapis.com/google.firebase.fcm.v1.ApnsError",
"statusCode": 403,
"reason": "InvalidProviderToken"
}
]
}
}
- HttpResponseException (...)
Has anyone ever encountered an error like this? Please give me some advice.
Have you uploaded your APNs key to the Firebase project?
Hello Anton,
yes, we already uploaded .p8 file into Firebase iOS app
uploaded to Firebase iOS app
rechecked, the keys are all matched.
try again, but still don't work.
Hi,
After several days of trying, now was finally able to send a notification to iOS and Android custom app.
to fixed this case error - 401 Unauthorized when Firebase send notify to Apple push notification service. (APNs)
We tried generating a new APNs key and revoke the previous key in Apple developer account and then delete and upload new APNs Key in Firebase cloud messaging again.
Hi,
We have custom mobile app from traccar-manager-app iOS & Android and need to implement Push notify also
we have create Firebase project and download google-services.json into Android project and GoogleService-Info.plist into Xcode project
for Android to add plugins and dependencies in build.gradle file

for Xcode after put GoogleService-Info.plist and then to enable this script on AppDelegate.swift right?

Is this all we need to do? can we start build the project right away?