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

FBAudienceNetwork.framework has an invalid CFBundleIdentifier #2491

Open
5 tasks done
SzGajdzica opened this issue Oct 14, 2024 · 15 comments
Open
5 tasks done

FBAudienceNetwork.framework has an invalid CFBundleIdentifier #2491

SzGajdzica opened this issue Oct 14, 2024 · 15 comments

Comments

@SzGajdzica
Copy link

Checklist before submitting a bug report

Xcode version

16.0

Facebook iOS SDK version

iOS Audience Network SDK 6.15.2

Dependency Manager

SPM

SDK Framework

Other / I don't know

Goals

I want to add FBAudienceNetwork to my project

Expected results

I want to add FBAudienceNetwork to my project

Actual results

Asset validation failed
This bundle is invalid. The bundle at path Payload/my-gps-location-ios.app/Frameworks/FBAudienceNetwork.framework has an invalid CFBundleIdentifier '$(PRODUCT_BUNDLE_IDENTIFIER)' There are invalid characters(characters that are not dots, hyphen and alphanumerics) that have been replaced with their code point '\u0024\u0028PRODUCT\u005fBUNDLE\u005fIDENTIFIER\u0029' 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] (ID: 51b6234b-3664-4f70-b53d-219d14706a34)

Steps to reproduce

Add xcframework downloaded from here https://developers.facebook.com/docs/audience-network/setting-up/platform-setup/ios/add-sdk/

Code samples & details

No response

@cheebow
Copy link

cheebow commented Oct 16, 2024

I am having the same problem with iOS Audience Network SDK 6.16.0

@huangwenjing12
Copy link

Hi, have you solved this problem?

@SzGajdzica
Copy link
Author

Nope, i've made some progress with Admob mediations adapters https://groups.google.com/g/google-admob-ads-sdk/c/-7N5D2Yq1cI, but Facebook will take half a year to year to fix

@bengus
Copy link

bengus commented Dec 26, 2024

The problem is still active. Last version which is working okay is 6.15.1

@jesphinpt
Copy link

I am facing this error with 6.16.0. Any workarounds?
Screenshot-2024-12-30-at-8-18-53-PM-12-30-2024_08_20_PM
Screenshot-2024-12-30-at-8-18-59-PM-12-30-2024_08_19_PM

@huangwenjing12
Copy link

huangwenjing12 commented Jan 3, 2025 via email

@huangwenjing12
Copy link

huangwenjing12 commented Jan 3, 2025 via email

@jesphinpt
Copy link

But 6.15.1 also not solve the upload error, If I add embed and sign in the manual integration and it failing with archive. Also If I remove embed and sign, it crashing while opening the app
Screenshot 2025-01-03 at 2 48 14 PM

@huangwenjing12
Copy link

huangwenjing12 commented Jan 3, 2025 via email

@jesphinpt
Copy link

Getting duplicate error
Screenshot 2025-01-03 at 3 15 20 PM

@huangwenjing12
Copy link

huangwenjing12 commented Jan 3, 2025 via email

@jesphinpt
Copy link

Did you add the xcframework in the Embed Frameworks?

I have added in the Embed Frameworks

Also If I add in the Copy files it shows the duplicate error.

@huangwenjing12
Copy link

huangwenjing12 commented Jan 3, 2025 via email

@kvenn
Copy link

kvenn commented Jan 15, 2025

I'm also having this issue. I added the project through the Package.swift file. It works and builds fine locally, but fails when deploying to the app store.

Package.swift

let package = Package(
    name: "...",
    platforms: [.macOS(.v12), .iOS(.v15)],
    products: [
        ...
    ],
    dependencies: [
		....
    ],
    targets: [
        .target(
            name: "..",
            dependencies: [
				...
            ]
        ),
        .target(
            name: "..",
            dependencies: [
                // Ads - Mintegral
                .product(name: "MintegralAdSDK", package: "MintegralAdSDK-Swift-Package"),
                .target(name: "MintegralAdapter"),
                // Ads - AppLovin
                .product(name: "AppLovinSDK", package: "AppLovin-MAX-Swift-Package"),
                .target(name: "AppLovinAdapter"),
                // Ads - FB Audience Network
                .target(name: "FBAudienceNetwork"),
                .target(name: "MetaAdapter"),
...

        // Ads - FB Audience Network
        .binaryTarget(
            name: "FBAudienceNetwork",
            path: "XCFrameworks/FBAudienceNetwork.xcframework"
        ),
        .binaryTarget(
            name: "MetaAdapter",
            path: "XCFrameworks/MetaAdapter.xcframework"
        ),

Error

[!] Error uploading ipa file: 
 [Application Loader Error Output]: [ContentDelivery.Uploader.600001D041C0] Asset validation failed (90049) This bundle is invalid. The bundle at path Payload/app.app/Frameworks/FBAudienceNetwork.framework has an invalid CFBundleIdentifier '$(PRODUCT_BUNDLE_IDENTIFIER)' There are invalid characters(characters that are not dots, hyphen and alphanumerics) that have been replaced with their code point '\u0024\u0028PRODUCT\u005fBUNDLE\u005fIDENTIFIER\u0029' CFBundleIdentifier must be present, must contain only alphanumerics, dots, hyphens and must not end with a dot. [see the Core Foundation Keys at 

@kvenn
Copy link

kvenn commented Jan 15, 2025

Okay this isn't the place to be talking about this (I now know). There is an issue in the right place here: https://developers.facebook.com/community/threads/1535870873800781/

But yeah I think I figured it out.

Modify the info.plist here in FBAudienceNetwork.xcframework->ios-arm64->FBAudienceNetwork.framework->Info.plist

	<key>CFBundleIdentifier</key>
    <string>com.facebook.FBAudienceNetwork</string>
    <key>CFBundleVersion</key>
    <string>6.16.0</string>

Then, since you modified the framework, you'll need to re-sign it

# This will get the Apple Development string you need to paste below (where I have 'example')
security find-identity -p codesigning -v
# Final argument is the path to the actual xcframework you're using in your project
codesign -f -s "Apple Development: Example (Example)" --timestamp --deep "XCFrameworks/FBAudienceNetwork.xcframework"

I found the bundle id from 6.12.0. And took a guess on the bundle version.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>en</string>
    <key>CFBundleExecutable</key>
    <string>FBAudienceNetwork</string>
    <key>CFBundleIdentifier</key>
    <string>com.facebook.FBAudienceNetwork</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>FBAudienceNetwork</string>
    <key>CFBundlePackageType</key>
    <string>FMWK</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleSupportedPlatforms</key>
    <array>
        <string>iPhoneOS</string>
    </array>
    <key>CFBundleVersion</key>
    <string>6.5.1</string>
    <key>DTPlatformBuild</key>
    <string>19F64</string>
    <key>DTPlatformName</key>
    <string>iphoneos</string>
    <key>DTPlatformVersion</key>
    <string>15.5</string>
    <key>DTSDKBuild</key>
    <string>19F64</string>
    <key>DTSDKName</key>
    <string>iphoneos15.5</string>
    <key>DTXcode</key>
    <string>1340</string>
    <key>DTXcodeBuild</key>
    <string>13F17a</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>MinimumOSVersion</key>
    <string>10.0</string>
    <key>NSHumanReadableCopyright</key>
    <string>Copyright © 2014 Facebook. All rights reserved.</string>
</dict>
</plist>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants