Flutter / Mac / AndroidStudio / Gradle / appbundle - flutter

I finally finished writing my application (Mac + AndroidStudio) and I only have green check on each of my files.
Finally ... I tried to launch the build appbundle by following the guidelines described on the Flutter website.
I have the impression to have done by Google .... I site the result on its search engine: Futter Beautful native apps in record time.
Ok for the beautiful native apps but for the record time ... it's only for writing?
Since I am not a pure coder, I can not build the appbundle. I spend my time doing research on the net and I see that I'm not the only one. Same on Stack Overflow.
Question (to you dear coder friends and possibly to them Google coders): Is there a clean and safe way to generate the appbundle?
(I had less trouble on my first app with xcode at the very beginning of the swift !!!)
Good luck to all. Thanks to Stack Overflow who sharing solutions ....

type flutter build appbundle in terminal in your project directory

sorry.
To precise :
Project flutter built with AndroidStudio on Mac OS Mojave.
All my Flutter files are validated in green in AndroidStudio.
I followed step by step the tutorial Flutter page to deploy my application to build the necessary file to Goole Play Store.
I only use url_launcher and flutter_localizations. The pubspec.yaml is up to date.
My app works great on my smartphone when I launch the app. from AndroidStudio.
Is it common that this is not enough for the launch of the build to be successful?

Related

Upgrade flutter in an unfinished project?

I am working on a project and as I run the project there is a log that tells me to upgrade my current flutter version. I then upgrade my flutter version and then after that the app became laggy.
My question is, is it recommendable to not update flutter version when you are working on an unfinished project and then update the flutter version after the project is finished?
Thank you for your time on answering. Cheers.
It's not necessary to halt flutter sdk updates while building. Sometimes some packages may cause issues to not build or show warnings, but it is not common for apps to slow down after updating. Flutter sdk will not be the problem. Is the app smooth after using flutter downgrade?
And please provide more information regarding this,
Is it the same for all devices?
Have you tried flutter clean?

Using AppCode with Flutter plugin

How can I use AppCode for the ios-specific parts of my Flutter plugin?
I've created the plugin with flutter create --template=plugin --platforms=ios myplugin
The command doesn't generate an XCode project or workspace for the plugin itself but it includes an example app for which it does generate these. Running flutter build ios in example then creates symlinks to the plugin code in example/ios/.symlinks that I can use to edit the actual Swift code with auto completion, code navigation etc. When I open these files in AppCode however, I get the below error and no coding assistance is available at all:
I previously used AppCode quite a lot to maintain some Flutter plugins' iOS code (but switched jobs and didn't need AppCode or Xcode). However, I recently started making a free app, and also wanted to contribute to a Flutter plugin for iOS, I wanted AppCode again. I got AppCode working again, so I wanted to share.
In your flutter directory:
For editing/debugging/running Flutter apps' iOS code: run appcode ios
For Flutter plugins, run appcode example/ios (not appcode ios)
Some principles:
The files don't show up immediately, use Command + Shift + O to find your file. Then Opt + F1 to show it in the project navigator.
Built at least once using flutter run or Xcode (to make sure configuration is set up).
You cannot escape Xcode. Xcode and AppCode are complementary. Find the balance 😂🤓. Refactoring code, debugging the application, searching and reading code works really well in AppCode. Xcode does reading configuration better or debugging builds.
If you get random errors (e.g. everything fails but the error is build failed in AppCode, you should open in Xcode or build/run the flutter app for iOS: flutter run and read the error messages.
If you want to debug both Flutter and iOS simultaneously, start the iOS debugger, then "Flutter attach" in android studio (maybe this is possible in VSCode too, but I don't use that).
Here's an example screenshot of AppCode with debugger working. You might be curious if telemetry flag you set in Flutter was actually being set in the iOS side... maybe there's a bug. But I take privacy seriously and confirm the telemetry is disabled. I also watch network traffic sometimes. 😂. If you're interested, you can then follow that to it's dependencies (manually, using by reading package.swift), and find out it is set to true by default.
UserDefaults.standard.register(defaults: [
#keyPath(UserDefaults.MGLMapboxMetricsEnabled): true
])

Flutter Project build in macOS

I am windows user and have no experience with macOS. I have developed flutter app in Windows 10 using Android Studio. All working fine and already tested with physical Android Device. Now it is the time to test IOS device. There's the problem started.
I can't build my project in XCode. I already changed user defined build settings as shown in screenshots
When build the project, it is still finding the flutter SDK location of Windows OS
This is my flutter doctor check in macOS
Please guide me.
I found the solution with the help of my friend - flutter developer.
Go to the project directory and run flutter create -i swift . It will recreate the ios folder in project.
Then run pod install command under ios folder

Error while uploading Flutter App to App Store: Non-public API usage

I am new in Flutter Development and i have developed an app with Webview.
I have upload an apk on Google Play Store that is accepted but for App Store it shows some error.
Please find below error,
ITMS-90338: Non-public API usage - The app references non-public
symbols in Frameworks/Flutter.framework/Flutter: _ptrace. If method
names in your source code match the private Apple APIs listed above,
altering your method names will help prevent this app from being
flagged in future submissions. In addition, note that one or more of
the above APIs may be located in a static library that was included
with your app. If so, they must be removed.
For this error i have search many things but i am unable found any solution for this.
So please any one who is capable of solving this please help me to resolve this.
Thanks & Regards,
This happens if you are submitting the debug version to the AppStore, Flutter team recommends you to first run
flutter build ios --release
before archiving your app in Xcode.
First make sure you are submitting a release build with flutter build ios --release
If that's not the problem here you could find similar problems related:
flutter build ios --release may use a debug Flutter.framework by mistake
In my case, I updated my Mac to 10.15(Catalina), while the update my cocoapods installation wasn't there. So whenever I try to upload using the command flutter build ios --release and archiving it. Apple sent me the same email you received.
You can install cocoapods using the following commands.
step 1 Open terminal
step 2 command: sudo gem install cocoapods
step 3 set your project path on the terminal.
step 4 command: pod init
I hope it helps.

Add flutter web and desktop to existing flutter (android/ios) project in android studio

I know it maybe still early but I want to try and use full flutter existing cross-platform support in one project. Stability is not my main concern.
I have started a flutter project in android studio. Naturally I have (android/Ios) going smoothly. But I would love to add Web and desktop to the same project.
Please help me with and direction, or if there is solution any one has created however much experimental.
There is a migration guide for web here. I got it up and running on a very basic existing app.
Best way is to do it in a separate branch since it requires changing packages and I even deleted .packages and pubspec.lock files first. Then I ran pub get (not flutter packages get) to download the required packages and run some precompilers.