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

Duplicate resource bundles with xcframework: true param #69

Closed
ilia3546 opened this issue Feb 20, 2021 · 2 comments
Closed

Duplicate resource bundles with xcframework: true param #69

ilia3546 opened this issue Feb 20, 2021 · 2 comments

Comments

@ilia3546
Copy link

Checklist

Issue Description

When I prebuild some frameworks with bundle resources, they have duplicate resource bundles.

Example:
the framework has the following resource description in the .podspec file:

s.resource_bundle = { 
    "OmnicaAPI-Localizations" => ["API/Framework/Resources/*.lproj/*.strings"] 
}

After prebuild Pods with xcframework: true param, the plugin will compile the following bundles:

  1. ./Pods/%FRAMEWORK%/_Prebuilt/%BUNLE%.bundle
    This bundle has Info.plist file with the following key DTPlatformName: iphonesimulator

  2. ./Pods/%FRAMEWORK%/_Prebuilt/%FRAMEWORK%.xcframework/ios-arm64/%FRAMEWORK%.framework/%BUNLE%.bundle
    This bundle has Info.plist file with the following key DTPlatformName: iphoneos

  3. ./Pods/%FRAMEWORK%/_Prebuilt/%FRAMEWORK%.xcframework/ios-arm64_x86_64-simulator/%FRAMEWORK%.framework/%BUNLE%.bundle
    This bundle has Info.plist file with the following key DTPlatformName: iphonesimulator

After the pod install command build phase [CP] Copy Pods Resources install bundle №1 by the following command in Pods-RetailCRM-resources.sh:

install_resource "${PODS_ROOT}/%FRAMEWORK%/_Prebuilt/%BUNLE%.bundle"

When I tried to upload my project to the AppStore, I got the following error:

Invalid CFBundleSupportedPlatforms value. The key 'CFBundleSupportedPlatforms' in the Info.plist file in bundle 'Payload/App.app/%BUNDLE%.bundle' contains an invalid value '[iPhoneSimulator]'. Consider removing the CFBundleSupportedPlatforms key from the Info.plist. If this bundle is part of a third-party framework, consider contacting the developer of the framework for an update to address this issue.

Here is my config:

config_cocoapods_binary_cache(
    cache_repo: {
        "Debug" => {
            "local" => "~/.cocoapods-binary-cache/prebuilt-frameworks-debug-config"
        },
        "Release" => {
            "local" => "~/.cocoapods-binary-cache/prebuilt-frameworks-release-config"
        }
    },
    build_args: {
        :simulator => [
            "ARCHS='x86_64 arm64'"
        ]
    },
    prebuild_sandbox_path: ".prebuild_sandbox",
    xcframework: true,
    device_build_enabled: true,
    bitcode_enabled: true,
    disable_dsym: false
)
@trinhngocthuyen
Copy link
Contributor

Thanks for reaching out! We will look into the issue.

@trinhngocthuyen
Copy link
Contributor

trinhngocthuyen commented Feb 23, 2021

Kindly check out the latest (including 66f73ee) for the fix.
Thanks for reporting the issue!

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

No branches or pull requests

2 participants