"This bundle is invalid. The bundle at path [path] has an invalid CFBundleIdentifier..."

"This bundle is invalid. The bundle at path [path] has an invalid CFBundleIdentifier 'com.gdnative.framework.libwebrtc_native.ios.release.arm64' There are invalid characters (characters that are not dots, hyphen, and alphanumerics) that have been replaced with their code point 'com.gdnative.framework.libwebrtc_native.ios.release.arm64' ".

This is framework that has been added before running and/or archiving. I am able to build and run on a device as well as archive the project but cannot distribute the app to the store. When I change the name of the framework to remove the "_" (which is what I believe the issue is), the app will not run on a build device and will not archive.

Any ideas on what I should do? Any feedback or suggestions is greatly appreciated.

Accepted Reply

Shorten the string to com.gdnative.webrtc-lib clean the build before next build

Replies

Shorten the string to com.gdnative.webrtc-lib clean the build before next build

To start, the underscore is definitely a problem. As the error message says, bundle identifiers are limited to alphanumeric, dot, and hyphen.

As to why your program fails after removing that, it’s hard to say without more insight into the symptoms.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Is there a reason that Swift Package Manager generated libraries would have recently started triggering this error for target names that include underscores?

See https://github.com/firebase/firebase-ios-sdk/issues/9912

Is there a reason that Swift Package Manager generated libraries would have recently started triggering this error for target names that include underscores?

No idea. If you can reproduce that with a small test package, I encourage you to file a bug against SwiftPM because, as I said above, underscores are definitely not allowed in bundle IDs.

Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"