Skip to content

Conversation

@jmagman
Copy link
Member

@jmagman jmagman commented Nov 5, 2020

Update add-to-app sample to use XCFrameworks instead of universal frameworks.

Universal (fat) frameworks that support physical devices and simulators aren't possible in an ARM simulator world since the arm64 iphoneos and iphonesimulator slices can't be lipod together in the same binary. Prefer --xcframework in expectation of that switch.

See flutter/flutter#69718, flutter/flutter#69733, and overall macOS ARM support at flutter/flutter#60118

@jmagman
Copy link
Member Author

jmagman commented Nov 5, 2020

== Testing 'add_to_app/ios_using_prebuilt_module' on Flutter's stable channel ==
~/build/flutter/samples/add_to_app/ios_using_prebuilt_module ~/build/flutter/samples
▸ Linking IOSUsingPrebuiltModule
▸ Compiling Main.storyboard
▸ Compiling LaunchScreen.storyboard
▸ Processing Info-Debug.plist
▸ Generating 'IOSUsingPrebuiltModule.app.dSYM'
▸ Copying /Users/travis/build/flutter/samples/add_to_app/ios_using_prebuilt_module/build/Debug-iphoneos/Flutter.framework
▸ Copying /Users/travis/build/flutter/samples/add_to_app/ios_using_prebuilt_module/build/Debug-iphoneos/App.framework
▸ Touching IOSUsingPrebuiltModule.app (in target 'IOSUsingPrebuiltModule' from project 'IOSUsingPrebuiltModule')
▸ Build Succeeded
▸ Linking IOSUsingPrebuiltModule
▸ Compiling Main.storyboard
▸ Compiling LaunchScreen.storyboard
▸ Processing Info-Release.plist
▸ Generating 'IOSUsingPrebuiltModule.app.dSYM'
▸ Copying /Users/travis/build/flutter/samples/add_to_app/ios_using_prebuilt_module/build/Release-iphoneos/Flutter.framework
▸ Copying /Users/travis/build/flutter/samples/add_to_app/ios_using_prebuilt_module/build/Release-iphoneos/App.framework
▸ Touching IOSUsingPrebuiltModule.app (in target 'IOSUsingPrebuiltModule' from project 'IOSUsingPrebuiltModule')
▸ Build Succeeded


# For iOS builds:
flutter build ios-framework --output=../ios_using_prebuilt_module/Flutter
flutter build ios-framework --xcframework --output=../ios_using_prebuilt_module/Flutter
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're targeting stable here, I assume everything still works corretly on stable?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup --xcframework is on stable. With this change it outputs the universal .frameworks on stable but it's just not consumed by the host app. On master it doesn't output the universal frameworks.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And it worked against stable in the CI task.

@jmagman jmagman merged commit 1ed40c6 into flutter:master Nov 5, 2020
@jmagman jmagman deleted the a2a-xcframework branch November 5, 2020 21:49
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

Successfully merging this pull request may close these issues.

2 participants