cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Darryl Pogue (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CB-14264) The file “embedded.mobileprovision” couldn’t be opened because there is no such file.
Date Thu, 07 Feb 2019 20:00:00 GMT

     [ https://issues.apache.org/jira/browse/CB-14264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Darryl Pogue resolved CB-14264.
-------------------------------
       Resolution: Fixed
    Fix Version/s: cordova-ios@5.0.0

> The file “embedded.mobileprovision” couldn’t be opened because there is no such
file.
> -------------------------------------------------------------------------------------
>
>                 Key: CB-14264
>                 URL: https://issues.apache.org/jira/browse/CB-14264
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-ios
>            Reporter: Mark Veenstra
>            Priority: Blocker
>             Fix For: cordova-ios@5.0.0
>
>
> The widely used plugin `phonegap-plugin-push` includes the Firebase iOS SDK for push
messaging with iOS through FCM. But if you want to use a debug build which using the development
certificates it currently thows the following error:
> {code:java}
> 2018-08-09 11:05:48.622602+0200 MyApp[760:240424] 4.13.0 - [Firebase/InstanceID][I-IID003014]
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=/var/containers/Bundle/Application/F8B23BB0-4A1E-42AA-9430-47867B80827A/MyApp.app/embedded.mobileprovision,
NSUnderlyingError=0x2811b29a0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
> {code}
> This error is thrown by Firebase [here|https://github.com/firebase/firebase-ios-sdk/blob/master/Firebase/Auth/Source/FIRAuthAPNSTokenManager.m#L160].
> This is because this file is removed by the file [`copy-www-build-step.js`on line 56|https://github.com/apache/cordova-ios/blob/master/bin/templates/scripts/cordova/lib/copy-www-build-step.js#L56].
If we comment out this line, al works like a charm and we can use the debug release to test
push messages through FCM.
> If we take a look at Firebase iOS SDK it states [`If the app does not contain the embedded.mobileprovision
which is stripped out by Apple when the app is submitted to store, then it is highly likely
that it is from Apple Store.`|https://github.com/firebase/firebase-ios-sdk/blob/master/GoogleUtilities/Environment/third_party/GULAppEnvironmentUtil.m#L176].

> Which means that if `cordova-ios` removes this file as it does Firebase expects it to
be a release build, which is incorrect and the error is thrown and you will not receive a
correct FCM token for debug purposes.
> So for the moment we created a hook that comments out the removal of `embedded.mobileprovision`
after platform add. Now all works like a charm. But the main question is, should it be removed?
Or how can we make sure Firebase iOS SDK will not mark it as production without that file?




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message