Flutter develops IOS, the entire process of listing AppStore and the pits often encountered

Flutter develops IOS, the entire process of listing AppStore and the pits often encountered

The Fluttertechnology used in this development was developed. I didn't expect it to be so fast. I submitted it yesterday, and appstroe are already on the shelves today, so this time I will make a summary 从开发完毕app之后上架的全部过程. This article uses the explanation process method above and below for the whole process.

1. Preparation ( 如果准备工作中,没有和您APP相匹配的功能点,可以跳过这一段)

(1) 多语言申请权限问题
Because my app involves multi-language and custom application permission content, in terms of permission application, although Flutter has the permission_handler plugin for applying permission , it still cannot customize the text content, so we need to do it in xcode Do it, because I am not an ios developer, so I searched the content on the Internet. Thank you for this article to help me solve it: iOS language localization/internationalization in 3 minutes .

(2) flutter使用permission_handler需要注意的点。
After following this article to establish the specific application permission localized text, then your app will now follow the file you wrote to display the text. Of course, there is a pit here, and it is also a mistake made by my inexperience. I thought that after writing a local text file, it would be fine. info.plistThe application permission description in in <string><string>does not need to write the real content, just let him find it by himself. , As shown in the figure below,
Insert picture description here
but it is not. If this is the case, when you upload the appstore, Apple does not allow this. An email will be sent to your developer mailbox, the main content is:Missing Purpose String in Info.plist

ITMS-90683: Missing Purpose String in Info.plist - Your app’s code references one or more APIs that
access sensitive user data. The app’s Info.plist file should contain a NSContactsUsageDescription key
with a user-facing purpose string explaining clearly and completely why your app needs the data.
Starting Spring 2019, all apps submitted to the App Store that access user data are required to include a
purpose string. If you’re using external libraries or SDKs, they may reference APIs that require a purpose
string. While your app might not use these APIs, a purpose string is still required. You can contact the
developer of the library or SDK and request they release a version of their code that doesn’t contain the
APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/
protecting_the_user_s_privacy).

The main reason for such an error is to tell the developer, 没有对申请权限进行描述,这在app当中是不被允许的。then how did this problem cause it? Thank you for this article to help me solve the problem: Submit AppStore machine review rejected and the solution Missing Purpose String in Info.plist

具体原因

The machine review detects that your info.plistfile does not apply for descriptions for the address book, calendar, media library, motion track, and other permissions that you do not use, so it will report an error. Then, why do we not use these permissions will also report an error What? This is permission_handlerthe problem with this flutter plugin library. Although we do not use these permissions, once we reference the plugin in the project, all permissions will be packaged into the ipa file. This resulted in no use and no description of him.

解决办法

In fact permission_handler, this problem is also described in the plug-in to solve it, but at the time only focused on how to use it, and did not deliberately understand it.
Insert picture description here
We need Podfileto mark out the permissions that we cannot use in the file ( 如果您的代码内容和下方不同,可能会多一个flutter的内容,建议请替换掉。):

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
      config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
              '$(inherited)',
              ## dart: PermissionGroup.calendar:日历
              'PERMISSION_EVENTS=0',

              ## dart: PermissionGroup.camera:相机
              'PERMISSION_CAMERA=0',

              ## dart: PermissionGroup.contacts:联系人
              'PERMISSION_CONTACTS=0',

              ## dart: PermissionGroup.phone:手机
              'PERMISSION_PHONE=0',

              ## dart: PermissionGroup.photos:相册
              'PERMISSION_PHOTOS=0',

              ## dart: PermissionGroup.reminders:提醒
              'PERMISSION_REMINDERS=0',

              ## dart: PermissionGroup.speech:语音识别
              'PERMISSION_SPEECH_RECOGNIZER=0',

              ## dart: PermissionGroup.mediaLibrary:多媒体
              'PERMISSION_MEDIA_LIBRARY=0',

              ## dart: PermissionGroup.sensors:传感器
              'PERMISSION_SENSORS=0'

            ]
      end
  end
end

上面包含了大部分我没有使用到的权限,没有写的还有几个,因为我这边使用到了,分别是定位和语音。如果想要增加的话,可以在你使用Permission的地方点击进去直接查看源码,里面有所有对应的权限代号。当然有的权限只有在ios中才有,android是没有的,要注意这个点,不要多写!!

We are going to solve the point mentioned at the beginning, in fact, just <string><string>fill in the content to solve the Apple machine detection error: Missing Purpose String in Info.plistproblem.

2. What you need to prepare for appstroe
  • App name
  • Company name ( 填写在版权时候使用)
  • subtitle
  • Key words
  • Technical support website ( 属于你的可以访问的网址)
  • app description( 填写在描述中使用)
  • Promotional text
  • 6.5 inch lower app promotional image (the following sizes are all possible)
    Insert picture description here
  • 5.5 inch lower app promotional image (the following sizes are all possible)
    Insert picture description here
  • Promotional picture under ipad ( 如果你不想上架ipad,可以在xcode中进行取消选择ipad)
    Insert picture description here
    If you need to put ipad on the shelf, you need to prepare 2048x2732a promotional picture of the size
3. Create your app project on the Apple Developer Platform

Insert picture description here
Insert picture description here

Insert picture description here

Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
随后选择创建,创建完毕之后,他会从新进入上一步都页面,这个时候时候,就可以看到你所创建都app了,点击进入,在其中填写之前准备都所有信息就可以了。

Insert picture description here
这里就是需要你进行上传app的操作了,上传成功后,他会自动填补app信息。
Insert picture description here

这里是在你选择完你上传的app版本之后出现的,后面可能还有一个会询问你是否符合法律规定,也选择是就好。

Insert picture description here选择您的app的用户隐私策略

Insert picture description here
记得选择你app的年龄分级

Fourth, use xcode to package and upload appstore

Everything is ready, we only owe Dongfeng, all of our preparations are ready, now we start uploading appstroe

Preparation before packaging: select your mobile phone to run and any ios deviceapply to multiple mobile phones
Insert picture description here

Insert picture description here

1. Build the file package
Insert picture description here
Insert picture description here
注意:这时候有人就注意到了,为什么图中我选中的部分也就是蓝色框中的build为什么是1.4.2了? 这里是你打包的版本数,是可以自定义的,主要原因是因为之前打包之后提交appstore时,出现了错误,没有提交成功,但是苹果服务器上已经有这个build版本了,所以我们需要进行更改,只要和上次不一样并且可以区分就好

2. After the build is completed, all the past packaged records will be displayed. At this time, we need to click on the right column Distribute Appto select what type of package needs to be built
Insert picture description hereInsert picture description here

因为要上架appstroe,我们选择第一个来进行打包
Insert picture description here
选择next,进行上传操作
Insert picture description here
选择next,进行下一步
Insert picture description here
选择next,进行下一步
Insert picture description here
这个时候,便打包完成了,我们点击upload便可以上传appstore了,这里需要等一会。
Insert picture description here
如果出现任何问题,大家可以复制一下错误信息,直接去网上搜索就可以解决,我只出现了build版本重复的问题,所以就没办法给大家列举出来一些其他但坑了。同时,如果您上传成功了,需要等个10-20分钟,才能在appstore平台上刷出来您提交的版本

Five, the end

Now we have uploaded the project to the appstore platform for submission. When you click Submit for review in the appstore platform, if you have any questions, you will be prompted. The details will be described clearly. You can follow the description to solve this problem. . The next step is to submit for review. I wish everyone can pass the review at one time~

有什么问题请给我留言~

Insert picture description here

Guess you like

Origin blog.csdn.net/qq_38774121/article/details/114916292