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

CFBundleIdentifier invalid characters #9912

Closed
yutaabe200 opened this issue Jun 15, 2022 · 18 comments · Fixed by google/GoogleUtilities#83
Closed

CFBundleIdentifier invalid characters #9912

yutaabe200 opened this issue Jun 15, 2022 · 18 comments · Fixed by google/GoogleUtilities#83

Comments

@yutaabe200
Copy link

yutaabe200 commented Jun 15, 2022

Step 1: Describe your environment

Xcode version 13.3.1
Firebase SDK version: 9.1.0
Installation method: Swift Package Manager
Firebase Component: Firestore, Analytics, Auth, Storage, Messaging, Installations
Target platform(s): iOS

Step 2: Describe the problem

I get the following error when uploading to App Store connect.

This bundle is invalid. The bundle at path Payload/Test.app/Frameworks/GoogleUtilities_Environment.framework has an invalid 
CFBundleIdentifier 'GoogleUtilities_Environment' There are invalid characters(characters that are not dots, hyphen and 
alphanumerics) that have been replaced with their code point 'GoogleUtilities\u005fEnvironment' CFBundleIdentifier must be 
present, must contain only alphanumerics, dots, hyphens and must not end with a dot. [see the Core Foundation Keys at 
https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.
html#//apple_ref/doc/uid/TP40009249-102070-TPXREF105]
This bundle is invalid. The bundle at path Payload/Test.app/Frameworks/GoogleUtilities_Logger.framework has an invalid 
CFBundleIdentifier 'GoogleUtilities_Logger' There are invalid characters(characters that are not dots, hyphen and alphanumerics) 
that have been replaced with their code point 'GoogleUtilities\u005fLogger' CFBundleIdentifier must be present, must contain only 
alphanumerics, dots, hyphens and must not end with a dot. [see the Core Foundation Keys at 
https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.
html#//apple_ref/doc/uid/TP40009249-102070-TPXREF105]
@google-oss-bot
Copy link

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@paulb777
Copy link
Member

Sorry about the trouble and thanks for the report.

Please share the Xcode version being used as well.

@paulb777
Copy link
Member

Thanks. This looks like an issue between Swift Package Manager and the App Store. SPM should not generate symbols that the App Store does not allow. We may need to follow up on Apple on this one.

Another option may be to remove the underscores from the GoogleUtilities package.

@yutaabe200
Copy link
Author

@paulb777
Copy link
Member

Strange that google/GoogleSignIn-iOS#124 was first reported on April 21st, but today is only report since. Based on those stats, it seems like there may be something particular about the specific project configuration.

Does updating to Xcode 13.4.1 make a difference?

@yutaabe200
Copy link
Author

I'm having trouble with the exact same thing with Xcode 13.4.1...

@paulb777
Copy link
Member

Added a question at https://developer.apple.com/forums/thread/704934?login=true&page=1#717415022

@jackgmarch
Copy link

@paulb777 Hopefully I can reproduce the issue for a demo app soon so we can identify why this only occurs for some apps, but in the mean time it would be great if the change to remove underscores could be made on your side too, given Apple says underscores are disallowed in that thread and in the rejection reason.

@jackgmarch
Copy link

jackgmarch commented Jun 22, 2022

@paulb777 We're linking Firebase Analytics/Crashlytics to a framework target, similar to the person in this thread https://bytemeta.vip/index.php/repo/google/GoogleSignIn-iOS/issues/124 who had the issue. Fixing this on our end would require a lot of code changes, and I'm pretty sure it's a valid setup, so unfortunately probably our only realistic way out is for the underscores to be removed if this is the cause.

This issue only started occurring for us recently as we just started using Firebase as a dependency via SPM, before we used Carthage.

@paulb777
Copy link
Member

paulb777 commented Jun 22, 2022

Yep linking into a dynamic framework could explain the issue. Would you create a reproducible example and file an issue to https://github.com/apple/swift/issues/new?assignees=&labels=bug&template=bug_report.md&title= as requested at https://developer.apple.com/forums/thread/704934.

We'd like to hear a statement from Apple before making a breaking change in the Firebase support libraries.

@lugearma
Copy link

lugearma commented Jun 27, 2022

I finally was able to solve this, I was linking Firebase into a dynamic framework so I removed the framework and linked it into my app target directly.

@paulb777 paulb777 added this to the Firebase 10 milestone Jul 19, 2022
@paulb777
Copy link
Member

Marking for Firebase 10 to consider a GoogleUtilities breaking change release at the same time.

@paulb777
Copy link
Member

Punting to Firebase 11 since we no longer plan to do a GoogleUtilities breaking change in Firebase 10. GoogleUtilities will need to continue to support iOS 10 past the release of Firebase 10.

@ncooke3 ncooke3 removed their assignment Sep 21, 2022
@jasonbobier
Copy link

I am getting this error now too after switching to SPM. Is there a work around? I have multiple frameworks and app linking to Firebase, so I need to use a dynamic library.

@paulb777
Copy link
Member

Even if we updated GoogleUtilities Package.swift to work around the SPM bug, there would still be the issue that FirebaseAnalytics is distributed as a binary static framework.

@jasonbobier
Copy link

This is actually ok for me atm because FirebaseAnalytics is only being used by a single framework on our side. The issue is that other frameworks use other Firebase components (Installations, RemoteConfig, Messaging, DynamicLinks) and I assume that multiple of those are pulling in GoogleUtilities causing it to become dynamic.

@ncooke3
Copy link
Member

ncooke3 commented Sep 23, 2022

Hi everyone, we identified a fix in GoogleUtilities that should prevent this issue. We will release it in a SwiftPM-only GoogleUtilities 7.9.0 release sometime next week. I will update this bug when that happens. Thanks for your patience!

@ncooke3
Copy link
Member

ncooke3 commented Sep 26, 2022

Quick update– GoogleUtilities 7.9.0 is released and has the fix for this issue. Please reach out if it gives you any trouble.

@firebase firebase locked and limited conversation to collaborators Oct 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants