1.- iOS failed to run Flutter. Framework: Permission denied
Error version: Flutter 1.9.1 + Xcode 11.1 + iOS 13 emulator
Error message:
/usr/bin/codesign --force --sign - --preserve-metadata=identifier,entitlements '/Users/xxx/xxx.app/Frameworks/Flutter.framework'
/Users/xxx/xxx.app/Frameworks/Flutter.framework: replacing existing signature
/Users/xxx/xxx.app/Frameworks/Flutter.framework: Permission denied
Command PhaseScriptExecution failed with a nonzero exit code
Copy the code
This is a bug in the flutter SDK. If you don’t upgrade the flutter, you can change a file in the FLUTTER SDK. flutter/packages/flutter_tools/bin/xcode_backend.sh
144 lines RunCommand find"${derived_dir}/engine/Flutter.framework" -type f -exec chmod a-w "{}" \;
=>
RunCommand find "${derived_dir}/engine/Flutter.framework" -type f -iname '.h' -exec chmod a-w "{}" \;
Copy the code
2.Error Flutter packaging: Unknown FLUTTER_BUILD_MODE: XXX
Error version: Flutter 1.9.1 + Xcode 11.1 + iOS 13 emulator
Error message:
========================================================================
ERROR: Unknown FLUTTER_BUILD_MODE: distribute.
Valid values are 'Debug'.'Profile', or 'Release' (case insensitive).
This is controlled by the FLUTTER_BUILD_MODE environment variable.
If that is not set. the CONFIGURATION environment variable is used. You can fix this by either adding an appropriately named build configuration, or adding an appropriate valuefor FLUTTER_BUILD_MODE to the
.xcconfig file for the current build configuration (distribute).
========================================================================
Command PhaseScriptExecution failed with a nonzero exit code
Copy the code
The “Configuration” in Xcode must contain the release, debug, and proflie fields
For example, test_release is automatically packaged out of release mode. For example, ent_Debug is packaged as debug by default.
3. The permission_handler component will rely on too many useless permissions and fail to transfer packages to the Apple background.
Error message:
ITMS-90683: Missing Purpose String in Info.plist - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSContactsUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data.
Copy the code
Solution a. Remove the permission_handler and use the bridge mode to manage permissions
Option B. Add permission description in info.plist. Health permission will increase the risk of audit rejection