We are developing an iOS application using Firebase Messaging. Everything runs smoothly when launching the application from Xcode to a dev iPhone (we can get an FCM token and receive push notifications from server). Unfortunately, we get an AMFI warning when installing the signed application from Testflight :
AMFI: constraint violation /private/var/containers/Bundle/Application/[...]/App.app/Frameworks/FirebaseCore.framework/FirebaseCore has entitlements but is not a main binary
The application does not crash, but Firebase library is not working. When trying to get an FCM token, we get the following exception
11.9.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=0x3007cde00 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
I went to XCode > Organizer and inspected the Archive with the following commands, I'm not expert but everything seems correctly configured :
codesign -d --entitlements - /Users/ME/Library/Developer/Xcode/Archives/2025-03-19/App\ 19-03-2025,\ 16.05.xcarchive/Products/Applications/App.app
returns :
[Dict]
[Key] application-identifier
[Value]
[String] CORRECT-APP-ID
[Key] aps-environment
[Value]
[String] production
[Key] beta-reports-active
[Value]
[Bool] true
[Key] com.apple.developer.team-identifier
[Value]
[String] CORRECT-TEAM-ID
[Key] get-task-allow
[Value]
[Bool] false
And
security cms -D -i /Users/ME/Library/Developer/Xcode/Archives/2025-03-19/App\ 19-03-2025,\ 16.05.xcarchive/Products/Applications/App.app/embedded.mobileprovision
returns
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" ".0.dtd">
<plist version="1.0">
<dict>
<key>AppIDName</key>
<string>MASQUED</string>
<key>ApplicationIdentifierPrefix</key>
<array>
<string>MASQUED</string>
</array>
<key>CreationDate</key>
<date>MASQUED</date>
<key>Platform</key>
<array>
<string>iOS</string>
<string>xrOS</string>
<string>visionOS</string>
</array>
<key>IsXcodeManaged</key>
<false/>
<key>DeveloperCertificates</key>
<array>
<data>MASQUED</data>
</array>
<key>DER-Encoded-Profile</key>
<data>MASQUED</data>
<key>PPQCheck</key>
<false/>
<key>Entitlements</key>
<dict>
<key>beta-reports-active</key>
<true/>
<key>aps-environment</key>
<string>production</string>
<key>application-identifier</key>
<string>MASQUED</string>
<key>keychain-access-groups</key>
<array>
<string>TEAMDID.*</string>
<string>com.apple.token</string>
</array>
<key>get-task-allow</key>
<false/>
<key>com.apple.developer.team-identifier</key>
<string>TEAMID</string>
</dict>
<key>ExpirationDate</key>
<date>2026-02-24T13:12:15Z</date>
<key>Name</key>
<string>My Provisioning profile</string>
<key>TeamIdentifier</key>
<array>
<string>TEAM-ID</string>
</array>
<key>TeamName</key>
<string>TEAM-NAME</string>
<key>TimeToLive</key>
<integer>364</integer>
<key>UUID</key>
<string>MASQUED</string>
<key>Version</key>
<integer>1</integer>
</dict>
</plist>
Can anyone help ? We've been struggling with this and do not see what we are doing wrong.
We've followed religiously this guide : and think our configuration is valid.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744834198a4596165.html
评论列表(0条)