Please know that flutter build ios
works perfectly without any warning or error.
But when I do flutter build ios --obfuscate --split-debug-info=/_app/obfuscate
it failed with this error :
Building com.x.app for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: YSHDK23K
Running pod install... 18.9s
Running Xcode build...
Xcode build done. 515.9s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
/_app/ios/Pods/libwebp/src/dsp/dec_neon.c:1462:38: warning:
variable 'sum_left' may be uninitialized when used here [-Wconditional-uninitialized]
const uint16x8_t sum = vaddq_u16(sum_left, sum_top);
^~~~~~~~
/_app/ios/Pods/libwebp/src/dsp/dec_neon.c:1426:3: note: variable
'sum_left' is declared here
uint16x8_t sum_left;
^
/_app/ios/Pods/libwebp/src/dsp/dec_neon.c:1462:48: warning:
variable 'sum_top' may be uninitialized when used here [-Wconditional-uninitialized]
const uint16x8_t sum = vaddq_u16(sum_left, sum_top);
^~~~~~~
/_app/ios/Pods/libwebp/src/dsp/dec_neon.c:1425:3: note: variable
'sum_top' is declared here
uint16x8_t sum_top;
...... ======= <Warnings Truncated> ========= .......
/Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_image_compress-0.6.5+1/ios/Classes/SYP
ictureMetadata/SYMetadataExif.m:9:9: warning: non-portable path to file '"SYMetadataExif.h"'; specified path differs in
case from file name on disk [-Wnonportable-include-path]
#import "SYMetadataEXIF.h"
^~~~~~~~~~~~~~~~~~
"SYMetadataExif.h"
1 warning generated.
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Encountered error while building for device.
I got an error from Stackoverflow thus cannot submit without truncating the warnings, thus I cut it off in the middle. If you need more of those warnings please ask me and I will send it to you..
What am I missing here? The app and all works fine even in release mode. It is only when I add the --obfuscate
flag it is like this.
Finally I solved this problem. But the solution is tedious and I'm not sure if this is the best solution. But I think this is the robust solution:
flutter clean
in your project directory.Then it works... at least for me.
Anyone else has other solution?