pichillilorenzo / flutter_inappwebview

A Flutter plugin that allows you to add an inline webview, to use a headless webview, and to open an in-app browser window.
https://inappwebview.dev
Apache License 2.0
3.27k stars 1.61k forks source link

flutter app iOS build failing with xcode 13 - Archive Failed #1832

Open Mehdi-Snoussi opened 1 year ago

Mehdi-Snoussi commented 1 year ago

Hello everyone, I'm currently facing a problem with building the .ipa file for my Flutter app so that I can publish it on the App Store. Just to clarify, I can run the app on the simulator without any issues. I'm also able to build the iOS project using 'flutter build ios' without any problems. However, I'm running into an error when I attempt to build the .ipa file using 'flutter build ipa.'

Xcode's output: ↳ Writing result bundle at path: /var/folders/xk/73bjkq2166n49x3b_5p4wb4m0000gn/T/flutter_tools.AFm5sc/flutter_ios_build_temp_dircJf2uh/temporary_xcresult_bundle

4 warnings generated. 1 warning generated. 4 warnings generated. 1 warning generated. /Users/mehdi/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/location-4.4.0/ios/Classes/LocationPlugin.m:176:13: warning: 'UIAlertView' is deprecated: first deprecated in iOS 9.0 - UIAlertView is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleAlert instead [-Wdeprecated-declarations] UIAlertView alert = [[UIAlertView alloc] initWithTitle:@"Location is Disabled" ^ In module 'UIKit' imported from /Users/mehdi/Downloads/travel_app/ios/Pods/Target Support Files/location/location-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAlertView.h:27:12: note: 'UIAlertView' has been explicitly marked deprecated here @interface UIAlertView : UIView ^ /Users/mehdi/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/location-4.4.0/ios/Classes/LocationPlugin.m:176:48: warning: 'UIAlertView' is deprecated: first deprecated in iOS 9.0 - UIAlertView is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleAlert instead [-Wdeprecated-declarations] UIAlertView alert = [[UIAlertView alloc] initWithTitle:@"Location is Disabled" ^ In module 'UIKit' imported from /Users/mehdi/Downloads/travel_app/ios/Pods/Target Support Files/location/location-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAlertView.h:27:12: note: 'UIAlertView' has been explicitly marked deprecated here @interface UIAlertView : UIView ^ 2 warnings generated. /Users/mehdi/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_local_notifications-13.0.0/ios/Classes/FlutterLocalNotificationsPlugin.m:6:17: warning: method definition for 'setRegisterPlugins:' not found [-Wincomplete-implementation] @implementation FlutterLocalNotificationsPlugin { ^ In file included from /Users/mehdi/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_local_notifications-13.0.0/ios/Classes/FlutterLocalNotificationsPlugin.m:1: /Users/mehdi/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_local_notifications-13.0.0/ios/Classes/FlutterLocalNotificationsPlugin.h:5:1: note: method 'setRegisterPlugins:' declared here

mkdir -p /Users/mehdi/Library/Developer/Xcode/DerivedData/Runner-egpdwisazmclbuekiwxaxthpnmmr/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/Runner.app/Frameworks Symlinked... readlink: illegal option -- f usage: readlink [-n] [file ...] Command PhaseScriptExecution failed with a nonzero exit code note: Using new build system note: Planning note: Build preparation complete note: Building targets in parallel /Users/mehdi/Downloads/travel_app/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.0.99. (in target 'ReachabilitySwift' from project 'Pods') /Users/mehdi/Downloads/travel_app/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.0.99. (in target 'OrderedSet' from project 'Pods')

Result bundle written to path: /var/folders/xk/73bjkq2166n49x3b_5p4wb4m0000gn/T/flutter_tools.AFm5sc/flutter_ios_build_temp_dircJf2uh/temporary_xcresult_bundle Encountered error while archiving for device.

***Is there anyone who can provide a solution to this issue?

github-actions[bot] commented 1 year ago

👋 @Mehdi-Snoussi

NOTE: This comment is auto-generated.

Are you sure you have already searched for the same problem?

Some people open new issues but they didn't search for something similar or for the same issue. Please, search for it using the GitHub issue search box or on the official inappwebview.dev website, or, also, using Google, StackOverflow, etc. before posting a new one. You may already find an answer to your problem!

If this is really a new issue, then thank you for raising it. I will investigate it and get back to you as soon as possible. Please, make sure you have given me as much context as possible! Also, if you didn't already, post a code example that can replicate this issue.

In the meantime, you can already search for some possible solutions online! Because this plugin uses native WebView, you can search online for the same issue adding android WebView [MY ERROR HERE] or ios WKWebView [MY ERROR HERE] keywords.

Following these steps can save you, me, and other people a lot of time, thanks!