简体   繁体   中英

Flutter app not running or building on IOS Emulator

this is my first time using StackOverflow for an actual question so thanks in advance.

I started building Apps (first only for Andoid) using Flutter and i absolutly love it.

After finishing my App and deploying it into the Google Play Store i bought myself a Macbook and i am trying to use that Flutter Code and release it also for App Store.

My Program is using Firebase and i am pretty sure the error is responsible for it, but unfortunatly i am not able to find or fix it.

What have i done already? I did the full Firebase Setup for IOS, which means downloading the google Services File and placing it unter the first Runner section in xcode.

I also did set the rest that firebase told me up. (pod install etc.)

The App is running completly fine on Android Emulator but it is not launching on IOS Emulator.

I am using VSCode.

In Code itself i dont have any Errors.

Also i have changed the minimum version in the Pods (first line) to 10.12. Otherwise i couldnt have loaded thes necessary pods.

Error Code on building:

Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
 lib/main.dart
Xcode build done.                                           346,1s
Failed to build iOS app
Error output from Xcode build:
↳
    * BUILD FAILED *
Xcode's output:
↳
    While building module 'firebase_core' imported from /usr/local/Caskroom/flutter/1.22.6/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.16.0/ios/Classes/FLTTransactionStreamHandler.m:6:
    In file included from <module-includes>:1:
    In file included from /Users/fabianschimpfhauser/Desktop/WhoWouldrather/whowouldrather/ios/Pods/Target Support Files/firebase_core/firebase_core-umbrella.h:13:
    In file included from //usr/local/Caskroom/flutter/1.22.6/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.7.0/ios/Classes/FLTFirebaseCorePlugin.h:11:
    //usr/local/Caskroom/flutter/1.22.6/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.7.0/ios/Classes/FLTFirebasePlugin.h:9:9: error: include of non-modular header inside framework module 'firebase_core.FLTFirebasePlugin': '/Users/fabianschimpfhauser/Desktop/WhoWouldrather/whowouldrather/ios/Pods/Headers/Public/FirebaseCore/FirebaseCore.h' [-Werror,-Wnon-modular-include-in-framework-module]
    #import <FirebaseCore/FirebaseCore.h>
            ^
    1 error generated.
    /usr/local/Caskroom/flutter/1.22.6/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.16.0/ios/Classes/FLTTransactionStreamHandler.m:6:9: fatal error: could not build module 'firebase_core'
    #import <firebase_core/FLTFirebasePluginRegistry.h>
     ~~~^
    2 errors generated.
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description
    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 14.4.99. (in target 'leveldb-library' from project 'Pods')
    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 14.4.99. (in target 'shared_preferences' from project 'Pods')
    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 14.4.99. (in target 'in_app_purchase' from project 'Pods')
    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 14.4.99. (in target 'gRPC-C++-gRPCCertificates-Cpp' from project 'Pods')
    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 14.4.99. (in target 'abseil' from project 'Pods')
    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 14.4.99. (in target 'BoringSSL-GRPC' from project 'Pods')
    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 14.4.99. (in target 'gRPC-Core' from project 'Pods')
    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 14.4.99. (in target 'gRPC-C++' from project 'Pods')
    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')
    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 14.4.99. (in target 'Flutter' from project 'Pods')
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.
Exited (sigterm)

Edit: Added Screenshot

Screenshot from Flutter Doctor

Edit2: Screenshot from X-Code Builder ErrorLog

So, my assumption is:

1 Error: We can see some errors with the Firebase package, but it shouldn't influence on Emulator 2 Error: this one looks like the main reason for your pain 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')

It means you have to open your project in the Code and try this solution:

Go to Xcode preferences -> accounts and sign in to your Apple account and go to your Xcode project and signing & capabilities and choose your account.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM