Project run well on iOS simulator but doesn't work on real device nor archiving via xcode , it gives me this error "Command PhaseScriptExecution failed with a nonzero exit code"
script name?
/bin/sh -c /Users/Amr/Library/Developer/Xcode/DerivedData/Runner-ahbetghgyehinuhheozsxpjhchwh/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/Runner.build/Release-iphoneos/Runner.build/Script-9740EEB61CF901F6004384FC.sh
Xcode log: Failed to package /project. Command PhaseScriptExecution failed with a nonzero exit code
flutter doctor log:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.10.3, on macOS 12.2.1 21D62 darwin-x64, locale en-SA)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.3)
[✓] Android Studio (version 2021.1)
[✓] Connected device (1 available)
! Error: Amr’s iPhone is not connected. Xcode will continue when Amr’s iPhone is connected. (code -13)
[✓] HTTP Host Availability
• No issues found!
pubspec.yaml
cupertino_icons: ^1.0.2
http: ^0.13.3
introduction_screen: ^3.0.0
flutter_zoom_drawer: ^2.1.1
shared_preferences: ^2.0.7
device_info_plus: ^3.1.0
sms_autofill: ^2.0.1
sizer: ^2.0.13
flutter_spinkit: ^5.0.0
local_auth: ^1.1.7
flutter_contacts: ^1.1.1
share_plus: ^3.0.0
path_provider: ^2.0.4
flutter_page_indicator: ^0.0.3
json_annotation: ^4.4.0
json_serializable: ^6.1.5
build_runner: ^2.1.7
intl: ^0.17.0
smooth_page_indicator: ^1.0.0 2
circular_countdown_timer: ^0.2.0
circular_bottom_navigation: ^2.0.0
custom_navigation_bar: ^0.8.2
flutter_svg: ^1.0.3
flutter_svg_provider: ^1.0.3
tab_indicator_styler: ^2.0.0
flutter_rating_bar: ^4.0.0
flutter_staggered_grid_view: ^0.4.0
responsive_framework: ^0.1.4
url_launcher: ^6.0.10
webview_flutter: ^3.0.1
pie_chart: ^5.0.1
select_form_field: ^2.2.0
syncfusion_flutter_charts: ^19.3.44 1
cool_alert: ^1.1.0
image_picker: ^0.8.4 1
flutter_sound: ^9.1.7
just_audio: ^0.9.18
record: ^3.0.0
provider: ^6.0.1
permission_handler:
flutter_cached_pdfview:
loading:
git:
url: git://github.com/leonzone/loading.git
path: loading
ref: 8f5a63f
flutter_slidable: ^1.1.0
direct_select_flutter: ^1.1.1
pull_to_refresh: ^2.0.0
flutter_icons:
image_path: "assets/images/appicon.png"
android: true
ios: true
dev_dependencies:
flutter_test:
sdk: flutter
& xcode version: Version 13.3 (13E113)
Also getting this on terminal using "flutter build ios --release" command
Xcode's output:
↳
Writing result bundle at path:
/var/folders/p_/vscnsc151p94y69x5gpnshv40000gp/T/flutter_tools.Iz0teh/flutter_ios_build_temp_dirrfh0Oh/temporary_xcresult_bundle
Failed to package /Users/Amr/Developer/taqati.
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
Result bundle written to path:
/var/folders/p_/vscnsc151p94y69x5gpnshv40000gp/T/flutter_tools.Iz0teh/flutter_ios_build_temp_dirrfh0Oh/temporary_xcresult_bundle
CodePudding user response:
Please clear derived data first. then
flutter clean
flutter pub get
cd ios
pod intall
pod update
then check in xcode by build it again
CodePudding user response:
[Xcode image is attached below][1]
Just make sure that your Project's Runner has all the configuration set.If any of the set is missing , please select it and rebuild again. [1]: https://i.stack.imgur.com/UYobQ.png