I did an app in android, now trying to run it in ios. I am getting the bellow error
Xcode build done. 35.2s
Configuring the default Firebase app...
Configured the default Firebase app __FIRAPP_DEFAULT.
6.34.0 - [Firebase/Core][I-COR000004] App with name __FIRAPP_DEFAULT does not exist.
6.34.0 - [Firebase/Analytics][I-ACS023007] Analytics v.60900000 started
6.34.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see ....)
Waiting for iPhone 11 to report its views... 4ms
6.34.0 - [Firebase/Analytics][I-ACS025036] App Delegate Proxy is disabled
Lost connection to device.
Syncing files to device iPhone 11...
(This is taking an unexpectedly long time.)
I have other ios apps which are running perfect.
Running flutter doctor shows this
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.4, on macOS 11.0.1 20B50 darwin-x64, locale
en-GB)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
! Some Android licenses not accepted. To resolve this, run: flutter doctor
--android-licenses
[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
[!] Android Studio (version 3.1)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] Connected device (1 available)
! Doctor found issues in 2 categories.
Edit = Removed firebase
I removed the firebase thing and getting a plain message like this
Running pod install... 3.0s
Running Xcode build...
└─Compiling, linking and signing... 9.1s
Xcode build done. 35.8s
Waiting for iPhone 11 to report its views... 3ms
Lost connection to device.
Syncing files to device iPhone 11...
(This is taking an unexpectedly long time.) ⣻
Any idea what could be wrong?
Thank you.
You are using Firebase and you probably forgot to add firebase's GoogleService-Info.plist file to your IOS project from xcode.
Also sometimes you need to run pod install inside IOS project to install the required pods.
I know I'm already late here, but this could be caused by improper configuration from Google Map or other API keys from within iOS. Try running the app in Xcode and you will get a more helpful error message.
In my case, it was a Google Map API key missing.
Solution:
Open AppDelegate.swift
Add import GoogleMaps along with the other imports
Add the following statement above GeneratedPluginRegistrant.register(with: self): GMSServices.provideAPIKey("YOUR_API_KEY_HERE") where YOUR_API_KEY would be something like AIzaSyBHV....wZEIg from the Cloud Console.
You may be creating a Secondary App as described in FlutterFire docs. https://firebase.flutter.dev/docs/core/usage/
The Secondary APP just worked in an Android Environment for me. I found a workaround loading the options from the previously created.
In that way, it worked in IOS.
Something like this:
// Uses the default GoogleService-Info.plist
final Future<FirebaseApp> _firebaseDefaultApp = Firebase.initializeApp();
List<FirebaseApp> apps = Firebase.apps;
_firebaseSecondaryApp = Firebase.initializeApp(name: "SecondaryApp", options: apps[0].options);
Related
I am unable to install my apk on an android device except only for this apk. I am using the flutter build apk command to generate apk. After sharing apk to some device it was getting app not installed as shown in this..
I am using VSCode and here I am sharing the flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.19043.1466], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[√] Chrome - develop for the web
[√] Android Studio (version 2020.3)
[√] VS Code (version 1.63.2)
[√] Connected device (3 available)
Other apk's are working fine except this one on my device.
Try all these steps:
Make sure that you have enough storage space
Enable the installation from Unknown Sources
Make sure that the APK file isn’t corrupted or incomplete
try to clear cache of package installer and reboot
Check if the app is already installed in your device.
Check if the play protect option is enabled, if it is then turn off it in play store from navigation drawer.
Make sure “applicationId” in build.gradle file is unique.
Just go to the Settings --> Apps --> Click on your App. ---> In App info page at the action bar menu there will be an option called " Uninstall for All users " click that.
This type of issue is occur when you transfer apk file directly via any messaging platform or USB ... Some time it will happen and apk file will corrupt.. So I suggest to create a link for distribution of your app..
You can upload your apk in Google drive or use Firebase App Distribution or just WeTransfer. And Generate the link and then transfer that link....
I already tried all of this link and nothing
Xcode build done. 4,3s
Failed to build iOS app
Error output from Xcode build:
↳
objc[22045]: Class AMSupportURLConnectionDelegate is implemented in both ?? (0x1ffbaf8f0) and ?? (0x11b1602b8). One of the two will be used. Which one is undefined.
objc[22045]: Class AMSupportURLSession is implemented in both ?? (0x1ffbaf940) and ?? (0x11b160308). One of the two will be used. Which one is undefined.
** BUILD FAILED **
Xcode's output:
↳
In file included from /Users/netolobo/development/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.28/ios/Classes/FLTPathProviderPlugin.m:5:
/Users/netolobo/development/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.28/ios/Classes/FLTPathProviderPlugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 2.1.0-13.0.pre.499, on macOS 11.1 20C69 darwin-arm, locale pt-BR)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0-rc2)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] Connected device (2 available)
• No issues found!
I finally found the final solution!
Backup ios/Runner folder.
Delete the ios folder.
Run flutter create . in the previous folder where you have your project(cd users/user/"projects_folder") (this will recreate your ios folder).
Paste your Runner backup in the ios folder (into the project).
Open Runner.xcworkspace (into ios folder) and there, check the Version, the Bundle ID, all the info.
(If do you Have Firebase, you have to copy and paste again the Google Service-Info.Plist into the Runner folder (Always through Xcode) (If do you do this manually, it doesn't work).
Finally, flutter run and should work!
I'm developing a Flutter plugin that was running until a minute ago.
I haven't changed my Flutter project or the generated Xcode workspace at all. But all of a sudden the iOS Runner build breaks:
/path/to/myplugin/example/ios/Runner/GeneratedPluginRegistrant.m:10:9:
fatal error: module 'nativeguest' not found
#import myplugin;
~~~~~~~^~~~~~~~~~~
1 error generated.
I haven't renamed or moved anything so I have no clue where this came from. I double checked there are no changes through my Git history.
I don't quite remember what happened except a few flutter clean and flutter run -d <udid> ops. I probably did these in both the plugin example folder and the plugin root folder.
My Flutter global setup is perfectly fine
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel dev, 1.19.0-1.0.pre, on Mac OS X 10.15.4 19E287, locale en-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
[✓] Android Studio (version 3.6)
[✓] VS Code (version 1.45.1)
[✓] Connected device (2 available)
• No issues found!
This turned out to be a Bundle ID issue. I renamed the bundle on flutter side in the .yaml, but the new name didn't reflect back to the Xcode project.
One must manually rename the following metadata entries of the generated Xcode Runner project
Runner > Runner > Info.plist: Bundle name
`Runner > Main Editor: Signing & Capabilities > Bundle Identifier
IMHO, this is such a bad dev experience on flutter part. Renaming on Android is another roller-coaster ride of having to edit multiple manifests and Gradle configs.
Due to so many separate config files, renaming or any project reorganization becomes such a risky act!
Mac with Mojave
Flutter installed
Flutter Doctor passed all the tests
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.0.0, on Mac OS X 10.14.2 18C54, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
[✓] Android Studio (version 3.2)
[✓] IntelliJ IDEA Community Edition (version 2018.3)
[✓] Connected device (2 available)
I started IntelliJ IDE, and clicked on create new project
I selected the Android Emulator: Nexus 5S, and the emulator opened up properly.
I clicked on the green arrow to run, but I got the following error message:
════════════════════════════════════════════════════════════════════════════════
No valid code signing certificates were found
You can connect to your Apple Developer account by signing in with your Apple ID
in Xcode and create an iOS Development Certificate as well as a Provisioning
Profile for your project by:
1- Open the Flutter project's Xcode target with
open ios/Runner.xcworkspace
2- Select the 'Runner' project in the navigator then the 'Runner' target
in the project settings
3- In the 'General' tab, make sure a 'Development Team' is selected.
You may need to:
- Log in with your Apple ID in Xcode first
- Ensure you have a valid unique Bundle ID
- Register your device with your Apple Developer Account
- Let Xcode automatically provision a profile for your app
4- Build or run your project again
5- Trust your newly created Development Certificate on your iOS device
via Settings > General > Device Management > [your new certificate] > Trust
For more information, please visit:
https://developer.apple.com/library/content/documentation/IDEs/Conceptual/
AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html
Or run on an iOS simulator without code signing
════════════════════════════════════════════════════════════════════════════════
Finished with error: No development certificates available to code sign app for device deployment
Any ideas?
It looks like it's trying to run on an ios device that doesn't have a valid certificate. Flutter doctor is saying there are 2 devices connected. If you have an ios device attached to your computer, try disconnecting it so that flutter doesn't try to use it instead of the emulator.
I am trying to write some integration tests using the flutter driver based off of the example here: https://flutter.io/testing/. I am able to get the app to deploy, but all I get back is awaiting for app response.
I'm really not sure what else to do as it just sits and waits.
Here's what I see in the terminal.
flutter drive --target=test_driver/home_category_list_scroll.dart
Using device Sampson's iPhone.
Starting application: test_driver/home_category_list_scroll.dart
Automatically signing iOS for device deployment using specified
development team in Xcode project: QDCF25JLN2
Running pod install... 7.2s
Starting Xcode build...
├─Assembling Flutter resources... 13.0s
└─Compiling, linking and signing... 7.5s
Xcode build done. 27.6s
Installing and launching...
flutter: Observatory listening on http://127.0.0.1:54774/
00:00 +0: scrolling performance test (setUpAll)
[info ] FlutterDriver: Connecting to Flutter application at
http://127.0.0.1:54270
[info ] FlutterDriver: Waiting for application to start
[info ] FlutterDriver: Waiting for application to start
[info ] FlutterDriver: Waiting for application to start
Here's are the first few lines of the test.
void main() {
group('scrolling performance test', () {
FlutterDriver driver;
setUpAll(() async {
// Connects to the app
driver = await FlutterDriver.connect(dartVmServiceUrl: 'http://127.0.0.1:54270');
});
tearDownAll(() async {
if (driver != null) {
// Closes the connection
driver.close();
}
});
test('measure', () async {
Flutter Doctor output:
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v0.5.8-pre.56, on Mac OS X 10.13.4 17E202, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
[✓] Android Studio (version 3.0)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] IntelliJ IDEA Community Edition (version 2017.1.6)
[!] VS Code (version 1.24.1)
[✓] Connected devices (1 available)
! Doctor found issues in 1 category.
Thank you for any ideas you can give me.
Could you check if an Xcode build config is set that may be overriding the target file flutter drive was running? I found a similar issue and setting flavors worked on the integration test for them.
use flutter run and look at the url that returns in the console where the app is running, that is the one you should use in your dartVmServiceUrl parameter
source: https://medium.com/flutter-community/blazingly-fast-flutter-driver-tests-5e375c833aa