Skip to content

Conversation

@cbracken
Copy link
Member

@cbracken cbracken commented Aug 10, 2024

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:

This copies the Flutter.framework.dSYM bundle from the tools cache to the app archive produced by flutter build ipa.

Issue: #116493

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Aug 10, 2024
@cbracken cbracken force-pushed the tool-copy-framework-dsym branch from 5e80009 to 4b2a885 Compare August 10, 2024 06:55
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
@cbracken cbracken force-pushed the tool-copy-framework-dsym branch from 4b2a885 to 7b0e1e4 Compare August 10, 2024 07:06
@cbracken cbracken marked this pull request as ready for review August 10, 2024 07:20
@cbracken
Copy link
Member Author

I have an alternate version of this patch that unifies the App.framework.dSYM and Flutter.framework.dSYM copying code, but took this route, which does an rsync copy like we do with Flutter.framework because App.framework/App.framework.dSYM are build products that get bundled, whereas Flutter.framework/Flutter.framework.dSYM are not build products, but rather pre-builts that get copied over.

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM

@cbracken cbracken added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 10, 2024
auto-submit bot pushed a commit to flutter/engine that referenced this pull request Aug 10, 2024
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
@auto-submit auto-submit bot merged commit c375dd8 into flutter:master Aug 10, 2024
@cbracken cbracken deleted the tool-copy-framework-dsym branch August 10, 2024 16:42
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 10, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 10, 2024
auto-submit bot pushed a commit to flutter/engine that referenced this pull request Aug 10, 2024
As of flutter/flutter#153215, end user app archives now include symbols for the Flutter framework by default. So manual symbolication is no longer required.

For engine developers and others who still need to deal with manual symbols, they can now be found in the Flutter tool cache and can thus be obtained from there if required.

Issue: flutter/flutter#116493

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 11, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 11, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 12, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Aug 12, 2024
Manual roll requested by tarrinneal@google.com

flutter/flutter@b12d861...9b84701

2024-08-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from 1a5e2e58d3d4 to 5fea110c3b20 (1 revision) (flutter/flutter#153262)
2024-08-12 engine-flutter-autoroll@skia.org Roll Flutter Engine from d409dcdc9b41 to 1a5e2e58d3d4 (3 revisions) (flutter/flutter#153257)
2024-08-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from c11fe483947c to d409dcdc9b41 (3 revisions) (flutter/flutter#153233)
2024-08-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from 2c910fc878b6 to c11fe483947c (1 revision) (flutter/flutter#153229)
2024-08-10 chris@bracken.jp [iOS] Copy Flutter.framework.dSYM into app archive (flutter/flutter#153215)
2024-08-10 zanderso@users.noreply.github.com In native_assets_test, ignore a failure to delete a temp directory (flutter/flutter#153223)
2024-08-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from 0560465ecd36 to 2c910fc878b6 (1 revision) (flutter/flutter#153224)
2024-08-10 engine-flutter-autoroll@skia.org Roll Flutter Engine from 3acd373923c9 to 0560465ecd36 (2 revisions) (flutter/flutter#153216)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC rmistry@google.com,stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: 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
@jmagman jmagman added the cp: stable cherry pick this pull request to stable release candidate branch label Aug 12, 2024
flutteractionsbot pushed a commit to flutteractionsbot/flutter that referenced this pull request Aug 12, 2024
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
DBowen33 pushed a commit to DBowen33/flutter that referenced this pull request Aug 16, 2024
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
Buchimi pushed a commit to Buchimi/flutter that referenced this pull request Sep 2, 2024
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
@lanistor
Copy link

lanistor commented Oct 2, 2024

Does Flutter 3.22 merged this commit? I still got this problem.

  • Flutter: 3.22.3
  • Xcode: 16.0

Logs:

The archive did not include a dSYM for the Flutter.framework with the UUIDs [4C4C44DC-5555-3144-A1B8-F18F0C0EE878]. Ensure that the archive's dSYM folder includes a DWARF file for Flutter.framework with the expected UUIDs.
截屏2024-10-03 01 29 28

@cbracken
Copy link
Member Author

cbracken commented Oct 2, 2024

Does Flutter 3.22 merged this commit? I still got this problem.

This fix is in Flutter 3.24 (the current stable branch). You can pick it up via flutter upgrade. There is no plan to back port to older Flutter releases.

@jmagman
Copy link
Member

jmagman commented Oct 2, 2024

flutter/engine#54414 (comment)

There may be a way to do this manually by copying the Flutter dSYMs into your project: https://stackoverflow.com/a/52417617/431116
You can find the dSYMs at /bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64/dSYMs/Flutter.framework.dSYM/
Alternatively, it may work if you downgrade to Xcode 15.

@lanistor
Copy link

lanistor commented Oct 3, 2024

Does Flutter 3.22 merged this commit? I still got this problem.

This fix is in Flutter 3.24 (the current stable branch). You can pick it up via flutter upgrade. There is no plan to back port to older Flutter releases.

@cbracken Thanks a lot, But Flutter 3.24 has a big problem: it force need all dependencies update android compileSdkVersion to 34, this is unattainable for us, so we have to downgrade to 3.22.

So will you merge this bugfix to Flutter 3.22?

@jmagman
Copy link
Member

jmagman commented Oct 3, 2024

So will you merge this bugfix to Flutter 3.22?

No, we will not be bug fixing to any previously releases. However, you should have a relatively easy workaround:

There may be a way to do this manually by copying the Flutter dSYMs into your project: https://stackoverflow.com/a/52417617/431116
You can find the dSYMs at /bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64/dSYMs/Flutter.framework.dSYM/
Alternatively, it may work if you downgrade to Xcode 15.

@lanistor
Copy link

lanistor commented Oct 3, 2024

@cbracken Thanks a lot, But Flutter 3.24 has a big problem: it force need all dependencies update android compileSdkVersion to 34, this is unattainable for us, so we have to downgrade to 3.22.

Thanks, but i cannot find Realm.framework.dSYM, where to located it? Where is this folder /bin/cache/artifacts/engine/ios-release?

@jmagman
Copy link
Member

jmagman commented Oct 3, 2024

That StackOverflow link is showing how to embed a random dSYM in your Xcode project, their example is Realm. Instead of their example, use the Flutter.dSYM (which is what this issue was tracking). It's located in your Flutter SDK directory at <flutter-sdk>/bin/cache/artifacts/engine/ios-release (sorry, my pasting from flutter/engine#54414 (comment) was bad).

@lanistor
Copy link

lanistor commented Oct 3, 2024

That StackOverflow link is showing how to embed a random dSYM in your Xcode project, their example is Realm. Instead of their example, use the Flutter.dSYM (which is what this issue was tracking). It's located in your Flutter SDK directory at <flutter-sdk>/bin/cache/artifacts/engine/ios-release (sorry, my pasting from flutter/engine#54414 (comment) was bad).

Thanks, but i cannot find a dSYMs folder in ios-release/Flutter.xcframework/ios-arm64 of flutter folder.

截屏2024-10-03 11 29 04

@jmagman
Copy link
Member

jmagman commented Oct 3, 2024

That StackOverflow link is showing how to embed a random dSYM in your Xcode project, their example is Realm. Instead of their example, use the Flutter.dSYM (which is what this issue was tracking). It's located in your Flutter SDK directory at <flutter-sdk>/bin/cache/artifacts/engine/ios-release (sorry, my pasting from flutter/engine#54414 (comment) was bad).

Thanks, but i cannot find a dSYMs folder in ios-release/Flutter.xcframework/ios-arm64 of flutter folder.

Okay this is a good point, it doesn't exist on Flutter 3.22, it's only in 3.24 or later, which is the problem!
Follow the instructions at https://github.com/flutter/engine/blob/main/docs/Crashes.md#ios for "For versions prior to Flutter 3.24" and download it directly from Google Cloud Storage.

@lanistor
Copy link

lanistor commented Oct 3, 2024

That StackOverflow link is showing how to embed a random dSYM in your Xcode project, their example is Realm. Instead of their example, use the Flutter.dSYM (which is what this issue was tracking). It's located in your Flutter SDK directory at <flutter-sdk>/bin/cache/artifacts/engine/ios-release (sorry, my pasting from flutter/engine#54414 (comment) was bad).

Thanks, but i cannot find a dSYMs folder in ios-release/Flutter.xcframework/ios-arm64 of flutter folder.

Okay this is a good point, it doesn't exist on Flutter 3.22, it's only in 3.24 or later, which is the problem! Follow the instructions at https://github.com/flutter/engine/blob/main/docs/Crashes.md#ios for "For versions prior to Flutter 3.24" and download it directly from Google Cloud Storage.

I did as your guide, but i still got this problem, it seems that the UUID doesn't match.

截屏2024-10-03 13 39 41 截屏2024-10-03 13 40 54 截屏2024-10-03 13 41 01 截屏2024-10-03 13 43 25

@jmagman
Copy link
Member

jmagman commented Oct 3, 2024

@lanistor can you file a new issue? We would use it as a request to make https://github.com/flutter/engine/blob/main/docs/Crashes.md#ios better.

@GhassanAlKaraan
Copy link

Having the same issue here. I can't upgrade the flutter version because this is gonna break my project. But willing to refactor later in time. I'm confused by which fix to apply. Should I downgrade my xcode?

Also can I just ignore the warning for now or it will not let me push the build for distribution?

@jmagman
Copy link
Member

jmagman commented Oct 3, 2024

@lanistor

This comment was marked as duplicate.

@lanistor

This comment was marked as duplicate.

@dawid-niedzwiecki
Copy link

dawid-niedzwiecki commented Oct 8, 2024

I encountered an issue while using the add-to-app method. The iOS app doesn't compile due to "Multiple commands produce MYAPP/DerivedData/app/Build/Products/Debug-iphoneos/Flutter.framework.dSYM" in Xcode 15

@jmagman
Copy link
Member

jmagman commented Oct 16, 2024

@dawid-niedzwiecki Can you file a new issue that describes what you are seeing and how to reproduce it? Thank you!

moffatman pushed a commit to moffatman/flutter that referenced this pull request Oct 30, 2024
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
@renefloor
Copy link
Contributor

@dawid-niedzwiecki and @jmagman We have the same issue. I could reproduce it by taking the multiple-flutters example and changed it from the cocoapods setup to the frameworks setup following this guide: https://docs.flutter.dev/add-to-app/ios/project-setup#embed-a-flutter-module-in-your-ios-app

I created an issue with more detailed reproduction steps: #158005

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App cp: stable cherry pick this pull request to stable release candidate branch tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flutter application missing framework dSYMs, validation error "The archive did not include a dSYM for the Flutter.framework with the UUIDs"

7 participants