configcat / swift-sdk

ConfigCat SDK for Swift. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.
https://configcat.com/docs/sdk-reference/ios
Other
25 stars 12 forks source link

XCFramework built with Carthage is missing CFBundleIdentifier #18

Closed CraigSiemens closed 2 years ago

CraigSiemens commented 2 years ago

Describe the bug

When using carthage to build ConfigCat as an XCFramework, the simulator framework's Info.plist is missing a CFBundleIdentifier.

This causes Xcode to fail installing an app to the simulator with the following error.

Bundle at path ~/Users/neo~/Library/Developer/CoreSimulator/Devices/9DDC0094-839D-45A5-86FC-3E1A6AFFC881/data/Library/Caches/com.apple.mobile.installd.staging/temp.MKcv1j/extracted/Payload/App/Frameworks/ConfigCat.framework did not have a CFBundleIdentifier in its Info.plist
Domain: MIInstallerErrorDomain
Code: 12
User Info: {
    FunctionName = "-[MIBundle _validateWithError:]";
    LegacyErrorString = MissingBundleIdentifier;
    SourceFileLine = 54;
}

To reproduce

carthage build swift-sdk --platform ios --use-xcframeworks
/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" Carthage/Build/ConfigCat.xcframework/ios-arm64_armv7/ConfigCat.framework/Info.plist
/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" Carthage/Build/ConfigCat.xcframework/ios-arm64_i386_x86_64-simulator/ConfigCat.framework/Info.plist

Expected behavior

After building the XCFramework with carthage, the following two lines should print out the CFBundleIdentifier from the iOS and iOS Simulator framework. They should both have a value but the second one fails with

Print: Entry, ":CFBundleIdentifier", Does Not Exist
z4kn4fein commented 2 years ago

Hi @CraigSiemens, yesterday I merged your PR and published a new release, could you please verify whether the issue is fixed or still there? Thanks!