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...
Related
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.
This is happening with my HomewidgetExtension target (as I checked in Xcode) which I implemented using home_widget plugin.
I tried pod deintegrate/install/update, deleting and restoring flutter, flutter upgrade etc but it was not helpful.
Flutter version:2.10.3
Xcode version: 13.3
macOS Monterey
Please help me.
flutter run results:
`Launching lib/main.dart on iPhone SE (3rd generation) in debug mode...
Running pod install...
Running Xcode build...
Xcode build done. 42.5s
Failed to build iOS app
Error output from Xcode build:
↳
2022-03-28 20:49:33.569 xcodebuild[5209:41927] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-03-28 20:49:33.569 xcodebuild[5209:41927] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/v5/kpr5p68x3pq_y1zffc3fycq00000gn/T/flutter_tools.DnSqEu/flutter_ios_build_temp_dirDdzw4s/temporary_xcresult_bundle
ld: framework not found Flutter
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
Error (Xcode): Framework not found Flutter
Could not build the application for the simulator.
Error launching application on iPhone SE (3rd generation).`
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.
I am new for flutter. My simple app running in Android device without any issue and also running in iOS device when I run it from Xcode but when I try to run in iOS device from either Android Studio or Visual Code it shows following errors
Launching lib/main.dart on Shafraz Buhary’s iPhone in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: 836SQ257Z6
Running Xcode build...
Xcode build done. 6.1s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
While building module 'Flutter' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:
While building module 'UIKit' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
While building module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:109:12: error: attributes may not be specified on a category
#interface NSArray<ObjectType> (NSArrayDiffing)
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:196:12: error: attributes may not be specified on a category
#interface NSMutableArray<ObjectType> (NSMutableArrayDiffing)
^
While building module 'Flutter' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:
While building module 'UIKit' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
While building module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:48:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSKeyValueCoding.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSOrderedSet.h:112:12: error: attributes may not be specified on a category
#interface NSOrderedSet<ObjectType> (NSOrderedSetDiffing)
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSOrderedSet.h:187:12: error: attributes may not be specified on a category
#interface NSMutableOrderedSet<ObjectType> (NSMutableOrderedSetDiffing)
^
4 errors generated.
While building module 'Flutter' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:
While building module 'UIKit' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
In file included from <module-includes>:1:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8:9: fatal error: could not build module 'Foundation'
#import <Foundation/Foundation.h>
~~~~~~~^
While building module 'Flutter' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:
While building module 'UIKit' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
While building module 'QuartzCore' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:10:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h:9:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CoreAnimation.h:10:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CATransform3D.h:12:9: fatal error: could not build module 'Foundation'
#import <Foundation/NSValue.h>
~~~~~~~^
While building module 'Flutter' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:
While building module 'UIKit' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
While building module 'QuartzCore' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:10:
While building module 'OpenGLES' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAEAGLLayer.h:7:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/EAGLDrawable.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/EAGL.h:8:10: fatal error: could not build module 'Foundation'
#include <Foundation/Foundation.h>
~~~~~~~~^
While building module 'Flutter' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:
While building module 'UIKit' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
While building module 'QuartzCore' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:10:
While building module 'OpenGLES' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAEAGLLayer.h:7:
While building module 'IOSurface' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/EAGLIOSurface.h:13:
In file included from <module-includes>:3:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceObjC.h:15:9: fatal error: could not build module 'Foundation'
#import <Foundation/Foundation.h>
~~~~~~~^
1 error generated.
2 errors generated.
While building module 'Flutter' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:
While building module 'UIKit' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
While building module 'QuartzCore' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:10:
While building module 'Metal' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAMetalLayer.h:7:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.h:9:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h:8:9: fatal error: could not build module 'Foundation'
#import <Foundation/Foundation.h>
~~~~~~~^
1 error generated.
4 errors generated.
While building module 'Flutter' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:
While building module 'UIKit' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
While building module 'CoreImage' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIColor.h:13:
In file included from <module-includes>:1:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.h:9:9: fatal error: could not build module 'Foundation'
#import <Foundation/Foundation.h>
~~~~~~~^
While building module 'Flutter' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:
While building module 'UIKit' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
While building module 'CoreImage' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIColor.h:13:
While building module 'CoreVideo' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIImage.h:10:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CoreVideo.h:29:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVPixelBuffer.h:462:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVPixelBufferIOSurface.h:26:10: fatal error: could not build module 'IOSurface'
#include <IOSurface/IOSurfaceRef.h>
~~~~~~~~^
1 error generated.
2 errors generated.
While building module 'Flutter' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:
While building module 'UIKit' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
While building module 'FileProvider' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/NSFileProviderExtension.h:15:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/FileProvider.framework/Headers/FileProvider.h:15:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/FileProvider.framework/Headers/NSFileProviderDomain.h:8:9: fatal error: could not build module 'Foundation'
#import <Foundation/Foundation.h>
~~~~~~~^
1 error generated.
While building module 'Flutter' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:
While building module 'UIKit' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:
While building module 'UserNotifications' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UNNotificationResponse+UIKitAdditions.h:10:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UserNotifications.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/NSString+UserNotifications.h:8:9: fatal error: could not build module 'Foundation'
#import <Foundation/Foundation.h>
~~~~~~~^
1 error generated.
13 errors generated.
While building module 'Flutter' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:
In file included from <module-includes>:1:
In file included from /Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/Flutter.h:54:
/Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:8:9: fatal error: could not build module 'UIKit'
#import <UIKit/UIKit.h>
~~~~~~~^
While building module 'Flutter' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:
While building module 'CoreMedia' imported from /Volumes/Data/RnD/flutter/flutter_book/ios/Flutter/Flutter.framework/Headers/FlutterTexture.h:8:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/CoreMedia.framework/Headers/CoreMedia.h:15:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/System/Library/Frameworks/CoreMedia.framework/Headers/CMFormatDescription.h:29:10: fatal error: could not build module 'CoreVideo'
#include <CoreVideo/CoreVideo.h>
~~~~~~~~^
1 error generated.
15 errors generated.
In file included from /Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.m:5:
/Volumes/Data/RnD/flutter/flutter_book/ios/Runner/GeneratedPluginRegistrant.h:8:9: fatal error: could not build module 'Flutter'
#import <Flutter/Flutter.h>
~~~~~~~^
16 errors generated.
note: Using new build system
note: Planning build
note: Constructing build description
Could not build the precompiled application for the device.
Error launching application on Shafraz Buhary’s iPhone.
When I run flutter doctor -v it shows everything is ok
[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.15.2 19C57, locale en-LK)
• Flutter version 1.12.13+hotfix.5 at /Library/Frameworks/flutter
• Framework revision 27321ebbad (6 weeks ago), 2019-12-10 18:15:01 -0800
• Engine revision 2994f7e1e6
• Dart version 2.7.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Library/Frameworks/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• 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_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.3.1, Build version 11C504
• CocoaPods version 1.8.4
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 42.1.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.2.3)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin version 40.2.4
• Dart plugin version 192.6817.14
[✓] VS Code (version 1.41.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.7.1
[✓] VS Code (version 1.41.1)
• VS Code at /Users/shafraz/Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.7.1
[✓] Connected device (1 available)
• Shafraz Buhary’s iPhone • bb37XXXXXXc167be5XXXXXX48d70136c2XXXXXX • ios • iOS 13.3
• No issues found!
How can I fix this?
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