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

Creating XCFramework of a library that uses binary pod FAILS! #156

Open
iadcialim opened this issue Jan 13, 2022 · 0 comments
Open

Creating XCFramework of a library that uses binary pod FAILS! #156

iadcialim opened this issue Jan 13, 2022 · 0 comments

Comments

@iadcialim
Copy link

Hi! I want to check with you guys if this is a known issue/limitation of this tool

Podfile

# Uncomment the next line to define a global platform for your project
platform :ios, '13.0'

use_frameworks!
# https://github.com/leavez/cocoapods-binary
plugin 'cocoapods-binary'
keep_source_code_for_prebuilt_frameworks!

target 'FruitBasket' do

  pod 'RxSwift', :binary => true

end

Then I have this agreggate target that creates the xcframework of my library

# ios devices
xcodebuild archive \
    -workspace FruitBasket.xcworkspace \
    -scheme FruitBasket \
    -archivePath "./build/ios.xcarchive" \
    -sdk iphoneos \
    SKIP_INSTALL=NO

# ios simulator
xcodebuild archive \
    -workspace FruitBasket.xcworkspace \
    -scheme FruitBasket \
    -archivePath "./build/ios_sim.xcarchive" \
    -sdk iphonesimulator \
    SKIP_INSTALL=NO
    
# --------------
# XC Framework
# --------------
xcodebuild -create-xcframework \
    -framework "./build/ios.xcarchive/Products/Library/Frameworks/FruitBasket.framework" \
    -framework "./build/ios_sim.xcarchive/Products/Library/Frameworks/FruitBasket.framework" \
    -output "./build/FruitBasket.xcframework"

Upon running of the script, it will throw this error

module 'RxSwift' was created for incompatible target arm64-apple-ios9.0:.../FruitBasket-aggregated-target/Pods/RxSwift/RxSwift.framework/Modules/RxSwift.swiftmodule/arm64.swiftmodule

Without making it a binary pod is working fine

Env
CocoaPods : 1.11.2
Xcode : 13.2.1 (13C100)
cocoapods-binary : 0.4.4

Sample Project
Cocoapods-binary-xcframework.zip

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

1 participant