-
Notifications
You must be signed in to change notification settings - Fork 28.7k
Avoid thinning frameworks in iOS extensions #64674
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
Conversation
'EFQRCode.framework', | ||
'EFQRCode', | ||
); | ||
_checkWatchExtensionFrameworkArchs(watchExtensionFrameworkPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the new check that these plugin frameworks haven't been lipo
d to the iOS ARCHS.
@@ -160,34 +191,6 @@ Future<void> main() async { | |||
workingDirectory: flutterDirectory.path, | |||
); | |||
|
|||
await inDirectory(projectDir, () async { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wasn't actually building for the simulator (it's missing --simulator
) even with the -d
flag. flutter build ios
with a watch companion doesn't actually work. Anyway the next thing this does is run on the simulator, which does work.
use_frameworks! | ||
use_modular_headers! | ||
|
||
pod 'EFQRCode/watchOS', '5.1.6' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This adds a framework to the watch extension. Previous this failed because xcode_backend
lipo
d all .framework
s, even the ones in the watch extension with a different expected architecture.
@@ -811,7 +946,7 @@ | |||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | |||
CLANG_ENABLE_MODULES = YES; | |||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; | |||
ENABLE_BITCODE = YES; | |||
ENABLE_BITCODE = NO; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bitcode should be off for Runner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why should bitcode be off? Bitcode is a requirement when you have a watch extension.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this is an integration test that will never be submitted to the App Store and I didn't want to track down issues related to the pods building before the correct bitcode-embedded version of Flutter gets copied around. I'll set it back to YES
and see if this particular integration test triggers that case.
@@ -19,9 +19,13 @@ dependencies: | |||
flutter: | |||
sdk: flutter | |||
|
|||
device_info: 0.4.2+7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding (any) plugin is what kicks the tool into running pod install
, which we need to embed the watch framework.
@@ -257,11 +257,10 @@ ThinFramework() { | |||
} | |||
|
|||
ThinAppFrameworks() { | |||
local app_path="${TARGET_BUILD_DIR}/${WRAPPER_NAME}" | |||
local frameworks_dir="${app_path}/Frameworks" | |||
local xcode_frameworks_dir="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the actual fix.
Instead of find
ing and thinning all *.framework
s in Runner.app
, it now only does so in the Runner.app/Frameworks
directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
'watch Extension.appex', | ||
'Frameworks', | ||
'EFQRCode.framework', | ||
'EFQRCode', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment for what this is? It came from a pod?
use_frameworks! | ||
use_modular_headers! | ||
|
||
pod 'EFQRCode/watchOS', '5.1.6' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
never mind, the answer's here. Still good to comment in the other file.
This pull request is not suitable for automatic merging in its current state.
|
@xster would you mind approving it? |
GitHub needs an approve button on the main tab instead of the files tab. |
It looks like this might have broken |
Error:
|
…lutter#64829) This reverts commit ce9cde8.
Description
Watch extensions are embedded in iOS apps. Avoid lipo'ing those frameworks to iOS architectures. Stick to the app frameworks.
Related Issues
Fixes #60351
Tests
Updated
ios_app_with_extensions_test
to include a watch framework. Check the build succeeds, and that the watch extension frameworks have the expected watch architectures.Checklist
///
).flutter analyze --flutter-repo
) does not report any problems on my PR.Breaking Change