I was trying to generate the ipa file to upload it on App Store but unfortunately it failed and says "Encountered error while archiving for device".
I also tried Archiving from Xcode but, the Archive failed there too. It is working great in ios simulator (13)
Failed to build iOS app
Error output from Xcode build:
↳
** ARCHIVE FAILED **
Xcode’s output:
Writing result bundle at path:
/var/folders/8s/2st2j0d97k7cm80h3968jnx80000gn/T/flutter_tools.ph1v
kd/flutter_ios_build_temp_dirZbRdRw/temporary_xcresult_bundle
error: the following command failed with exit code 0 but produced no
further output
CompileC
Failed to package /Users/sunsoft/Downloads/alifpet-app-master.
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
/Users/sunsoft/Downloads/alifpet-app-master/ios/Pods/Pods.xcodeproj:
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
set to 8.0, but the range of supported deployment target versions is
9.0 to 15.2.99. (in target 'Sodium' from project 'Pods')
/Users/sunsoft/Downloads/alifpet-app-master/ios/Pods/Pods.xcodeproj:
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
set to 8.0, but the range of supported deployment target versions is
9.0 to 15.2.99. (in target 'ReachabilitySwift' from project 'Pods')
/Users/sunsoft/Downloads/alifpet-app-master/ios/Pods/Pods.xcodeproj:
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
set to 8.0, but the range of supported deployment target versions is
9.0 to 15.2.99. (in target 'Starscream' from project 'Pods')
/Users/sunsoft/Downloads/alifpet-app-master/ios/Pods/Pods.xcodeproj:
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
set to 6.0, but the range of supported deployment target versions is
9.0 to 15.2.99. (in target 'Reachability' from project 'Pods')
/Users/sunsoft/Downloads/alifpet-app-master/ios/Pods/Pods.xcodeproj:
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
set to 7.0, but the range of supported deployment target versions is
9.0 to 15.2.99. (in target 'AppAuth' from project 'Pods')
/Users/sunsoft/Downloads/alifpet-app-master/ios/Pods/Pods.xcodeproj:
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
set to 8.0, but the range of supported deployment target versions is
9.0 to 15.2.99. (in target 'PusherSwiftWithEncryption' from project
'Pods')
/Users/sunsoft/Downloads/alifpet-app-master/ios/Pods/Pods.xcodeproj:
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
set to 8.0, but the range of supported deployment target versions is
9.0 to 15.2.99. (in target 'GoogleSignIn' from project 'Pods')
/Users/sunsoft/Downloads/alifpet-app-master/ios/Pods/Pods.xcodeproj:
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
set to 8.0, but the range of supported deployment target versions is
9.0 to 15.2.99. (in target 'AgoraRtcEngine_iOS' from project 'Pods')
Result bundle written to path:
/var/folders/8s/2st2j0d97k7cm80h3968jnx80000gn/T/flutter_tools.ph1v
kd/flutter_ios_build_temp_dirZbRdRw/temporary_xcresult_bundle
Encountered error while archiving for device.
2
Answers
The problem here is that the Podfile that Flutter template creates by default has no specific iOS version set unfortunately.
Do this to fix this problem:
ios/
folder of your project, open thePodfile
.Podfile
, make sure this line is not commented out and change the iOS version to 12.0.change from:
to:
Run
pod deintegrate
in Terminal inside theios/
folder of your project.Run
pod install --repo-update
in yourios/
folderThis should do the trick!
If after this you are getting the following error
Then you need to open your iOS workspace in Xcode and select your root project on top left, then inside the Info tab, choose your configuration (in this case Debug) and change it to None. After that, do pod install again.
I am getting this error while building with command flutter build ipa –release –no-tree-shake-icons while it is working fine when i archive with xcode.
Uncategorized (Xcode): Exited with status code 1
Encountered error while archiving for device.