-
Notifications
You must be signed in to change notification settings - Fork 149
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
feat: support --obfuscate on iOS #1619
Comments
Reproduced this locally. The issue seems to be that our linker does not currently work with obfuscated builds. |
We could also just disable the linker for obfuscated builds for now? |
interesting @bryanoltman , thanks for the feedback. I am not sure if it's worth mentioning, but I believe I was able to successfully execute the I hope this helps to figure out the issue. |
Yes, obfuscation is expected to work on Flutter 3.16.4 and before. We broke it (accidentally) in 3.16.5 (Shorebird 0.20.0, end of Dec 2023) with our new iOS runtime + linking. |
I suspect that this will have a similar fix to what @felangel is working on the dart compiler now. He's making the dart compiler (gen_snapshot) aware of the existence of the "release" build when building the patch. Making obfuscation work with our linker will probably be similar. However the way this is failing (vm sections differing) may just suggest that obfuscation needs to be disabled for the vm section of the snapshot, since the vm section is the same for all apps compiled with the same Dart compiler, there isn't a lot of purpose in obfuscating that code. However obfuscation will probably break our linker in other ways, since it renames methods and variables which likely will cause their heap indices to change, which will likely cause all code which references those names to fail to link (for similar reasons to what Felix is working on right now). This will probably take us a few weeks to fix and will be after we fix #1665 |
shorebird patch ios
fails with obfuscated bulid
I'm having the same issue here. |
We're aware that the --obfuscate flag is broken for iOS builds at the moment. Android works without issue. This issue tracks fixing |
shorebird patch ios
fails with obfuscated bulidshorebird patch ios
fails with obfuscated build
+1 for this! |
@felangel is finishing the last patch for #1892 and then plans to work on this. Work here involves trying It would be OK (as a v1) for |
Following along for updates on this. I'm temporarily disabling the |
shorebird patch ios
fails with obfuscated build
Wanted to give an update that we've not forgotten about this, just been busy fixing other areas of the product that block more people. We recognize that obfuscation is a regulatory requirement for some businesses, and thus blocks Shorebird adoption for those companies. We intend to resolve this issue within the next couple months. Thank you for your continued patience. |
We recently resolved one of the underlying blockers here, and I expect we'll pick this up soon and finish the work necessary to resolve this. |
I'm also waiting for this feature. I hope Shorebird will fix and get it working again soon. Thanks for the update and I'll continue to follow up on this. |
Bump. This is definitely a problem to be solved before we adopt Shorebird but overall it looks like a promising solution, keep up the good work!! |
Thanks. We know how to solve it, it's just not yet risen to the top of the list. Lots of customers adopting Shorebird every month has kept us quite busy supporting them. We'll get back to this, just probably a few months away still. |
In terms of more detail. What we will do: There is an obfuscator inside Dart: In any case, we've built similar systems for other parts of the Dart compiler, so we have a good idea of what we will do here, we just need to finish other things on our list to get to this one. Thank you all for your patience. We look forward to supporting you as users of Shorebird in the future. |
Description
Running
shorebird patch ios-alpha
on an app that uses flavors fails with the following messageI created a repo and manually added flavors/schemes to iOS (development and production). The repo I used to reproduce the issue can be found here.
I was also able to reproduce this issue using the very good CLI which automatically sets up an app with flavors from the get-go when running
very_good create flutter_app <app-name>
Android
release
andpatch
are working fine.Steps To Reproduce
On a project that uses flavors/schemes
development
:Again, a reproducible repo was created here.
Expected Behavior
To be able to publish a patch release for the respective flavor/target.
Screenshots
initializing shorebird
![image](https://private-user-images.githubusercontent.com/3421410/294640591-c98fafca-0ae3-42de-b893-4bcb4e75936c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNzgyMTksIm5iZiI6MTczOTI3NzkxOSwicGF0aCI6Ii8zNDIxNDEwLzI5NDY0MDU5MS1jOThmYWZjYS0wYWUzLTQyZGUtYjg5My00YmNiNGU3NTkzNmMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTFUMTI0NTE5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YzVkYjgxODc1YjcyYjNjMGNkMGI3NjdlNWYzNTJjM2VjMWU5YzNlZTQ2NmI4MmQ0NWFhMTk4M2VjZWM2NDNlMyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.SdFVTDBvdqI1AX16cOR1MAE4a2YMgmBm5IPhbmwbMEE)
triggering a release
![image](https://private-user-images.githubusercontent.com/3421410/294640642-1c60f375-6b75-4cbf-b517-367a113878a1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNzgyMTksIm5iZiI6MTczOTI3NzkxOSwicGF0aCI6Ii8zNDIxNDEwLzI5NDY0MDY0Mi0xYzYwZjM3NS02Yjc1LTRjYmYtYjUxNy0zNjdhMTEzODc4YTEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTFUMTI0NTE5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDMyYjNmMTZhYjdmYWNiZmRmMjY3YTFiMDBjZTIwYmYyYWM0MjVlNzI5OTlmMmQzZDRhMTEwZjA5NWRjYjE1NSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.WNE3nwrj21BOVg9yxzjHY8_2PVfO1LmG9eyO6rNLesI)
triggering a patch
![image](https://private-user-images.githubusercontent.com/3421410/294640675-3fa858bd-beb1-4c8f-8f15-fe14a8017478.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNzgyMTksIm5iZiI6MTczOTI3NzkxOSwicGF0aCI6Ii8zNDIxNDEwLzI5NDY0MDY3NS0zZmE4NThiZC1iZWIxLTRjOGYtOGYxNS1mZTE0YTgwMTc0NzgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTFUMTI0NTE5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MTc0NzQ0N2EzMGM2NDkwNjQyODhiYWY2Y2Q2ZmIwNzI4YTYzNjEyZTY0MjQ4NDI4MTMzYzBiN2M0NWYxMWYwOSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.2Dyn3BHGzRyFeXNhbnWxa5lDHTgGcw3swRoX5R6rSjo)
Additional Context
shorebird doctor
:flutter doctor
The text was updated successfully, but these errors were encountered: