Failed to release on Testflight - flutter

Issue summary:
Try to release Flutter app via Testflight, but failed because Debug mode is contained somewhere in the ipa file.
Detail:
Releasing flutter app as release mode, by below command
flutter build ipa --release --dart-define=ENVIRONMENT=PROD
Then I can see it is passed Validation on Transport App.
However, when I see released app via testflight, attached screen showed.
Though I think this screen appear when Debug mode is contained in ipa file, I'm not sure how and where it's contaminated on my file.
Does anyone know how to solve it?
Config:
flutter --version
Flutter 3.5.0-6.0.pre.37 • channel master •
https://github.com/flutter/flutter.git
Framework • revision 08e1729204 (2 days ago) • 2022-10-13 17:40:07 -0400
Engine • revision 3711bbaeab
Tools • Dart 2.19.0 (build 2.19.0-309.0.dev) • DevTools 2.18.0
Xcode version
Version 13.2.1 (13C100)
Mac version
Monterery
12.4
Apple M1

Related

Flutter: Real ads doesn't work on release mode

I have added my device id to admob console as test device.
When I build apk and install it on my test device, the ads work fine, But on other devices not.
I have searched a lot but there is no answer.
I used:
native_admob_flutter: ^1.5.0
Flutter doctor:
[√] Flutter (Channel stable, 2.5.2, on Microsoft Windows [Version 10.0.19044.1348], locale en-US)
• Flutter version 2.5.2 at C:\Src\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 3595343e20 (3 months ago), 2021-09-30 12:58:18 -0700
• Engine revision 6ac856380f
• Dart version 2.14.3
How can I know if this happen because of console or my flutter code?
Its not from your code its from your Ads serving company or Admob.
You have to add the other device as a test device otherwise you need to make your App reviewed if not it will rarely shows ads.

Unable to build flutter tools

Presently on the master channel, I switched to the beta channel then I run flutter upgrade to find out I can't use Linux as a device, so I switched back to the master branch, I run flutter upgrade. Then I started getting these errors:
Because flutter_tools depends on collection >=1.15.0-nnbd <1.15.0-nullsafety.2
which requires SDK version >=2.9.0-18.0 <=2.9.10, version solving failed.
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (9 tries left)
The current Dart SDK version is 2.10.0-0.0.dev.flutter-a3815b6590.
Flutter Info before switching to the master channel
Flutter 1.18.0-11.1.pre • channel beta • https://github.com/flutter/flutter.git
Framework • revision 2738a11 (3 months ago) • 2020-05-13 15:24:36 -0700
Engine • revision ef9215ceb2
Tools • Dart 2.9.0 (build 2.9.0-8.2.beta)
I can't presently get any info on the master channel (which I am presently on) cause every time I run any flutter command, it tries to run pub upgrade with keeps giving error.
I am assuming the issue is that Dart SDK
upgraded, if I can roll back to a version compatible with the dependency it should work, or the dependency should be reviewed.
Fixed.
I used git to switched branch to stable, then I run flutter upgrade, it worked fine, but I need to run a Linux app on flutter, so I used git to switch branch to dev, then run flutter upgrade again.

Flutter ios build fails. simulator builds also fail

I've been working on an app for months now and using Flutter, but whenever I upgrade Flutter, it is a huge pain because I have to wrestle to try to get it to build again. Usually manually cleaning up CocoaPods and pubspec.yaml is enough, but this time it hasn't.
I've upgraded my Flutter version to 1.14.6 from 1.10.7, nuked my pods and pubspec.yaml, nuked my installation of Flutter, my repository, and nothing worked.
Another weird thing about it is that I have the build running just fine with the same versions of flutter, dart, cocoapods, and ruby on the same branch on a different machine. Is there something cached somewhere that I am not cleaning up properly? When I try to build, it says it fails with errors, but unfortunately the log output doesn't actually show any errors, and only shows warnings. Here is a part of my log output:
8 warnings generated.
/Users/hallo/Documents/dev/flutter/.pub-cache/hosted/pub.dartlang.org/google_sign_in-4.1.1/ios/Classes/FLTGoogleSignInPlugin.m:138:13: warning: unused variable 'sourceApplication' [-Wunused-variable]
NSString *sourceApplication = options[UIApplicationOpenURLOptionsSourceApplicationKey];
^
/Users/hallo/Documents/dev/flutter/.pub-cache/hosted/pub.dartlang.org/google_sign_in-4.1.1/ios/Classes/FLTGoogleSignInPlugin.m:138:41: warning: 'UIApplicationOpenURLOptionsSourceApplicationKey' is only available on iOS 9.0 or newer [-Wunguarded-availability]
NSString *sourceApplication = options[UIApplicationOpenURLOptionsSourceApplicationKey];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In module 'UIKit' imported from /Users/hallo/Documents/HalloMonoRepo/hallo/ios/Pods/Target Support Files/google_sign_in/google_sign_in-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:514:51: note: 'UIApplicationOpenURLOptionsSourceApplicationKey' has been marked as being introduced in iOS 9.0 here, but the deployment target is iOS 8.0.0
UIKIT_EXTERN UIApplicationOpenURLOptionsKey const UIApplicationOpenURLOptionsSourceApplicationKey NS_SWIFT_NAME(sourceApplication) API_AVAILABLE(ios(9.0)); // value is an NSString containing the bundle ID of the originating application; non-nil if the originating application and this application share the same team identifier
^
/Users/hallo/Documents/dev/flutter/.pub-cache/hosted/pub.dartlang.org/google_sign_in-4.1.1/ios/Classes/FLTGoogleSignInPlugin.m:138:41: note: enclose 'UIApplicationOpenURLOptionsSourceApplicationKey' in an #available check to silence this warning
NSString *sourceApplication = options[UIApplicationOpenURLOptionsSourceApplicationKey];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Could not build the application for the simulator.
Error launching application on iPhone 8.
Any help would be much appreciated as I have exhausted my ideas on what could be causing this error.
Pluto:hallo hallo$ flutter doctor -v
[✓] Flutter (Channel beta, v1.14.6, on Mac OS X 10.14.6 18G3020, locale en-US)
• Flutter version 1.14.6 at /Users/hallo/Documents/dev/flutter
• Framework revision fabeb2a16f (3 weeks ago), 2020-01-28 07:56:51 -0800
• Engine revision c4229bfbba
• Dart version 2.8.0 (build 2.8.0-dev.5.0 fc3af737c7)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/hallo/Library/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_152-release-1343-b01)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.0, Build version 11A420a
• CocoaPods version 1.8.4
[✓] Android Studio (version 3.4)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 39.0.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
[✓] VS Code (version 1.42.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.8.1
[✓] Connected device (1 available)
• iPhone 8 • C40DD8DB-5860-4B94-8D20-372074B6E7BC • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-0 (simulator)
• No issues found!`
Are you running on Android Studio? VS Code? Could you post your flutter doctor -v?
Other than that, all those errors comes from google_sign_in. Would recommend the following:
Remove google_sign_in (and comment any screens using this dependency)
Make sure you're following all the correct changes inside your iOS Folder
Use a different library. google_sign_in may not be up to date with all the latest Flutter changes.
If your code runs without that library, it clearly shows an error with the latest upgrade changes.
I fixed the issue by changing a variety of things. When I did the flutter upgrade, it changed my project.pbxproj file by adding this line
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n\"${PODS_ROOT}/Fabric/run\"\n";
which caused a lot of errors. I deleted this line, changed the build system in Xcode to default (it was legacy), and then in the embed frameworks in Xcode, I removed Flutter.framework.
Just run flutter clean on your project, it did the trick for me.

Flutter fresh installation flutter run stuck

I am new to flutter i have fresh installtion.
All as in docs.
As after fresh installation i was fine worked but when i want to work on another day flutter run i stuck.... I do not know why. I only make boilerplate app. I xcode when i build app is opening in simulator but stating as flutter run not working. I even try to wait 20 min with this flutter run but still stuck
flutter doctor -v
[✓] Flutter (Channel master, v1.6.4-pre.14, on Mac OS X 10.14.5 18F132, locale
pl-PL)
• Flutter version 1.6.4-pre.14 at /Users/db/Desktop/Mobile/flutter
• Framework revision 81c38b22cb (32 hours ago), 2019-05-24 22:51:02 -0400
• Engine revision 8dc3a4cde2
• Dart version 2.3.2 (build 2.3.2-dev.0.0 e3edfd36b2)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/db/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling
support)
• Platform android-28, build-tools 28.0.3
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_152-release-1343-b01)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 10.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.2.1, Build version 10E1001
• CocoaPods version 1.7.0
[✓] iOS tools - develop for iOS devices
• ios-deploy 1.9.4
[✓] Android Studio (version 3.4)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 35.3.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build
1.8.0_152-release-1343-b01)
[✓] Connected device (1 available)
• iPhone 8 • F35EFD3E-C637-427A-8405-30EDF202939A • ios •
com.apple.CoreSimulator.SimRuntime.iOS-12-2 (simulator)
• No issues found!
flutter run -v stuck at this stage.
+file:///Users/db/Desktop/Mobile/flutter/packages/flutter/lib/widgets.d
art
[ ] -> +file:///Users/db/Desktop/Flutter/iamsmart/lib/main.dart
[ ] -> 35191e22-84d6-4fab-abef-178ae9e4c665 build/app.dill 0
[ +319 ms] Building bundle
[ ] Writing asset files to build/flutter_assets
[ +55 ms] Wrote build/flutter_assets
[ +12 ms] Using legacy Xcode build system.
[ +27 ms] executing: [/Users/db/Desktop/Flutter/iamsmart/ios/]
/usr/bin/xcodebuild -list
Run this command
flutter clean
And then again
flutter run
Try to upgrade your flutter version to v 1.7.8 by running this
command this needs internet connection
flutter upgrade
Try this command
flutter clean
Change your flutter channel to stable
flutter channel stable
Check your internet connection because sometimes it prevents me from
running my app
Try to switch your flutter channel master to stable channel. After switching the channels you should call flutter upgrade to download the Flutter SDK and dependent packages.
Do this steps in the terminal
flutter channel stable
flutter upgrade
try to run your code after this steps.
Update to 1.9.1-hotfix4 fixed the problem
Your flutter doctor isn't showing any error as you had shared the commands.I think to share the run command terminal so that we can find out the stack of flowing of commands.
If you are getting error to build flutter project then you should update the Android Studio or VS Code Editor.
You can refer here:
Android studio-https://developer.android.com/studio
VS Code-https://code.visualstudio.com/Download
If you are able to create flutter project but doesn't getting run command then you need to update flutter and dart.
You can refer here:
Flutter-https://flutter.dev/docs/development/tools/sdk/releases
Dart-https://dart.dev/get-dart
If still you are suffering from error then you need to share some more Pics.
Probably something's gone wrong after you changed some files in of flutter ide. Also it does after updates crashed.
So the thing you should do is firstly backup your projects if it indeed. After backup remove the ide and be sure uninstalling complate succesful. Restart your computer and install all decencies again. Because sometimes upgrading does not works well to get good result.
P.S : Dont forget using flutter doctor for checking if any problem comes out.

Anyone experience vscode very slow after update to 1.30?

What settings to disable to make it fast again?
I'm using VSCode for flutter development. Now very slow when starting the app and during hot reload. Now almost impossible to perform hot reload. I must stop it, do changes then start rather than waiting on hot reload process.
Before update, it was fast but sometimes crash.
I only use Dart 2.21.1 and Flutter 2.21.1 extension. And running on Windows 10.
=======================================================================
The issue seems gone away.
Now I'm using VS Code 1.31.1
flutter --version
Flutter 1.1.8 • channel beta • https://github.com/flutter/flutter.git
Framework • revision 985ccb6d14 (8 weeks ago) • 2019-01-08 13:45:55 -0800
Engine • revision 7112b72cc2
Tools • Dart 2.1.1 (build 2.1.1-dev.0.1 ec86471ccc)
And Dart/Flutter extension is 2.24.0
In your folder, run
flutter clean
this will delete all flutter dependencies and then re-create the project again by using
flutter create YourProjectName
this will create all the flutter dependencies again in your current project, you will not loose your files
The issue seems gone away.
Now I'm using VS Code 1.31.1
flutter --version
Flutter 1.1.8 • channel beta • https://github.com/flutter/flutter.git
Framework • revision 985ccb6d14 (8 weeks ago) • 2019-01-08 13:45:55 -0800
Engine • revision 7112b72cc2
Tools • Dart 2.1.1 (build 2.1.1-dev.0.1 ec86471ccc)
And Dart/Flutter extension is 2.24.0