-
Notifications
You must be signed in to change notification settings - Fork 6k
[iOS] Bundle dSYM packages in Flutter.xcframework #54414
Conversation
As of Xcode 16, App Store validation requires dSYMs for frameworks in app archives. Bundling dSYMs also significantly simplifies stack trace symbolification, so we should be doing this regardless. This adds both framework and simulator framework dSYMs to the Flutter.xcframework bundle. Issue: flutter/flutter#116493
| help='The framework paths used to create the XCFramework.', | ||
| required=True | ||
| ) | ||
| parser.add_argument( |
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.
It looks like the new argument isn't passed in this PR. What's the plan for using the new code in this file?
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.
It's passed from create_full_ios_framework.py (here), which uses it because the invocation in mac_ios_engine.json already uses the --dsym flag.
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.
YOU ARE IN A MAZE OF TWISTY PYTHON SCRIPTS, ALL ALIKE. YOU ARE LIKELY TO BE EATEN BY A GRUE.
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.
LIGHT LAMP.
…153111) flutter/engine@3978ddd...387f6f3 2024-08-08 [email protected] Fix FlutterMetalLayer testDealloc flakiness on iOS 18 (flutter/engine#54403) 2024-08-08 [email protected] [iOS] Bundle dSYM packages in Flutter.xcframework (flutter/engine#54414) 2024-08-08 [email protected] Roll Dart SDK from 0131aabd8631 to 067c7cfcbc8c (1 revision) (flutter/engine#54437) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Renames our Flutter framework dSYM to `Flutter.framework.dSYM` for consistency with all other dSYM bundle names. In iOS release archives, all other dSYM files are: * `App.framework`: `App.framework.dSYM` * `Runner.app`: `Runner.app.dSYM` We continue to archive the dSYM to `Flutter.dSYM.zip` for backward compatibility with the existing instructions for manual symbolification in `docs/Crashes.md` and to remain compatible with dart-lang/dart-ci's symbolizer which expects `Flutter.dSYM` in [`Symbolizer._symbolizeIosFrames`][symbolizer]. Followup to: #54414 Issue: flutter/flutter#116493 Motto: [Embrace the yak shave][yak_shave]. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
As of Xcode 16, App Store validation now requires that apps uploaded to the App store bundle dSYM debug information bundles for each Framework they embed. dSYM bundles are packaged in the Flutter.xcframework shipped in the `ios-release` tools archive as of engine patches: * flutter/engine#54414 * flutter/engine#54458 This copies the Flutter.framework.dSYM bundle from the tools cache to the app archive produced by `flutter build ipa`. Issue: flutter#116493
As of Xcode 16, App Store validation now requires that apps uploaded to the App store bundle dSYM debug information bundles for each Framework they embed. dSYM bundles are packaged in the Flutter.xcframework shipped in the `ios-release` tools archive as of engine patches: * flutter/engine#54414 * flutter/engine#54458 This copies the Flutter.framework.dSYM bundle from the tools cache to the app archive produced by `flutter build ipa`. Issue: flutter#116493
As of Xcode 16, App Store validation now requires that apps uploaded to the App store bundle dSYM debug information bundles for each Framework they embed. dSYM bundles are packaged in the Flutter.xcframework shipped in the `ios-release` tools archive as of engine patches: * flutter/engine#54414 * flutter/engine#54458 This copies the Flutter.framework.dSYM bundle from the tools cache to the app archive produced by `flutter build ipa`. Issue: flutter#116493
As of the following three patches, we now bundle Flutter.framework.dSYM as part of Flutter.xcframework and bundle them in the .xcarchive bundles produced by `flutter build ipa` / Xcode Product > Archive for upload to the iOS App Store. * #54414 * #54458 * flutter/flutter#153215 The .dSYM bundle is now available both in the uploaded .xcarchive and in the xcframework in Flutter's internal artifact cache. For developers with CI toolchains that do additional manual handling or local archiving of .dSYMs, the dSYMs no longer need to be downloaded from cloud storage as previously detailed in `docs/Crashes.md`, but can instead be copied up from the appropriate dSYM subdirectory in the framework cache: * `flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework` Issue: flutter/flutter#116493 Credo: [Embrace the yak shave](https://suno.com/song/37cb7c43-85ad-40f2-87e6-9aec7baa0419) [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
As of Xcode 16, App Store validation now requires that apps uploaded to the App store bundle dSYM debug information bundles for each Framework they embed. dSYM bundles are packaged in the Flutter.xcframework shipped in the `ios-release` tools archive as of engine patches: * flutter/engine#54414 * flutter/engine#54458 This copies the Flutter.framework.dSYM bundle from the tools cache to the app archive produced by `flutter build ipa`. Issue: #116493
As of Xcode 16, App Store validation requires dSYMs for frameworks in app archives. Bundling dSYMs also significantly simplifies stack trace symbolification, so we should be doing this regardless. This adds both framework and simulator framework dSYMs to the Flutter.xcframework bundle. Issue: flutter/flutter#116493 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Renames our Flutter framework dSYM to `Flutter.framework.dSYM` for consistency with all other dSYM bundle names. In iOS release archives, all other dSYM files are: * `App.framework`: `App.framework.dSYM` * `Runner.app`: `Runner.app.dSYM` We continue to archive the dSYM to `Flutter.dSYM.zip` for backward compatibility with the existing instructions for manual symbolification in `docs/Crashes.md` and to remain compatible with dart-lang/dart-ci's symbolizer which expects `Flutter.dSYM` in [`Symbolizer._symbolizeIosFrames`][symbolizer]. Followup to: flutter#54414 Issue: flutter/flutter#116493 Motto: [Embrace the yak shave][yak_shave]. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
As of Xcode 16, App Store validation now requires that apps uploaded to the App store bundle dSYM debug information bundles for each Framework they embed. dSYM bundles are packaged in the Flutter.xcframework shipped in the `ios-release` tools archive as of engine patches: * flutter/engine#54414 * flutter/engine#54458 This copies the Flutter.framework.dSYM bundle from the tools cache to the app archive produced by `flutter build ipa`. Issue: flutter#116493
This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request) Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request. ### Issue Link: What is the link to the issue this cherry-pick is addressing? flutter/flutter#116493 Note this includes two PRs: #54414 #54458 ### Changelog Description: Bundle iOS framework debugging symbols (`Flutter.framework.dSYM`) in `Flutter.xcframework` in iOS release builds. This eliminates the need for manual download/bundling of Flutter debug symbols for release build crash log symbolication. As of Xcode 16, these symbols are required to be bundled with App Store archives. ### Impact Description: Without these bundled symbols, iOS App Store validation fails for Flutter apps under Xcode 16. ### Workaround: Is there a workaround for this issue? Users can follow the steps described in [docs/Crashes.md](https://github.com/flutter/engine/blob/main/docs/Crashes.md) to manually locate the engine SHA used in their Flutter app, download the Flutter.dSYM archive, and manually copy it into their app archive prior to App Store validation. This is very manual process with room for a lot of error. This process is not at all obvious or well-documented. ### Risk: What is the risk level of this cherry-pick? In the case where dSYM extraction fails, we'll know immediately since the build will fail. dSYMs can be verified using the steps below. ### Test Coverage: Are you confident that your fix is well-tested by automated tests? In this case the build itself will fail if dSYM extraction fails. Testing of bundling is covered in framework tool tests. ### Validation Steps: What are the steps to validate that this fix works? `artifacts.zip` can be checked at any commit on or after `c11fe483947c95553610ab59210af643f031f5f4`. For example https://storage.googleapis.com/flutter_infra_release/flutter/c11fe483947c95553610ab59210af643f031f5f4/ios-release/artifacts.zip Verify that Flutter.xcframework in this archive contains `ios-arm64/dSYMs/Flutter.framework.dSYM`.
In #54414, we added dSYM files for physical and simulator binaries in both regular and extension-safe framework builds, but did not add the dSYMs to the without_entitlements.txt list. This passed all engine pre/post-submit tests, as well as framework tests, but failed during release code signing in Cocoon in a test here: https://github.com/flutter/cocoon/blob/d849b14bab90e0f90e2f7667e37c9f9a5696b918/cipd_packages/codesign/lib/src/file_codesign_visitor.dart#L305-L313 This adds the missing files to `without_entitlements.txt`, which fixes a code-signing error as seen in this build log: https://ci.chromium.org/ui/p/dart-internal/builders/flutter/Mac%20Production%20Engine%20Drone/13590/overview A corresponding change was landed on the [flutter-3.24-candidate.1](https://github.com/flutter/engine/tree/flutter-3.24-candidate.1) branch: #54573 The build associated with that patch correctly completed code signing in this build: https://ci.chromium.org/ui/p/dart-internal/builders/flutter/Mac%20engine_release_builder/688/overview And more specifically, this sub-build: https://ci.chromium.org/ui/p/dart-internal/builders/flutter/Mac%20Production%20Engine%20Drone/13650/overview And even more specifically, this build step: https://logs.chromium.org/logs/dart-internal/buildbucket/cr-buildbucket/8739493904842446705/+/u/Global_generators/Codesign__Volumes_Work_s_w_ir_cache_builder_src_out_release_unsigned_artifacts.zip/codesign_Apple_engine_binaries/stdout Additionally, this patch adds `sky_utils.assert_valid_codesign_config()` which fails the script (and thus the build) with an error message if any file in scope for code signing (i.e. Mach-O binaries) is not listed in the code-signing config (`entitlements.txt`, `without_entitlements.txt`), or any listed file is not found on disk. Issue: flutter/flutter#116493 Issue: flutter/flutter#153532 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
…lutter#153111) flutter/engine@3978ddd...387f6f3 2024-08-08 [email protected] Fix FlutterMetalLayer testDealloc flakiness on iOS 18 (flutter/engine#54403) 2024-08-08 [email protected] [iOS] Bundle dSYM packages in Flutter.xcframework (flutter/engine#54414) 2024-08-08 [email protected] Roll Dart SDK from 0131aabd8631 to 067c7cfcbc8c (1 revision) (flutter/engine#54437) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
As of Xcode 16, App Store validation now requires that apps uploaded to the App store bundle dSYM debug information bundles for each Framework they embed. dSYM bundles are packaged in the Flutter.xcframework shipped in the `ios-release` tools archive as of engine patches: * flutter/engine#54414 * flutter/engine#54458 This copies the Flutter.framework.dSYM bundle from the tools cache to the app archive produced by `flutter build ipa`. Issue: flutter#116493
…lutter#153111) flutter/engine@3978ddd...387f6f3 2024-08-08 [email protected] Fix FlutterMetalLayer testDealloc flakiness on iOS 18 (flutter/engine#54403) 2024-08-08 [email protected] [iOS] Bundle dSYM packages in Flutter.xcframework (flutter/engine#54414) 2024-08-08 [email protected] Roll Dart SDK from 0131aabd8631 to 067c7cfcbc8c (1 revision) (flutter/engine#54437) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
As of Xcode 16, App Store validation now requires that apps uploaded to the App store bundle dSYM debug information bundles for each Framework they embed. dSYM bundles are packaged in the Flutter.xcframework shipped in the `ios-release` tools archive as of engine patches: * flutter/engine#54414 * flutter/engine#54458 This copies the Flutter.framework.dSYM bundle from the tools cache to the app archive produced by `flutter build ipa`. Issue: flutter#116493
In flutter/engine#54414, we added dSYM files for physical and simulator binaries in both regular and extension-safe framework builds. In flutter/engine#54576 we added the dSYMs to the without_entitlements.txt list. The `dev/bots/suite_runners/run_verify_binaries_codesigned_tests.dart` test was updated to reflect these changes in: * flutter#153787 * flutter#154027 This cherrypicks these two changes to the release branch. Issue: flutter#116493
In flutter/engine#54414, we added dSYM files for physical and simulator binaries in both regular and extension-safe framework builds. In flutter/engine#54576 we added the dSYMs to the without_entitlements.txt list. The `dev/bots/suite_runners/run_verify_binaries_codesigned_tests.dart` test was updated to reflect these changes in: * #153787 * #154027 This cherrypicks these two changes to the release branch. Issue: #116493
This updates the codesigning test to account for iOS and macOS binaries in the artifact cache that are _expected_ to not be codesigned. In flutter/engine#54414 we started bundling dSYM (debugging symbols) within Flutter.xcframework, a requirement for App Store verification using Xcode 16. We did the same for macOS in flutter/engine#54696. Unlike the framework dylib, dSYM contents are not directly codesigned (though the xcframework containing them is). Issue: flutter#154571
This updates the codesigning test to account for iOS and macOS binaries in the artifact cache that are _expected_ to not be codesigned. In flutter/engine#54414 we started bundling dSYM (debugging symbols) within Flutter.xcframework, a requirement for App Store verification using Xcode 16. We did the same for macOS in flutter/engine#54696. Unlike the framework dylib, dSYM contents are not directly codesigned (though the xcframework containing them is). Issue: flutter#154571
This updates the codesigning test to account for iOS and macOS binaries in the artifact cache that are _expected_ to not be codesigned. In flutter/engine#54414 we started bundling dSYM (debugging symbols) within Flutter.xcframework, a requirement for App Store verification using Xcode 16. We did the same for macOS in flutter/engine#54696. Unlike the framework dylib, dSYM contents are not directly codesigned (though the xcframework containing them is). Issue: flutter#154571
This updates the codesigning test to account for iOS and macOS binaries in the artifact cache that are _expected_ to not be codesigned. In flutter/engine#54414 we started bundling dSYM (debugging symbols) within Flutter.xcframework, a requirement for App Store verification using Xcode 16. We did the same for macOS in flutter/engine#54696. Unlike the framework dylib, dSYM contents are not directly codesigned (though the xcframework containing them is). Issue: flutter#154571
This updates the codesigning test to account for iOS and macOS binaries in the artifact cache that are _expected_ to not be codesigned. In flutter/engine#54414 we started bundling dSYM (debugging symbols) within Flutter.xcframework, a requirement for App Store verification using Xcode 16. We did the same for macOS in flutter/engine#54696. Unlike the framework dylib, dSYM contents are not directly codesigned (though the xcframework containing them is). Issue: flutter#154571
This updates the codesigning test to account for iOS and macOS binaries in the artifact cache that are _expected_ to not be codesigned. In flutter/engine#54414 we started bundling dSYM (debugging symbols) within Flutter.xcframework, a requirement for App Store verification using Xcode 16. We did the same for macOS in flutter/engine#54696. Unlike the framework dylib, dSYM contents are not directly codesigned (though the xcframework containing them is). Issue: #154571
This updates the codesigning test to account for iOS and macOS binaries in the artifact cache that are _expected_ to not be codesigned. In flutter/engine#54414 we started bundling dSYM (debugging symbols) within Flutter.xcframework, a requirement for App Store verification using Xcode 16. We did the same for macOS in flutter/engine#54696. Unlike the framework dylib, dSYM contents are not directly codesigned (though the xcframework containing them is). Issue: #154571 This is a cherry-pick of #154591 to the flutter-3.24-candidate.0 branch.
This updates the code-signing workflow to account for iOS and macOS binaries in the artifact cache that are _expected_ to not be codesigned. In flutter/engine#54414 we started bundling dSYM (debugging symbols) within Flutter.xcframework, a requirement for App Store verification using Xcode 16. We did the same for macOS in flutter/engine#54696. Unlike the framework dylib, dSYM contents are not directly codesigned (though the xcframework containing them is). This skips code-signing for files found in `unsigned_binaries.txt`, which will be added in a followup patch to the framework artifact archive creation scripts in engine: * `sky/tools/create_ios_framework.py` * `sky/tools/create_macos_framework.py` Issue: flutter/flutter#154571
Unfortunately, no. You'll need to migrate to Flutter 3.24 (currently on stable channel). |
|
@lanistor There may be a way to do this manually by copying the Flutter dSYMs into your project: https://stackoverflow.com/a/52417617/431116 |
|
Alternatively, it may work if you downgrade to Xcode 15. |
hey there. I can't find the dSYMs folder why? :) I am using flutter 3.19.0 |
Thanks, i will try again. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Nevermind, I downgraded to xcode 15 to run my older flutter version 3.19.0 xcode 16 works fine with the newest stable flutter versions. |
As of Xcode 16, App Store validation now requires that apps uploaded to the App store bundle dSYM debug information bundles for each Framework they embed. dSYM bundles are packaged in the Flutter.xcframework shipped in the `ios-release` tools archive as of engine patches: * flutter/engine#54414 * flutter/engine#54458 This copies the Flutter.framework.dSYM bundle from the tools cache to the app archive produced by `flutter build ipa`. Issue: flutter#116493
In flutter/engine#54414, we added dSYM files for physical and simulator binaries in both regular and extension-safe framework builds. In flutter/engine#54576 we added the dSYMs to the without_entitlements.txt list. The `dev/bots/suite_runners/run_verify_binaries_codesigned_tests.dart` test was updated to reflect these changes in: * flutter#153787 * flutter#154027 This cherrypicks these two changes to the release branch. Issue: flutter#116493
This updates the codesigning test to account for iOS and macOS binaries in the artifact cache that are _expected_ to not be codesigned. In flutter/engine#54414 we started bundling dSYM (debugging symbols) within Flutter.xcframework, a requirement for App Store verification using Xcode 16. We did the same for macOS in flutter/engine#54696. Unlike the framework dylib, dSYM contents are not directly codesigned (though the xcframework containing them is). Issue: flutter#154571 This is a cherry-pick of flutter#154591 to the flutter-3.24-candidate.0 branch.



As of Xcode 16, App Store validation requires dSYMs for frameworks in app archives. Bundling dSYMs also significantly simplifies stack trace symbolification, so we should be doing this regardless.
This adds both framework and simulator framework dSYMs to the Flutter.xcframework bundle.
Issue: flutter/flutter#116493
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.