You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My Project runs FINE through X-Code, it means I got no errors while running the project from the Xcode's Run Project button. It compiles and runs fine on the device, but without the Hot Reload feature (obviously).
When trying to run it on Intellij, I get this error:
=== BUILD TARGET Runner OF PROJECT Runner WITH THE DEFAULT CONFIGURATION (Debug) ===
/Users/danieloliveira/Documents/flutter_projects/mydenox_flutter/ios/Runner/GeneratedPluginRegistrant.m:6:9: fatal error: 'camera/CameraPlugin.h' file not found
#import <camera/CameraPlugin.h>
^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Could not build the precompiled application for the device.
Error launching application on iPhone de Gabriel.
The projects uses a lot of Plugins, some I wrote myself.
Again: It runs FINE through X-Code!!
[✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Mac OS X 10.14.4 18E226, locale en-BR)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.2)
[✓] Android Studio (version 3.2)
[✓] IntelliJ IDEA Community Edition (version 2018.2.5)
[✓] Connected device (1 available)
Updated to flutter 1.9 stable and still can't compile outside xcode.
The errors seem to changed a bit:
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
/Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/speech_recognition-0.3.0+1/ios/Classes/SpeechRecognitionPlugin.m:6:4: warning: 'SwiftSpeechRecognitionPlugin' is only available on iOS 10.0 or newer [-Wunguarded-availability]
[SwiftSpeechRecognitionPlugin registerWithRegistrar:registrar];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/speech_recognition-0.3.0+1/ios/Classes/SpeechRecognitionPlugin.m:2:
/Users/danieloliveira/Documents/flutter_projects/mydenox_flutter/build/ios/Release-iphoneos/speech_recognition/speech_recognition.framework/Headers/speech_recognition-Swift.h:194:12: note: 'SwiftSpeechRecognitionPlugin' has been marked as being introduced in iOS 10.0 here, but the deployment target is iOS 8.0.0
@interface SwiftSpeechRecognitionPlugin : NSObject <FlutterPlugin, SFSpeechRecognizerDelegate>
^
/Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/speech_recognition-0.3.0+1/ios/Classes/SpeechRecognitionPlugin.m:6:4: note: enclose 'SwiftSpeechRecognitionPlugin' in an @available check to silence this warning
[SwiftSpeechRecognitionPlugin registerWithRegistrar:registrar];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
/Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.6.2+1/ios/Classes/SharePlugin.m:35:11: warning: variable 'originRect' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (originX != nil && originY != nil && originWidth != nil && originHeight != nil) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.6.2+1/ios/Classes/SharePlugin.m:43:26: note: uninitialized use occurs here
atSource:originRect];
^~~~~~~~~~
/Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.6.2+1/ios/Classes/SharePlugin.m:35:7: note: remove the 'if' if its condition is always true
if (originX != nil && originY != nil && originWidth != nil && originHeight != nil) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.6.2+1/ios/Classes/SharePlugin.m:35:11: warning: variable 'originRect' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
if (originX != nil && originY != nil && originWidth != nil && originHeight != nil) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.6.2+1/ios/Classes/SharePlugin.m:43:26: note: uninitialized use occurs here
atSource:originRect];
^~~~~~~~~~
/Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.6.2+1/ios/Classes/SharePlugin.m:35:11: note: remove the '&&' if its condition is always true
if (originX != nil && originY != nil && originWidth != nil && originHeight != nil) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.6.2+1/ios/Classes/SharePlugin.m:35:11: warning: variable 'originRect' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
if (originX != nil && originY != nil && originWidth != nil && originHeight != nil) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.6.2+1/ios/Classes/SharePlugin.m:43:26: note: uninitialized use occurs here
atSource:originRect];
^~~~~~~~~~
/Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.6.2+1/ios/Classes/SharePlugin.m:35:11: note: remove the '&&' if its condition is always true
if (originX != nil && originY != nil && originWidth != nil && originHeight != nil) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.6.2+1/ios/Classes/SharePlugin.m:35:11: warning: variable 'originRect' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
if (originX != nil && originY != nil && originWidth != nil && originHeight != nil) {
^~~~~~~~~~~~~~
/Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.6.2+1/ios/Classes/SharePlugin.m:43:26: note: uninitialized use occurs here
atSource:originRect];
^~~~~~~~~~
/Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.6.2+1/ios/Classes/SharePlugin.m:35:11: note: remove the '&&' if its condition is always true
if (originX != nil && originY != nil && originWidth != nil && originHeight != nil) {
^~~~~~~~~~~~~~~~~
/Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.6.2+1/ios/Classes/SharePlugin.m:34:7: note: variable 'originRect' is declared here
CGRect originRect;
^
4 warnings generated.
In file included from /Users/danieloliveira/Documents/flutter_projects/mydenox_flutter/ios/Pods/Mantle/Mantle/NSValueTransformer+MTLPredefinedTransformerAdditions.m:10:
/Users/danieloliveira/Documents/flutter_projects/mydenox_flutter/ios/Pods/Mantle/Mantle/MTLJSONAdapter.h:223:27: warning: '@endcode' command does not terminate a verbatim text block [-Wdocumentation]
/// If `objCType` matches @encode(id), the value transformer returned by
^~~~~~~
/Users/danieloliveira/Documents/flutter_projects/mydenox_flutter/ios/Pods/Mantle/Mantle/MTLJSONAdapter.h:226:65: warning: '@endcode' command does not terminate a verbatim text block [-Wdocumentation]
/// The default implementation transforms properties that match @encode(BOOL)
^~~~~~~
/Users/danieloliveira/Documents/flutter_projects/mydenox_flutter/ios/Pods/Mantle/Mantle/MTLJSONAdapter.h:230:47: warning: '@endcode' command does not terminate a verbatim text block [-Wdocumentation]
/// as it would be returned by the @encode() directive.
^~~~~~~
3 warnings generated.
In file included from /Users/danieloliveira/Documents/flutter_projects/mydenox_flutter/ios/Pods/Mantle/Mantle/NSDictionary+MTLJSONKeyPath.m:11:
/Users/danieloliveira/Documents/flutter_projects/mydenox_flutter/ios/Pods/Mantle/Mantle/MTLJSONAdapter.h:223:27: warning: '@endcode' command does not terminate a verbatim text block [-Wdocumentation]
/// If `objCType` matches @encode(id), the value transformer returned by
^~~~~~~
/Users/danieloliveira/Documents/flutter_projects/mydenox_flutter/ios/Pods/Mantle/Mantle/MTLJSONAdapter.h:226:65: warning: '@endcode' command does not terminate a verbatim text block [-Wdocumentation]
/// The default implementation transforms properties that match @encode(BOOL)
^~~~~~~
/Users/danieloliveira/Documents/flutter_projects/mydenox_flutter/ios/Pods/Mantle/Mantle/MTLJSONAdapter.h:230:47: warning: '@endcode' command does not terminate a verbatim text block [-Wdocumentation]
/// as it would be returned by the @encode() directive.
^~~~~~~
3 warnings generated.
In file included from /Users/danieloliveira/Documents/flutter_projects/mydenox_flutter/ios/Pods/Mantle/Mantle/MTLModel.m:12:
/Users/danieloliveira/Documents/flutter_projects/mydenox_flutter/ios/Pods/Mantle/Mantle/extobjc/EXTScope.h:91:35: warning: this block declaration is not a prototype [-Wstrict-prototypes]
typedef void (^mtl_cleanupBlock_t)();
^
void
1 warning generated.
In file included from /Users/danieloliveira/Documents/flutter_projects/mydenox_flutter/ios/Pods/Mantle/Mantle/MTLModel+NSCoding.m:11:
/Users/danieloliveira/Documents/flutter_projects/mydenox_flutter/ios/Pods/Mantle/Mantle/extobjc/EXTScope.h:91:35: warning: this block declaration is not a prototype [-Wstrict-prototypes]
typedef void (^mtl_cleanupBlock_t)();
^
void
1 warning generated.
4 warnings generated.
In file included from /Users/danieloliveira/Documents/flutter_projects/mydenox_flutter/ios/Pods/Mantle/Mantle/extobjc/EXTScope.m:10:
/Users/danieloliveira/Documents/flutter_projects/mydenox_flutter/ios/Pods/Mantle/Mantle/extobjc/EXTScope.h:91:35: warning: this block declaration is not a prototype [-Wstrict-prototypes]
typedef void (^mtl_cleanupBlock_t)();
^
void
1 warning generated.
12 warnings generated.
/Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-0.6.3/ios/Classes/SYPictureMetadata/SYMetadataTIFF.m:35:65: warning: 'kCGImagePropertyTIFFTileWidth' is only available on iOS 9.0 or newer [-Wunguarded-availability]
SYStringSel(tileWidth): (NSString *)kCGImagePropertyTIFFTileWidth,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In module 'ImageIO' imported from /Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-0.6.3/ios/Classes/SYPictureMetadata/SYMetadataTIFF.m:10:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:146:34: note: 'kCGImagePropertyTIFFTileWidth' has been marked as being introduced in iOS 9.0 here, but the deployment target is iOS 8.0.0
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyTIFFTileWidth IMAGEIO_AVAILABLE_STARTING(10.11, 9.0);
^
/Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-0.6.3/ios/Classes/SYPictureMetadata/SYMetadataTIFF.m:35:65: note: enclose 'kCGImagePropertyTIFFTileWidth' in an @available check to silence this warning
SYStringSel(tileWidth): (NSString *)kCGImagePropertyTIFFTileWidth,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-0.6.3/ios/Classes/SYPictureMetadata/SYMetadataTIFF.m:36:65: warning: 'kCGImagePropertyTIFFTileLength' is only available on iOS 9.0 or newer [-Wunguarded-availability]
SYStringSel(tileLength): (NSString *)kCGImagePropertyTIFFTileLength,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In module 'ImageIO' imported from /Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-0.6.3/ios/Classes/SYPictureMetadata/SYMetadataTIFF.m:10:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:147:34: note: 'kCGImagePropertyTIFFTileLength' has been marked as being introduced in iOS 9.0 here, but the deployment target is iOS 8.0.0
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyTIFFTileLength IMAGEIO_AVAILABLE_STARTING(10.11, 9.0);
^
/Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-0.6.3/ios/Classes/SYPictureMetadata/SYMetadataTIFF.m:36:65: note: enclose 'kCGImagePropertyTIFFTileLength' in an @available check to silence this warning
SYStringSel(tileLength): (NSString *)kCGImagePropertyTIFFTileLength,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
/Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-0.6.3/ios/Classes/SYPictureMetadata/SYMetadataPNG.m:32:61: warning: 'kCGImagePropertyPNGCompressionFilter' is only available on iOS 9.0 or newer [-Wunguarded-availability]
SYStringSel(compressionFilter): (NSString *)kCGImagePropertyPNGCompressionFilter,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In module 'ImageIO' imported from /Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-0.6.3/ios/Classes/SYPictureMetadata/SYMetadataPNG.h:10:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:743:34: note: 'kCGImagePropertyPNGCompressionFilter' has been marked as being introduced in iOS 9.0 here, but the deployment target is iOS 8.0.0
IMAGEIO_EXTERN const CFStringRef kCGImagePropertyPNGCompressionFilter IMAGEIO_AVAILABLE_STARTING(10.11, 9.0);
^
/Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-0.6.3/ios/Classes/SYPictureMetadata/SYMetadataPNG.m:32:61: note: enclose 'kCGImagePropertyPNGCompressionFilter' in an @available check to silence this warning
SYStringSel(compressionFilter): (NSString *)kCGImagePropertyPNGCompressionFilter,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
/Users/danieloliveira/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-0.6.3/ios/Classes/SYPictureMetadata/SYMetadataExif.m:9:9: warning: non-portable path to file '"SYMetadataExif.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#import "SYMetadataEXIF.h"
^~~~~~~~~~~~~~~~~~
"SYMetadataExif.h"
1 warning generated.
/Users/danieloliveira/Documents/flutter_projects/mydenox_flutter/ios/Runner/GeneratedPluginRegistrant.m:6:9: fatal error: 'device_info/DeviceInfoPlugin.h' file not found
#import <device_info/DeviceInfoPlugin.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build systemnote: Planning buildnote: Constructing build description
@OllyDixon thanks for the fast reply! I am also on MacOS 10.15 and the problem still persists... I am using xcode v11.1 and i just updated my iphone to iOS 13.1.3. Was there any additional settings you tried?
I am opening Xcode workspace, Xcode is at version 12.2, I bumped pods dependencies and deployment target to 12.0, and even checked if I added correct keys to Info.plist.
I am using Flutter (Channel stable, 1.22.5, on Mac OS X 10.15.6 19G2021 darwin-x64, locale en-US),
pubspec.lock says that I am using camera "0.7.0+2".
If I run, "flutter build" in cmd line build is working - no errors occur.
If I run "flutter_application_1 % flutter run -d 5e1fe..deviceId", app is running on device (iphone6s).
With VSCode, after clicking on "run" in main.dart, app is also running on device(iOS) even with hot reload.
But If I run the build process via Xcode (I opened .workspace), this error occurs.
I am not sure, how I will build archive for Appstore Connect / Testflight without using Xcode,
& I am not sure if it fails in release mode too.
It seems that I am running debug mode all the time.
Would be nice, if this will be better covered by docs, or solved for once.
@majirosstefan Can you file a new issue since you're not seeing it from the command line, only from Xcode? Please include a full flutter build --verbose log where it's working, and an exported Xcode build logs where it's not working so we can see the linker flags.
I am not sure, how I will build archive for Appstore Connect / Testflight without using Xcode
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
meJevin commentedon Aug 21, 2019
Anybody? This is still an issue
shinayser commentedon Sep 10, 2019
Updated to flutter 1.9 stable and still can't compile outside xcode.
The errors seem to changed a bit:
ollyde commentedon Sep 23, 2019
camera: ^0.5.4+2have the same error. Removinguse_frameworks!gets further but just errors as well. Using Xcode 11.Tried using a fresh project as well, same errors.
4 of our projects are now stuck. We've no idea what to do. Fairly critical that the camera package is not working for iOS release don't you think?
GerGodfrey commentedon Sep 26, 2019
i´ve the same problem 😫
jaweii commentedon Oct 12, 2019
same here
blaqkrow commentedon Oct 21, 2019
@OllyDixon @jaweii @GerGodfrey have you solved the issue? are you running them on devices with iOS 13?
ollyde commentedon Oct 21, 2019
@blaqkrow I had to update to MacOS 10.15. It just seemed to resolve itself when updating to MacOS 15.10 and Flutter 1.9.1+hotfix.4
blaqkrow commentedon Oct 21, 2019
@OllyDixon thanks for the fast reply! I am also on MacOS 10.15 and the problem still persists... I am using xcode v11.1 and i just updated my iphone to iOS 13.1.3. Was there any additional settings you tried?
ollyde commentedon Oct 21, 2019
@blaqkrow no idea, it just seemed to resolve itself when updating to MacOS 15.10 and Flutter 1.9.1+hotfix.4
blaqkrow commentedon Oct 21, 2019
@OllyDixon sorry one last thing, may i know your pubspec.yaml configurations for camera? mine is camera^0.5.6+1
ollyde commentedon Oct 21, 2019
@blaqkrow
camera: ^0.5.4+218 remaining items
ollyde commentedon Feb 9, 2020
@dnfield found a solution.
Inside the Podfile I updated to
platform :ios, '12.0'Upgraded both project and runner for Xcode project to 12.0
Flutter cleanpraveenbbhati commentedon Feb 13, 2020
Xcode version : 11.3.1
Flutter: v1.12.13+hotfix.8
Target: 12.0
camera: ^0.5.7+3
@OllyDixon I'm still getting module 'camera' not found. any fix on this?
ollyde commentedon Feb 13, 2020
@praveenbbhati sorry you're setting are the same as mine. You uncommented the Podfile right?
praveenbbhati commentedon Feb 14, 2020
@OllyDixon this is my Podfile.

is this correct?
10it-lk commentedon Feb 28, 2020
for me camera: ^0.5.4+2 worked with platform :ios, '10.0' only
majirosstefan commentedon Feb 14, 2021
still not fixed.
I am opening Xcode workspace, Xcode is at version 12.2, I bumped pods dependencies and deployment target to 12.0, and even checked if I added correct keys to Info.plist.
I am using Flutter (Channel stable, 1.22.5, on Mac OS X 10.15.6 19G2021 darwin-x64, locale en-US),
pubspec.lock says that I am using camera "0.7.0+2".
If I run, "flutter build" in cmd line build is working - no errors occur.
If I run "flutter_application_1 % flutter run -d 5e1fe..deviceId", app is running on device (iphone6s).
With VSCode, after clicking on "run" in main.dart, app is also running on device(iOS) even with hot reload.
But If I run the build process via Xcode (I opened .workspace), this error occurs.
I am not sure, how I will build archive for Appstore Connect / Testflight without using Xcode,
& I am not sure if it fails in release mode too.
It seems that I am running debug mode all the time.
Would be nice, if this will be better covered by docs, or solved for once.
jmagman commentedon Feb 16, 2021
@majirosstefan Can you file a new issue since you're not seeing it from the command line, only from Xcode? Please include a full

flutter build --verboselog where it's working, and an exported Xcode build logs where it's not working so we can see the linker flags.If you're able to upgrade to the dev or beta channel you can try the
flutter build ipacommand. https://flutter.dev/docs/deployment/ios#create-a-build-archiverchtgpt commentedon Feb 17, 2021
still facing this issue.
jmagman commentedon Feb 17, 2021
@rchtgpt
kunanfo commentedon Feb 27, 2021
After I comment the 'use_frameworks!' in Podfile, finally It works.
ismdcf commentedon Apr 14, 2021
Still experiencing this. Any Idea what should be done. in debug version it builds but when changing the release version it fails
github-actions commentedon Aug 3, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.