This nineteenth article covers the packaging and submission process for both Android and iOS platforms.
Because many Of the Flutter developers may only have single-end development experience and may not be familiar with the packaging and review process of the other end, or the front-end staff may not have experience submitting for review, this article will introduce the process to you to avoid missteps.
Article summary address:
A complete series of articles on Flutter
A series of articles on the world outside Flutter
Android packaging and review process
1, packaging,
In fact, the packaging and auditing process for Androd is relatively simple. Packaging apK can be done using the following command line:
flutter build apk --target-platform android-arm64
flutter build apk --target-platform android-arm64 -t lib/main_prod.dart
Copy the code
-
— Target-platform is the framework that needs to be supported for the packaged SO file, because now no matter it is Google Play or domestic platforms, most of the applications need to support THE ARM64-V8A ABI architecture. Target-platform is also used to reduce the size of the APK.
-
-t indicates that other main.dart packages are specified or not.
-
Also need to pay attention to, need the Android/Android app/SRC/build gradle configuration under signingConfigs to specify the packaging information such as keys, specific said generate the key here is unknown, We then configure signingConfigs to buildTypes to complete the configuration.
Android {···· · signingConfigs {config {keyAlias"xxxx"
keyPassword "xxxx"
storeFile file(".. /keystores/xxxxx.jks")
storePassword "xxxx"}}Copy the code
Finally, if your Apk has so directories for other types of schemas, such as Armeabi-V7A, etc., That would require the android/app/SRC/build gradle android {buildTypes {to add the NDK abiFilters filter configuration, Because Android needs to ensure that the SO files in each ABI directory are complete, otherwise it may crash.
BuildTypes {release {signingConfig signingConfigs.config NDK {// Set the supported SO library architecture abiFilters'arm64-v8a'}} debug {signingConfig signingConfigs.config NDK {// Set the supported SO library architecture abiFilters'arm64-v8a'.'x86'.'x86_64'}}}Copy the code
The final packaged Apk will default to the path shown below
2. Submit for review
In fact, it is relatively simple to submit audit on Android, because Android only needs to provide Apk download link can be directly installed, so many manufacturers have their own server directly put Apk files, but in order to better experience and distribution, most cases will also choose to upload to the major application platform, For example, if huawei is not on the shelves, there will be problems as shown in the picture below.
Some apKs are even treated as virus alerts for reasons such as app_name because they are not on the shelves.
In fact, domestic application market review is not troublesome, but because there are many platforms and different conditions may be more complicated, the current mainstream requirements are:
targetSdkVersion
28 (9.0);- ABI needs support
arm64-v8a
; - Applications need to be adapted for AndroidQ (10.0), such as file read permission changes;
- Educational applications need to be filed;
- Need to provide user privacy agreement and permission description;
Then there are the independent audit issues of some platforms. For example, 360 platform audit requires your Apk to be strengthened by their application (the effect of reinforcement depends on your opinion), and many platforms, such as App Treasure, require to provide application copyright instructions and other documents, which are quite annoying.
Of course, there are some platforms that you can skip, but if you don’t use App Treasure, for example, it’s hard to get the ability to scan wechat and jump to open apps and download them.
In addition, huawei platform has: according to the notification requirements of the Ministry of Industry and Information Technology on the special rectification of APP infringement on users’ rights and interests, the APP is required to provide account cancellation service or account cancellation function.
It can be seen that the Android audit and conditions are not cumbersome, but some platforms need things more abrasive, specific need to shelf can be considered according to the needs of their own.
Ii. IOS packaging and review process
1, packaging,
The packaging and approval process of iOS is relatively complicated. First of all, you need to have the developer account, the Bundle Identifier, configuration file, certificate and other information to apply for and set up the application for iOS. I believe it has reached the packaging stage.
1.1 Creating App Store Connect
You can find information about your app by going to developer.apple.com and going to Certificates,IDs & Profiles in the Account, At the same time in the App Store Connect columns can go to appstoreconnect.apple.com.
Then create an application in my App according to the prompts and fill in the information according to the business requirements. Here we mainly talk about several points that need to be paid attention to.
- 1. As shown in the picture below, there is a privacy policy website input field in the App Information of the App Store. This field is mandatory, and generally it is to put an Html.
- 2, need to upload app screenshots, generally need to prepare 3-5 preview images, but here needs 6.5-inch and 5.5-inch two kinds, if also need to support the iPad version, also need to upload iPad 12.9 image. Here is my recommendation. If there is no designer to produce the draft, it is recommended to use the simulator for screenshots (be careful not to cut off the DEBUG Label). IPhone 11ProMax simulator can be used for 6.5-inch models, and 8Plus simulator can be used for 5.5-inch models. Press Command + S to save to the desktop.
It should be noted that the screen of the screenshot should not be too simple, and it is best to reflect the specific content of the application, otherwise it is easy to be rejected. Meanwhile, the device model corresponding to the size is provided here.
- 3, in the version of the information and technical support website must be filled in, this specific can refer to: guoshuyu.cn/home/index/… , if the conditions are not met here, the audit will not pass the problem.
- 4. In addition, if the App requires login, the user’s test account and password should also be provided.
1.2 Packing and Uploading
To package the flutter iOS, you first need to execute the flutter build iOS command. This command generates the Framework file in release mode. Then you can enter the Xcode process.
As shown in the figure below, first make sure that the emulator is unselected at 🔨, and then export packaging will begin under Product > Archive.
After the package is successfully packaged, you can see the following interface. Locate the latest package and select Distribute App to enter the next step. Packaged items can also be found again in Window > Organizer.
Then select upload App Store Connect as shown below for submission preparation.
If you want to export test IPA, you can choose Development, provided that the UDID and other information of the corresponding machine have been included in the package configuration file.
Then you can choose Upload or Export. Export is an Export file that is exported and uploaded locally. You can use the TransPorter tool to Upload the file separately. ‘Upload’ means Upload directly from the front to the back.
The next page suggested that you do not check (do not ask, ask is Baidu), and then directly next, and then select automatic signature, and finally click upload after the signature is successful.
2, the audit
After a successful upload, you’ll see your submitted build at the Event and TestFlight after a while, and you’ll probably get an email like this:
Such as the ITMS – 90683 said there is no configuration within the plist NSContactsUsageDescription key – value, also is to the user to explain why you need to use read user permission to contact.
And so on and so forth and so on and so forth and so forth, if you have permissions in your application. The corresponding key-value in plIST configuration is required.
The warning of Push Notification Entitlement means that your application is not configured with the certificate and Settings related to Push. If your application does not use the corresponding functions, for example, check whether Push as shown in the following figure is checked in the Developer background. If this option is selected, you need to configure the corresponding push service in the application, and APNS on iOS also needs to set the corresponding push certificate. Generally, push certificates are divided into development and production. If push is not used, you can ignore the warning.
In addition, remember to complete the size of the App startup page and logo. If the configuration is not complete, you will also receive the corresponding warning, which may affect the review.
After selection in the version information need to submit the build, submit audit, after general audit can from wait for audit audit > > is the result, the process is in commonly 24 or 48 hours, but if caught the festivals such as Christmas, apple will slow down because of vacation, also rejected so many times, It will also affect the speed of audit.
As shown in the figure below, some audit suggestions are proposed at last, such as:
- The app screenshots mentioned above should show the main content of the app as much as possible;
- It is not allowed to abuse the app update prompt within the app. For example, it is not allowed to jump to the app Store after a simple prompt. If you do not understand the scale, you simply do not add it on iOS.
- Don’t include fir. Im, dandelion resources, links, text, and SDKS in your app, otherwise it will be scanned and rejected.
These problems are often make, more see also: developer.apple.com/cn/app-stor…
IOS can also use ipA developer accounts that don’t need to be on the app store, but only require the user’s trust certificate on the phone. However, such developer accounts are hard to get, and the apps for such accounts need to be repackaged and updated after a year.
Resources to recommend
- Making: github.com/CarGuo
- Open Source Flutter complete project:Github.com/CarGuo/GSYG…
- Open Source Flutter Multi-case learning project:Github.com/CarGuo/GSYF…
- Open Source Fluttre Combat Ebook Project:Github.com/CarGuo/GSYF…
- Open Source React Native project: github.com/CarGuo/GSYG…