flutter inappwebview warning in flutter - ios

i'm implementing a youtube player in my flutter app and when i run it the build will fail and it throws deprication error.
i'm currently using macbook mid 2012, so i can not use latest version of x code. my current version is at Version 12.4 . so in order to use flutter for ios i'm using flutter 2.5.
so now when i try to use youtube player it doesn't build the app.
Xcode build done. 43.0s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
/Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
Classes/InAppBrowser/InAppBrowserWebViewController.swift:562:13: warning: setter for 'statusBarStyle'
was deprecated in iOS 9.0: Use -[UIViewController preferredStatusBarStyle]
UIApplication.shared.statusBarStyle = UIStatusBarStyle(rawValue: previousStatusBarStyle)!
^
/Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
Classes/InAppWebView/InAppWebView.swift:521:31: warning: 'mediaPlaybackRequiresUserAction' was
deprecated in iOS 9.0
configuration.mediaPlaybackRequiresUserAction =
options.mediaPlaybackRequiresUserGesture
^
/Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
Classes/InAppWebView/InAppWebView.swift:932:31: warning: 'mediaPlaybackRequiresUserAction' was
deprecated in iOS 9.0
configuration.mediaPlaybackRequiresUserAction =
newOptions.mediaPlaybackRequiresUserGesture
^
/Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
Classes/InAppWebView/InAppWebViewOptions.swift:103:81: warning: 'mediaPlaybackRequiresUserAction' was
deprecated in iOS 9.0
realOptions["mediaPlaybackRequiresUserGesture"] =
configuration.mediaPlaybackRequiresUserAction
^
/Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
Classes/MyCookieManager.swift:260:44: error: cannot call value of non-function type 'String?'
domain = domainUrl.host()
^ ~~
/Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
Classes/MyCookieManager.swift:294:44: error: cannot call value of non-function type 'String?'
domain = domainUrl.host()
^ ~~
/Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
Classes/Types/URLCredential.swift:14:25: warning: comparing non-optional value of type '[Any]' to
'nil' always returns true
if certificates != nil {
~~~~~~~~~~~~ ^ ~~~
/Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
Classes/Util.swift:216:21: warning: immutable value 'j' was never used; consider replacing with '_'
or removing it
for j in ipv6.count...8 {
^
_
/Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
Classes/InAppBrowser/InAppBrowserWebViewController.swift:562:13: warning: setter for 'statusBarStyle'
was deprecated in iOS 9.0: Use -[UIViewController preferredStatusBarStyle]
UIApplication.shared.statusBarStyle = UIStatusBarStyle(rawValue: previousStatusBarStyle)!
^
/Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
Classes/InAppWebView/InAppWebView.swift:521:31: warning: 'mediaPlaybackRequiresUserAction' was
deprecated in iOS 9.0
configuration.mediaPlaybackRequiresUserAction =
options.mediaPlaybackRequiresUserGesture
^
/Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
Classes/InAppWebView/InAppWebView.swift:932:31: warning: 'mediaPlaybackRequiresUserAction' was
deprecated in iOS 9.0
configuration.mediaPlaybackRequiresUserAction =
newOptions.mediaPlaybackRequiresUserGesture
^
/Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
Classes/InAppWebView/InAppWebViewOptions.swift:103:81: warning: 'mediaPlaybackRequiresUserAction' was
deprecated in iOS 9.0
realOptions["mediaPlaybackRequiresUserGesture"] =
configuration.mediaPlaybackRequiresUserAction
^
/Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
Classes/MyCookieManager.swift:260:44: error: cannot call value of non-function type 'String?'
domain = domainUrl.host()
^ ~~
/Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
Classes/MyCookieManager.swift:294:44: error: cannot call value of non-function type 'String?'
domain = domainUrl.host()
^ ~~
/Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
Classes/Types/URLCredential.swift:14:25: warning: comparing non-optional value of type '[Any]' to
'nil' always returns true
if certificates != nil {
~~~~~~~~~~~~ ^ ~~~
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements
use a placeholder team ID. To resolve this, select a development team in the Runner editor. (in
target 'Runner' from project 'Runner')
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.
the package i'm using is youtube_player_flutter: ^8.0.0. the message indicates to in app web view.
if #available(iOS 10.0, *) {
configuration.ignoresViewportScaleLimits = options.ignoresViewportScaleLimits
var dataDetectorTypes = WKDataDetectorTypes.init(rawValue: 0)
for type in options.dataDetectorTypes {
let dataDetectorType = Util.getDataDetectorType(type: type)
dataDetectorTypes = WKDataDetectorTypes(rawValue: dataDetectorTypes.rawValue | dataDetectorType.rawValue)
}
configuration.dataDetectorTypes = dataDetectorTypes
configuration.mediaTypesRequiringUserActionForPlayback = options.mediaPlaybackRequiresUserGesture ? .all : []
} else {
// Fallback on earlier versions
configuration.mediaPlaybackRequiresUserAction = options.mediaPlaybackRequiresUserGesture
}
and in app web view options
if #available(iOS 10.0, *) {
realOptions["mediaPlaybackRequiresUserGesture"] = configuration.mediaTypesRequiringUserActionForPlayback == .all
realOptions["ignoresViewportScaleLimits"] = configuration.ignoresViewportScaleLimits
realOptions["dataDetectorTypes"] = Util.getDataDetectorTypeString(type: configuration.dataDetectorTypes)
} else {
realOptions["mediaPlaybackRequiresUserGesture"] = configuration.mediaPlaybackRequiresUserAction
}
i uncommented the platform: ios, '9.0' and replace at the end with
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
replacing these worked the other error (which is not included in this question) but it doesn't seem to work for these. how can i fix this? i haven't used xcode before so.
my flutter doctor
[✓] Flutter (Channel stable, 2.5.3, on Mac OS X 10.15.7 19H15 darwin-x64, locale en-ET)
• Flutter version 2.5.3 at /Users/mobix/Development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 18116933e7 (1 year ago), 2021-10-15 10:46:35 -0700
• Engine revision d3ea636dc5
• Dart version 2.14.4
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
• Android SDK at /Users/mobix/Library/Android/sdk
• Platform android-32, build-tools 32.1.0-rc1
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2020.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
[✓] VS Code (version 1.72.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.50.0
[✓] Connected device (2 available)
• iPhone 12 Pro Max (mobile) • 63C29DC5-CD5A-411A-9BAA-C55FA3ED65B3 • ios •
com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
• Chrome (web) • chrome • web-javascript • Google Chrome
106.0.5249.119
• No issues found!
thanks in advance

I'm facing this issue since last 2 days.
You don't need to download the X-code-14 version.
just open X-code and run the project it's showing an error then click on the
error and tap fix.

If you cannot have update the Xcode just replace every part of code inside ios/Classes/MyCookieManager.swift:
if #available(iOS 16.0, *) {
domain = domainUrl.host()
} else {
domain = domainUrl.host
}
with
domain = domainUrl.host

You just need to update your xcode version to 14 and that's all :)
https://github.com/pichillilorenzo/flutter_inappwebview/issues/1369
Here is the reference.

Related

Unable to set up razorpay payment gateway for ios flutter

I have successfully implemented razorpay plugin for android. But I couldn’t find a way to run on iOS simulator throwing the error.
Failed to build iOS app
Error output from Xcode build:
↳
objc[46285]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libamsupport.dylib (0x212eb7130) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x10679c2c8). One of the two will be used. Which one is undefined.
objc[46285]: Class AMSupportURLSession is implemented in both /usr/lib/libamsupport.dylib (0x212eb7180) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x10679c318). One of the two will be used. Which one is undefined.
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/q1/bn7h2y0j58ngn7rb80fr1yhh0000gn/T/flutter_tools.u4wUAC/flutter_ios_build_temp_dirOLb14O/temporary_xcresult_bundle
Command CompileSwiftSources failed with a nonzero exit code
Command CompileSwiftSources failed with a nonzero exit code
ld: warning: all bitcode will be dropped because '/Users/devytpl/Downloads/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-arm64_x86_64-simulator/Flutter.framework/Flutter' was built without bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target.
Command CompileSwiftSources failed with a nonzero exit code
ld: warning: all bitcode will be dropped because '/Users/devytpl/Downloads/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-arm64_x86_64-simulator/Flutter.framework/Flutter' was built without bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target.
/Users/devytpl/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/razorpay_flutter-1.3.2/ios/Classes/RazorpayDelegate.swift:2:8: error: module 'Razorpay' was created for incompatible target arm64-apple-ios10.0: /Users/devytpl/Dev/Applications/ios/Pods/razorpay-pod/Pod/Razorpay.framework/Modules/Razorpay.swiftmodule/arm64.swiftmodule
import Razorpay
^
/Users/devytpl/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/razorpay_flutter-1.3.2/ios/Classes/RazorpayDelegate.swift:2:8: error: module 'Razorpay' was created for incompatible target arm64-apple-ios10.0: /Users/devytpl/Dev/Applications/ios/Pods/razorpay-pod/Pod/Razorpay.framework/Modules/Razorpay.swiftmodule/arm64.swiftmodule
import Razorpay
^
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
/Users/devytpl/Dev/Applications/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator 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 'Toast' from project 'Pods')
/Users/devytpl/Dev/Applications/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator 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')
Result bundle written to path:
/var/folders/q1/bn7h2y0j58ngn7rb80fr1yhh0000gn/T/flutter_tools.u4wUAC/flutter_ios_build_temp_dirOLb14O/temporary_xcresult_bundle
Uncategorized (Xcode): Command CompileSwiftSources failed with a nonzero exit code
Swift Compiler Error (Xcode): Module 'Razorpay' was created for incompatible target arm64-apple-ios10.0: /Users/devytpl/Dev/Applications/ios/Pods/razorpay-pod/Pod/Razorpay.framework/Modules/Razorpay.swiftmodule/arm64.swiftmodule
/Users/devytpl/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/razorpay_flutter-1.3.2/ios/Classes/RazorpayDelegate.swift:1:7
Could not build the application for the simulator.
Error launching application on iPhone 13.
Flutter Version: 3.0.5
Target Platform: 10.0

Cann't run the app from android studio but it run by Xcode normally

after I did integrate google maps flutter I couldn't run the by android studio but it runs successfully by the Xcode
Error output from Xcode build:
objc[16091]: Class AMSupportURLConnectionDelegate is implemented in both /usr/Lib/Libamsupport.dylib
(0x1ee18f130) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice
„framework/Versions/A/MobiLeDevice (ex1067bc2c8). One of the two will be used. Which one is undefined.
objc(16091]: Class AMSupportURLSession is implemented in both /us/Lib/Libamsupport.dylib (Oxlee18f180) and
/Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice(0x1067bc318)
One of the two will be used. Which one is undefined.
** BUILD FAILED **
Flutter Performance
Flutter Outine
Flutter Inspector
E TODO
Xcode's output:
Ld: building for 10S Simulator, but Linking in object file built for 10S, file
"/Users/hamada/StudioProjects/3XTravel/ios/Pods/GoogLeMaps/Maps/Frameworks/GoogLeMaps.framework/GoogleMaps'
for architecture arm64
clang: error: Linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: PLanning
note: Build preparation complete
note: Building targets in dependency order
/Users/hamada/StudioProjects/3X Travel/ios/Pods/Pods.xcodeproi: warning: The iOS Simulator 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
"FMDB" from project
Pods")
/Users/hamada/StudioProjects/3X Travel/ios/Pods/Pods.xcodeproj: warning: The 10S Simulator depLoyment

Flutter iOS build failed after Flutter 1.22 upgrade

I just upgraded my Flutter version to 1.22.0. After upgrading and making some changes for Firebase my Android app started working, but I am unable to build and run the iOS app on emulator or on physical device.
The terminal shows the following errors when I try to run the app in the emulator or physical device. The emulator runs on iOS 14 and the physical device is on 14.0.1.
Emulator: ld: symbol(s) not found for architecture x86_64
Actual device: ld: symbol(s) not found for architecture arm64
I also executed the following commands but still not working...
flutter clean && \
rm ios/Podfile ios/Podfile.lock pubspec.lock && \
rm -rf ios/Pods ios/Runner.xcworkspace && \
flutter run
Flutter Doctor:
[✓] Flutter (Channel stable, 1.22.0, on Mac OS X 10.15.7 19H2, locale en-US)
• Flutter version 1.22.0 at /Volumes/demouser/Flutter/FlutterSDK/flutter
• Framework revision d408d302e2 (7 days ago), 2020-09-29 11:49:17 -0700
• Engine revision 5babba6c4d
• Dart version 2.10.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/demouserdemouser/Library/Android/sdk
• Platform android-29, build-tools 29.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.0.1, Build version 12A7300
• CocoaPods version 1.9.3
[✓] Android Studio (version 4.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 49.0.2
• Dart plugin version 193.7547
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] VS Code (version 1.49.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.14.1
[✓] Connected device (1 available)
• AOSP on IA Emulator (mobile) • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
• No issues found!
pubspec.yaml
name: demo
description: demo
version: 1.0.0+1
environment:
sdk: ">=2.5.2 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.0
firebase_auth: ^0.18.1+1
cloud_firestore: ^0.14.1+2
firebase_messaging: ^6.0.16
firebase_storage: ^5.0.0-dev.2
firebase_core: ^0.5.0
firebase_admob: ^0.10.0+1
intl_translation: ^0.17.10+1
http: ^0.12.2
xml: ^4.5.1
shared_preferences: ^0.5.12
flutter_staggered_grid_view: ^0.3.0
flutter_signin_button: ^1.0.0
image_picker: ^0.6.7+11
mlkit: ^0.15.1
cached_network_image: ^2.3.2+1
permission_handler: ^5.0.1+1
url_launcher: ^5.7.2
share: ^0.6.5+2
simple_connectivity: ^0.1.1
us_states: ^1.0.3
cloud_functions: ^0.6.0+1
email_validator: ^1.0.4
package_info: ^0.4.3
device_info: ^0.4.2+8
expandable: ^4.1.4
launch_review: ^2.0.0
xml2json: ^4.4.0
purchases_flutter: ^1.3.1
dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons: ^0.7.5
flutter_icons:
image_path: "icon/new_icon.png"
android: false
ios: true
Terminal's output:
> Launching lib/main.dart on physical iPhone in debug mode...
> Automatically signing iOS for device deployment using specified
> development team in Xcode project: 5ABCDEFG9 Running Xcode build...
> Xcode build done. 118.3s
> Failed to build iOS app Error output from Xcode build: ↳
> 2020-10-06 10:59:58.676 xcodebuild[7528:47880] DTDeviceKit: deviceType from a578d1d6cb0d414525f7dc4c6cee was NULL
> 2020-10-06 10:59:58.778 xcodebuild[7528:47881] DTDeviceKit: deviceType from a578d1d6cb0d414525f7dc4c6cee was NULL
> 2020-10-06 10:59:58.778 xcodebuild[7528:47881] DTDeviceKit: deviceType from a578d1d6cb0d414525f7dc4c6cee was NULL
> ** BUILD FAILED **
Xcode's output:
↳
/Volumes/driveD/Flutter/FlutterSDK/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.7.2/ios/Classes/FLTURLLauncherPlugin.m:153:57: warning: 'keyWindow' is deprecated: first deprecated in iOS 13.0 - Should not be used for applications that support multiple scenes as it returns a key window across all connected scenes [-Wdeprecated-declarations]
.keyWindow.rootViewController];
^
In module 'UIKit' imported from /Volumes/driveD/projects/new/demo/ios/Pods/Target Support Files/url_launcher/url_launcher-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:134:51: note: 'keyWindow' has been explicitly marked deprecated here
#property(nullable, nonatomic,readonly) UIWindow *keyWindow API_DEPRECATED("Should not be used for applications that support multiple scenes as it returns a key window across all connected scenes", ios(2.0, 13.0));
-------
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the precompiled application for the device.
Error launching application on physical’s iPhone.
It looks like this problem is coming due to RevenueCat API. When I comment out the import purchases_flutter in the pubspec.yaml file then I am able to install the app but it crashes at startup saying connection lost.
rm -f ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings fixed the issue for me
There are a couple of different answers for this here on stackoverflow. If I am not mistaken, the switch to channel "stable" solved the issue for me, last time.
I have a similar erro
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
I also having problems after I upgrade to 1.22.0, I had to also upgrade the flutterFire package, and that seems to be my problem.
the versions that I'm using on pubspec.yaml:
firebase_core: ^0.5.0
cloud_firestore: ^0.14.1+2
firebase_auth: ^0.18.1+1
firebase_analytics: ^5.0.0
cloud_functions: ^0.6.0+1
firebase_storage: ^4.0.1
firebase_crashlytics: ^0.1.0+3
firebase_messaging: ^7.0.2
when trying to run it says to update the CocoaPods spec by running pod repo update, done that, but still got the same error, then running pod install or pod update got the error
tried the commands: pod install --repo-update and pod update Firebase/Storage but still got the same error message
Just remove old flutter installed folder like [.cache] / [pub-cache] because you might have upgraded the flutter version but iOStools and other tools are pointing to older version and it causes these architecture issue.
Finally after doing lot of changes, I found out that the culprit was the purchases_flutter: ^1.3.1 package.
When I remove the package from my yaml file then it starts working. There is a bug already opened for it https://github.com/RevenueCat/purchases-flutter/issues/120.
Thank you every one for your time and help.

fatal error: 'FlutterAppDelegate.h' file not found

I cannot run Flutter for iOS simulator, I use iPhone XS Simulator. There is nothing issue when I run with Android Emulator.
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
While building module 'Flutter' imported from /Users/user/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/connectivity-0.4.8+1/ios/Classes/FLTConnectivityPlugin.h:5:
In file included from <module-includes>:1:
/Users/user/AndroidStudioProjects/app/ios/Pods/../Flutter/Flutter.framework/Headers/Flutter.h:54:10: fatal error: 'FlutterAppDelegate.h' file not found
#include "FlutterAppDelegate.h"
^~~~~~~~~~~~~~~~~~~~~~
1 error generated.
In file included from /Users/user/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/connectivity-0.4.8+1/ios/Classes/FLTConnectivityPlugin.m:5:
/Users/user/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/connectivity-0.4.8+1/ios/Classes/FLTConnectivityPlugin.h:5:9: fatal error: could not build module 'Flutter'
#import <Flutter/Flutter.h>
~~~~~~~^
2 errors generated.
Could not build the application for the simulator.
Error launching application on iPhone Xs.
This is flutter doctor detail.
[✓] Flutter (Channel beta, v1.14.6, on Mac OS X 10.14.6 18G87, locale en-ID)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
[✓] Android Studio (version 3.4)
[✓] VS Code (version 1.43.2)
[✓] Connected device (1 available)
Anyone can help me? thank you...

Flutter plugin configuration issue

I am working on a flutter project which uses local database. For local database I am using sqflite plugin https://pub.dartlang.org/packages/sqflite. My application is working fine without installing sqflite. However, as soon as I install sqflite. It stops running for ios. I am receiving below errors.
import
1 error generated.
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
In file included from /Users/user/Documents/DEVELOPMENT/Flutter_Dev/Flutter_project/FlutterDatabaseSQFLite-master/ios/Runner/AppDelegate.m:1:
/Users/user/Documents/DEVELOPMENT/Flutter_Dev/Flutter_project/FlutterDatabaseSQFLite-master/ios/Runner/AppDelegate.h:2:9: fatal error: 'Flutter/Flutter.h' file not found
import
^~~~~~~~~~~~~~~~~~~
1 error generated.
/Users/user/Documents/DEVELOPMENT/Flutter_Dev/Flutter_project/FlutterDatabaseSQFLite-master/ios/Runner/main.m:2:9: fatal error: 'Flutter/Flutter.h' file not found
import
^~~~~~~~~~~~~~~~~~~
1 error generated.
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
ld: file not found: /Users/user/Library/Developer/Xcode/DerivedData/Runner-ctqhqjwcexxoquevqxydctpmagio/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Objects-normal/x86_64/AppDelegate.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Could not build the application for the simulator.
Error launching application on iPhone 8 Plus.
. And the strange thing is after this error, if I create new project of flutter it gives me below error.
/Users/user/Documents/DEVELOPMENT/Flutter_Dev/Flutter_project/local_db/ios/Runner/AppDelegate.h:1:9: fatal error: 'Flutter/Flutter.h' file not found import ^~~~~~~~~~~~~~~~~~~ 1 error generated. === BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug === /Users/user/Documents/DEVELOPMENT/Flutter_Dev/Flutter_project/local_db/ios/Runner/main.m:1:9: fatal error: 'Flutter/Flutter.h' file not found #import ^~~~~~~~~~~~~~~~~~~ 1 error generated. === BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug === In file included from /Users/user/Documents/DEVELOPMENT/Flutter_Dev/Flutter_project/local_db/ios/Runner/GeneratedPluginRegistrant.m:5: /Users/user/Documents/DEVELOPMENT/Flutter_Dev/Flutter_project/local_db/ios/Runner/GeneratedPluginRegistrant.h:8:9: fatal error: 'Flutter/Flutter.h' file not found #import ^~~~~~~~~~~~~~~~~~~ 1 error generated. === BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug === ld: file not found: /Users/user/Library/Developer/Xcode/DerivedData/Runner-eqhuhphzvosrgvdilnpudqzvakju/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Objects-normal/x86_64/AppDelegate.o clang: error: linker command failed with exit code 1 (use -v to see invocation) Could not build the application for the simulator. Error launching application on iPhone 8 Plus.
And the application stops working. Here is the output of flutter doctor command.
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v0.8.7-pre.6, on Mac OS X 10.14 18A384a, locale en-IN)
[!] Android toolchain - develop for Android devices (Android SDK 28.0.2)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] iOS toolchain - develop for iOS devices (Xcode 9.3)
[✓] Android Studio (version 3.1)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.27.2)
[✓] Connected devices (1 available)
Please help me in this. Thanks in advance.
Try changing the Flutter channel from Master to Beta
In the terminal open the flutter directory and set the export path the type
flutter channel beta

Resources