In the doc https://github.com/flutter/flutter/wiki/Obfuscating-Dart-Code, it says Add the following flag to the build aot call in the <ProjectRoot>/packages/flutter_tools/bin/xcode_backend.sh file
.
But I don't have the directory <ProjectRoot>/packages/
at all. Do I have to create it somehow? Thanks a lot.
I had same issue and I was able to fix this by adding Flutter SDK path in User-Defined Settings. Open Project Target and add User-Defined Setting with key name FLUTTER_ROOT with the value of your flutter SDK location. Image below for further reference.
I guess there's a mistake on the official documentation.
UPDATE: the wiki page has now been corrected
It's not
<ProjectRoot>/packages/flutter_tools/bin/xcode_backend.sh
but should be (and it's)
<FlutterRoot>/packages/flutter_tools/bin/xcode_backend.sh
If you don't remember where you have installed flutter sdk try this command:
which flutter
it will show
<FlutterRoot>/bin/flutter
Then you will see your file in <FlutterRoot>
cd <FlutterRoot>
find . -name "xcode_backend.sh"
./packages/flutter_tools/bin/xcode_backend.sh
At least the official docs points out that this feature is
And point to this useful SO answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With