Hello everyone !
I’ve followed the documentation Push Notifications - Firebase | Capacitor Documentation
to set up firebase for android and ios. Everything run smoothly on Android.
On iOS :
-
If I deploy directly on my dev iphone or simulator from XCode, I’ve got the following error
11.7.0 - [FirebaseMessaging][I-FCM012002] Error in application:didFailToRegisterForRemoteNotificationsWithError: no valid « aps-environment » authorisation detected for the application
-
Once build and set to Tesflight, I’ve got a different error (visible by accessing the logs from the “Console” application) :
11.7.0 - [FirebaseMessaging][I-FCM023014] Error while reading embedded mobileprovision Error Domain=NSCocoaErrorDomain Code=260 “The file “embedded.mobileprovision” couldn’t be opened because there is no such file.” UserInfo={NSFilePath=/private/var/containers/Bundle/Application/[…]/App.app/embedded.mobileprovision, NSURL=file:///private/var/containers/Bundle/Application/[…]/App.app/embedded.mobileprovision, NSUnderlyingError=0x303fb2a60 {Error Domain=NSPOSIXErrorDomain Code=2 “No such file or directory”}}
I’m still struggling with this issue.
Everything now works perfectly (I recevie push notifications) when app is launched from XCode, but when downloaded from Testflight I still gett the following error :
11.7.0 - [FirebaseMessaging][I-FCM023014] Error while reading embedded mobileprovision Error Domain=NSCocoaErrorDomain Code=260 “The file “embedded.mobileprovision” couldn’t be opened because there is no such file.” UserInfo={NSFilePath=/private/var/containers/Bundle/Application/[…]/App.app/embedded.mobileprovision, NSURL=file:///private/var/containers/Bundle/Application/[…]/App.app/embedded.mobileprovision, NSUnderlyingError=0x303fb2a60 {Error Domain=NSPOSIXErrorDomain Code=2 “No such file or directory”}}
If I explore the Archive sent to the AppleStore through my Organizer view, I see that the embededed.mobileprovision file is present in the archive at the expected location.
Don’t know if this is related, but the first time I lauch the app after a testlight install it says
- AMFI: constraint violation /private/var/containers/Bundle/Application/33C78E99-2448-4266-9A26-13322F1F0038/App.app/Frameworks/FirebaseCore.framework/FirebaseCore has entitlements but is not a main binary
Again, everything runs smoothly if I launch the app from Xcode to my iphone directly, issues only occur in production environment