iOS使用相关技术要点

1 工程创建和配置

签名配置问题1

  • 由于项目是从uniapp离线打包工程来的,所以有些配置是已经存在的。创建工程时,Signing & Capabilities下的Signing报错:
HBuilder has conflicting provisioning settings.
HBuilder is automatically signed, but provisioning profile a7e03077-46db-4b91-b0c4-20fd613c1e14 has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor, or switch to manual signing in the Signing & Capabilities editor.

或者

HBuilder is automatically signed for development, but a conflicting code signing identity iPhone Distribution has been manually specified. Set the code signing identity value to "Apple Development" in the build settings editor, or switch to manual signing in the Signing & Capabilities editor.

签名配置问题2

MAMapKit_3D_Demo has conflicting provisioning settings.

MAMapKit_3D_Demo is automatically signed, but code signing identity iPhone Distribution: AutoNavi Software Co., Ltd. has been manually specified. Set the code signing identity value to "Apple Development" in the build settings editor, or switch to manual signing in the Signing & Capabilities editor.

  • 处理:
    按照错误提示,在Build Settings 中设置profile(包括Release和Debug)都为"Apple Development" 即可。

签名配置问题3

(1)下载了某个demo工程,但是本地跑的时候,报错:

Unable to log in with account "xxxxx@xx.com".
Sign in to try again.
No profiles for 'com.amap.MAMapKit-3D-Demo.hh' were found
Xcode couldn't find any iOS App Development provisioning profiles matching 'com.amap.MAMapKit-3D-Demo.hh'.
  • 参考:
    https://www.jianshu.com/p/a3f652634152

  • 按照上面参考的进行处理:将project.pbxproj中的如下4条语句(OC和Swifit各两套,每套包括debug和release)删掉:

 PROVISIONING_PROFILE_SPECIFIER = "";
  • 右上角xcode --> preferences --> accounts
    看到该账号下提示:
Your session has expired. Please log in.

但是重新登录没用。

(2) 该问题出现的第二种场景为:给已有的工程添加新的手机设备进行调试,但是报错,错误信息基本和第一种场景一样。

  • 新手机devices安装ipa
The operation couldn’t be completed. Unable to log in with account 'xxxxx@xx.com'. The login details for account 'xxxxx@xx.com' were rejected.

Provisioning profile "iOS Team Provisioning Profile: com.app.demo" doesn't include the currently selected device "iPhone (6)" (identifier 89df990fbb855f2xxxxxxxxxxxxxxxx).

资源文件缺少导致编译失败

Unable to install “app-demo-ios”

“app-demo-ios” does not contain a valid Info.plist, so it cannot be installed on hh2的iPhone

(“CFBundleExecutable” is not specified)

Build input file cannot be found: '/Users/hh/Documents/ios-pro/iOSSDK-3.2.16/app-demo-ios/Application/dclogo@3x.png'
  • 原因:即上面的dclogo@3x.png文件找不到,应该是迁移过来时,引用复制了,但是实际文件复制到。
  • 处理:直接删除即可。

添加framework问题

  • 在TARGETS的General下添加framework时,需要注意Embed状态。
    注意:添加framework时,Embed需要设置为Do Not Embed状态。

  • 在TARGETS的Build Phases下的Link Binary With Libraries添加framework时,直接添加即可(Embed状态默认为Do Not Embed)。

2 开发问题

oc loadView

ios更新升级跳转appstore

获取iTunes id

  • 处理:代码中通过如下bundle id获取对应的itunes id:
NSString *urlStr = @"http://itunes.apple.com/lookup?bundleId=com.app.demo";
  • 获取返回的结果中找到trackId,即iTunes ID。
trackId = 9990000000;
  • 注意:通过iTunes ID获取到的返回值也是基本一致的。
NSString *urlStr = @"http://itunes.apple.com/lookup?id= 9990000000";

iPhone在设备上启用网页检查器

iOS跳转到位置服务

ios应用配置定位权限但是设置里没有显示

参考:
https://www.jianshu.com/p/1b94a0647971
https://ask.dcloud.net.cn/question/86633

接入微信支付库:编译报错

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_PayResp", referenced from:
      objc-class-ref in libwxpay.a(PGWXPay.o)
  "_OBJC_CLASS_$_PayReq", referenced from:
      objc-class-ref in libwxpay.a(PGWXPay.o)

Undefined symbols for architecture arm64:

Xcode缓存是什么

  • 随着开发工作的与日俱增,Xcode的缓存也会越来越多,所以定期清理一下缓存还是很有必要的。特别是Macbook磁盘容量不够的情况下,清理缓存带来的效果尤为显著。
    比如:
~/Library/Developer/Xcode/Archives
~/Library/Developer/Xcode/DerivedData

说明:第一个为Archive打ipa包的历史记录,第二个为模拟器运行程序产生的数据。

oc系统定位

看日志,信息如下:

2022-03-09 08:30:20.484257+0800 app-demo-ios[4711:1526967] A location manager (0x108f0caa0) was created on a dispatch queue executing on a thread other than the main thread.  It is the developer's responsibility to ensure that there is a run loop running on the thread on which the location manager object is allocated.  In particular, creating location managers in arbitrary dispatch queues (not attached to the main queue) is not supported and will result in callbacks not being received.

说明:需要在主线程触发获取定位操作,特别是CLLocationManager一定要在主线程里创建,在其他线程不支持且不会返回回调。

获取定位日志:
使用有一次性定位:这个时间间隔有点久。

2022-03-09 08:50:07.678619+0800 app-demo-ios[4785:1537452] getCurrenLocation.enable:1
2022-03-09 08:50:17.682124+0800 app-demo-ios[4785:1537452] didUpdateLocations locations.count:1, lo:<+28.21871726,+113.15477040> +/- 65.00m (speed -1.00 mps / course -1.00) @ 2022/3/9 中国标准时间 上午8:50:14
2022-03-09 08:50:17.682456+0800 app-demo-ios[4785:1537452] setCurrentLocation:113.1547703983427,28.21871725630077

使用多次定位:这个时间间隔非常短。只要在获取到定位的回调里停止定位即可。

2022-03-09 08:54:35.627507+0800 app-demo-ios[4802:1540059]  getCurrenLocation.enable:1
2022-03-09 08:54:35.644677+0800 app-demo-ios[4802:1540059] didUpdateLocations locations.count:1, lo:<+28.21869956,+113.15483123> +/- 65.00m (speed -1.00 mps / course -1.00) @ 2022/3/9 中国标准时间 上午8:52:51
:35.644746+0800 app-demo-ios[4802:1540059] setCurrentLocation:113.1548312250047,28.21869955594153
2022-03-09 08:54:35.653389+0800 app-demo-ios[4802:1540059]  didUpdateLocations locations.count:1, lo:<+28.21869956,+113.15483123> +/- 65.00m (speed -1.00 mps / course -1.00) @ 2022/3/9 中国标准时间 上午8:53:00
2022-03-09 08:54:35.653436+0800 app-demo-ios[4802:1540059] setCurrentLocation:113.1548312250047,28.21869955594153

__weak typeof

iOS开屏视频设置/ iOS应用启动动画

uni.chooseFile iOS

微信文件上传ios实现

微信文件获取ios

UIDocument

getTopViewController

UIDocumentPickerViewController

2022-04-06 21:14:13.841263+0800 app-demo-ios[6427:2247924] sy.appL documentPicker: url:file:///private/var/mobile/Containers/Data/Application/65F30A07-0B32-45F3-BA73-86DFDBA4149F/tmp/com.app.demo-Inbox/fileuploadtext.txt

拷贝文件失败:

2022-04-06 22:18:02.363673+0800 app-demo-ios[441:25968] sy.app: copyFileToSanbox fail: filePth:file:///private/var/mobile/Containers/Data/Application/4B978759-D78A-406D-8583-6318C4AF0E9F/tmp/com.app.demo-Inbox/fileuploadtext.txt, toPath:/var/mobile/Containers/Data/Application/4B978759-D78A-406D-8583-6318C4AF0E9F/Documents/fileuploadtext.txt, error:Error Domain=NSCocoaErrorDomain Code=260 "未能打开文件“fileuploadtext.txt”,因为它不存在。" UserInfo={NSFilePath=file:///private/var/mobile/Containers/Data/Application/4B978759-D78A-406D-8583-6318C4AF0E9F/tmp/com.app.demo-Inbox/fileuploadtext.txt, NSUnderlyingError=0x280612790 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}

  • 处理:需要处理文件路径前的file:///
    这里需要判断并去掉。
error:Error Domain=NSCocoaErrorDomain Code=260 "未能打开文件“fileuploadtext.txt”,因为它不存在。"

NSFilePath=file:///private/var/mobile/Containers/Data/Application/BAFA56AA-712D-49EE-948D-3281699C2C83/tmp/com.app.demo-Inbox/fileuploadtext.txt, NSUnderlyingError=0x281fec2a0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory

@avaiable

UIPopoverPresentationController

oc获取文件属性

  • 文件属性:日志:
Printing description of attrs:
{
    NSFileCreationDate = "2022-04-06 13:08:23 +0000";
    NSFileExtendedAttributes =     {
        "com.apple.lastuseddate#PS" = {length = 16, bytes = 0x7b51546200000000f560ab2800000000};
    };
    NSFileExtensionHidden = 0;
    NSFileGroupOwnerAccountID = 501;
    NSFileGroupOwnerAccountName = mobile;
    NSFileModificationDate = "2022-04-06 13:08:23 +0000";
    NSFileOwnerAccountID = 501;
    NSFileOwnerAccountName = mobile;
    NSFilePosixPermissions = 384;
    NSFileProtectionKey = NSFileProtectionCompleteUntilFirstUserAuthentication;
    NSFileReferenceCount = 1;
    NSFileSize = 16;
    NSFileSystemFileNumber = 50664303;
    NSFileSystemNumber = 16777224;
    NSFileType = NSFileTypeRegular;
}

oc字符串过滤器:NSPredicate

UIButton图片文字位置

UIButton改变图片大小

startAccessingSecurityScopedResource

DocumentTypes

ios的encodeurl和decodeurl

NSURLSession下载

NSURLSessionDownloadTask下载文件大小为0

  • 参考:
    暂时没问题,问题出在uni.downlown和uni.saveFile代码逻辑里。

colorWithRed宏写法

NSDateFormatter

sortUsingComparator

sortUsingComparator比较NSDate

UItableView不显示hightlight

ios刘海屏和非刘海屏获取状态栏高度

oc预览文件

oc hitTest

CGRectContainsRect

OC扩大按钮的点击范围

Docment Types配置

UIviewcontroller设置透明背景显示黑色

UIModalPresentationOverFullScreen和UIModalPresentationFullScreen

OC类型问题

Passing 'const NSString * _Nonnull __strong' to parameter of type 'NSString * _Nonnull __strong' discards qualifiers
  • 两种正确的写法:
const static NSString *TableID = @"table";

static NSString * const TableIDCall = @"call";

oc random

腾讯OCR:导入framework问题

Undefined symbol: _OBJC_CLASS_$_MLDictionaryFeatureProvider
Undefined symbol: _OBJC_CLASS_$_MLMultiArray
Undefined symbol: _OBJC_CLASS_$_MLModel
  • 原因:和OcrDemo工程对比了一下,发现是CoreML.framework库未导入导致的。这是一个系统库。
  • 处理:导入该库,编译正常。

获取本地文件地址

  • 获取本地文件地址,然后传给前端,报错:
2022-08-15 17:56:54.690875+0800 app-demo-ios[1069:210438] <Weex>[error]DCImageComponent.mm:556, Error downloading image: /var/mobile/Containers/Data/Application/21FBD746-1859-4569-AC2A-90A593647A21/Library/Caches/OcrFiles/image_1660557414.jpg, detail:不支持的URL

  • 处理:需要在地址前加file://前缀

3 Pod

mac安装cocoapods失败

  • 安装cocoapods,版本1.9.3
sudo gem install cocoapods -v 1.9.3
  • 报错:
hh@hhdeMacBook-Pro-2 NoteBook % sudo gem install cocoapods -v 1.9.3
Fetching thread_safe-0.3.6.gem

Fetching i18n-0.9.5.gem

Fetching tzinfo-1.2.9.gem

Fetching ffi-1.15.5.gem
Fetching ethon-0.15.0.gem
Fetching activesupport-4.2.11.3.gem
Fetching cocoapods-core-1.9.3.gem
Fetching claide-1.1.0.gem
Fetching cocoapods-stats-1.1.0.gem
Fetching molinillo-0.6.6.gem
Fetching ruby-macho-1.4.0.gem
Fetching cocoapods-1.9.3.gem
Successfully installed thread_safe-0.3.6
Successfully installed tzinfo-1.2.9
Successfully installed i18n-0.9.5
Successfully installed activesupport-4.2.11.3
Building native extensions. This could take a while...
ERROR:  Error installing cocoapods:
    ERROR: Failed to build gem native extension.

    current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20220303-25236-1dhr2lh.rb extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
    --with-ffi_c-dir
    --without-ffi_c-dir
    --with-ffi_c-include
    --without-ffi_c-include=${ffi_c-dir}/include
    --with-ffi_c-lib
    --without-ffi_c-lib=${ffi_c-dir}/lib
    --enable-system-libffi
    --disable-system-libffi
    --with-libffi-config
    --without-libffi-config
    --with-pkg-config
    --without-pkg-config
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:546:in `block in try_link0'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tmpdir.rb:93:in `mktmpdir'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:543:in `try_link0'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:570:in `try_link'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:672:in `try_ldflags'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1832:in `pkg_config'
    from extconf.rb:9:in `system_libffi_usable?'
    from extconf.rb:42:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/ffi-1.15.5/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/ffi-1.15.5/gem_make.out
hh@hhdeMacBook-Pro-2 NoteBook % brew install rbenv
Error: Can't create update lock in /usr/local/var/homebrew/locks!
Fix permissions by running:
  sudo chown -R $(whoami) /usr/local/var/homebrew
Warning: You are using macOS 11.6.
We do not provide support for this pre-release version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience while you are running this pre-release version.

Error: The following directories are not writable by your user:
/usr/local/etc/bash_completion.d
/usr/local/lib/pkgconfig
/usr/local/share/aclocal
/usr/local/share/info
/usr/local/share/locale
/usr/local/share/man/man8
/usr/local/share/zsh
/usr/local/share/zsh/site-functions
/usr/local/var/homebrew/locks

You should change the ownership of these directories to your user.
  sudo chown -R $(whoami) /usr/local/etc/bash_completion.d /usr/local/lib/pkgconfig /usr/local/share/aclocal /usr/local/share/info /usr/local/share/locale /usr/local/share/man/man8 /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew/locks

And make sure that your user has write permission.
  chmod u+w /usr/local/etc/bash_completion.d /usr/local/lib/pkgconfig /usr/local/share/aclocal /usr/local/share/info /usr/local/share/locale /usr/local/share/man/man8 /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew/locks
  • 加sudo执行命令,报错:
hh@hhdeMacBook-Pro-2 NoteBook % sudo brew install rbenv
Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.
  • 注意:ruby自带:
    hh@hhdeMacBook-Pro-2 NoteBook % ruby -v
    ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]

  • ruby安装cocoapods

  • 参考:
    https://www.jianshu.com/p/586edc5c57a7

ERROR:  Error installing cocoapods:
    ERROR: Failed to build gem native extension.
 sudo gem install cocoapods -v 1.8.3  

YYModel:pod失败

Installing YYModel (1.0.4)

[!] Error installing YYModel
[!] /usr/bin/git clone https://github.com/ibireme/YYModel.git /var/folders/xf/xsz954hn761_n1wvrw3wpl7m0000gn/T/d20220810-20357-1io0n3z --template= --single-branch --depth 1 --branch 1.0.4

Cloning into '/var/folders/xf/xsz954hn761_n1wvrw3wpl7m0000gn/T/d20220810-20357-1io0n3z'...
error: RPC failed; curl 16 Error in the HTTP2 framing layer
fatal: error reading section header 'shallow-info'

gitignore

  • .gitignore文件是在git上传时过滤不需要提交的文件的。示例如下:
#CocoaPods
Pods/ 

# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

# Mac OS X Finder and whatnot
.DS_Store

## Build generated
build/

4 调试,打包,上架

ios开发证书生成p12( ios导出p12)

iOS开发/发布证书导出证书描述文件

ios开发组团队添加账号

  • 说明:
    在iOS开发组团队添加账号之后,Apple会给开发者发送确认邮件(邮件主题为You're invited to join a development team.),首先需要点击确认(这个会进入苹果开发者网站进行验证/确认),其次开发组团队需要对该加入的账号授予相应的权限,不然开发者账号不会显示加入的开发组团队(Accounts--Team)。

  • 参考:
    https://www.jianshu.com/p/3afe646a8250

iOS真机调试,运行报错:

Showing Recent Messages
The network connection was lost.

//还有一句错误未复制到。
  • 说明:
    调试真机未包含在开发组团队的设备管理列表中。

修改工程文件夹路径名:

error: Build input file cannot be found: '/Users/hh/Documents/ios-pro/iOSSDK-3.2.16/app-demo-ios/HBuilder-Hello/HBuilder-Hello-Prefix.pch' (in target 'app-demo-ios' from project 'app-demo-ios')
  • 处理:
    修改HBuilder-Hello-Info.plist和HBuilder-Hello-Prefix.pch

打ipa包:Archive执行报错:

Showing Recent Messages
Undefined symbol: _OBJC_CLASS_$_UMZid

ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame
ld: warning: Could not find or use auto-linked framework 'AVFAudio'
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_UMZid", referenced from:
      objc-class-ref in UMCommon(UMConfigure.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

团队开发账户导出ipa

xcodebuild -exportArchive -exportFormat ipa -archivePath ./app-demo-ios\ 2021-12-7,\ 3.20\ PM.xcarchive ./test.ipa
xcodebuild: error: invalid option '-exportFormat'
xcodebuild -exportArchive :exportOptionsPlist -archivePath ./app-demo-ios\ 2021-12-7,\ 3.20\ PM.xcarchive ./test.ipa 
xcodebuild: error: The flag -exportOptionsPlist is required when specifying -exportArchive.
xcodebuild -exportArchive app-demo-ios\ 2021-12-7,\ 3.20\ PM.xcarchive -exportPath test.ipa
xcodebuild: error: The flag -exportOptionsPlist is required when specifying -exportArchive.
xcodebuild: error: The flag -archivePath is required when specifying -exportArchive.
  • 重新执行,报错:
xcodebuild -exportArchive -archivePath app-demo-ios\ 2021-12-7,\ 3.20\ PM.xcarchive -exportPath test.ipa           
xcodebuild: error: The flag -exportOptionsPlist is required when specifying -exportArchive.
  • 原因:需要导出exportOptionsPlist,导出一份plist文件
    参考:
    https://jingyan.baidu.com/article/11c17a2cdcb4c9f446e39dbe.html

  • 结论:
    \color{#FF0000}{Product--Archive}执行,然后弹出ipa输出包弹框,然后发布ipa时选择第4个,开发者选项(\color{#FF0000}{Development}),再点击下一步(选自动,不要选手动),就可以导出了。
    导出之后,就有ipa包,然后使用iTools安装,成功。

换一个新手机,运行xcode,弹框:需要注册设备:

Device "“win10”的 iPhone" isn't registered in your developer account.

The device must be registered in order to be included in a provisioning profile.

Showing Recent Messages
Provisioning profile "iOS Team Provisioning Profile: com.app.demo" doesn't include the currently selected device "“win10”的 iPhone" (identifier e05f0b5d290c73bf9f00ca6a8fbceffe4066adad).

xcode 版本和手机系统不匹配(需要升级xcode,目前手机系统新的iPhone都在iOS14.8以上,iOS15以上)。

iPhonesm is not available.

Please reconnect the device.

iOS包ipa安装失败

无法安装“应用内部版”
无法安装此App,因为无法验证其完整性。

真机调试问题:

Failed to prepare device for development.

This operation can fail if the version of the OS on the device is incompatible with the installed version of Xcode. You may also need to restart your mac and device in order to correctly detect compatibility.

Xcode 运行报错

错误信息:
hh2的iPhone is not available.
Please reconnect the device.

查看 Xcode -- Window -- Device And Simulator
有如下报错信息:

Failed to prepare device for development.
If you are certain that Xcode supports development on this device, try disconnecting and reconnecting the device.
  • 查看具体报错信息:
    NSLocalizedFailure = "This operation can fail if the version of the OS on the device is newer than the version of Xcode that is running.";

苹果开发者官网发布应用(ios应用上架)

具体见iOS Archive打包ipa以及上架Apple Store

(1) 参考:
https://www.jianshu.com/p/b4f284de459e
https://www.yubaibai.com.cn/article/5612211.html
https://zhuanlan.zhihu.com/p/104987262
官方文档:
http://help.apple.com/xcode/mac/current/#/devba7f53ad4
https://help.apple.com/app-store-connect/#/dev34e9bbb5a
官方文档:App 审核:
https://developer.apple.com/app-store/review/

(2) Xcode Archive页面
参考:
https://www.jianshu.com/p/9eb133053a64

(3) ios应用上架错误
具体见iOS Archive打包ipa以及上架Apple Store

(4) 怎么进入iTunes connect

(5) Xcode下载问题:

我们未能完成您的购买。

可用的磁盘空间不足,无法安装此产品。

处理:从APPleStore下载Xcode,一定要磁盘容量留出超过45G才行。

(6) 删除testflight提交的版本

(7) testflight的app怎么发布到appstore

  • 说明:由于testflight里的app版本,需要进行验证完才能显示出来。所以appstore connect里在选择的构建版本一定是要testflight已经验证完的版本。

  • 参考:
    https://www.jianshu.com/p/52871d77f30f

(8) iTunes connect

(9) Xcode archive发布应用

(10)Xcode13发布应用到App Store

Apple Store Connect协议条款

Review the updated Paid Applications Schedule.
In order to update your existing apps, create new in-app purchases, and submit new apps to the App Store, the user with the Legal role (Account Holder) must review and accept the Paid Applications Schedule (Schedule 2 to the Apple Developer Program License Agreement) in the Agreements, Tax, and Banking module.

To accept this agreement, they must have already accepted the latest version of the Apple Developer Program License Agreement in their account on the developer website.
  • 说明:Apple Store Connect这里有个协议需要同意才能发布等操作。但是这里只能是账户持有者(Account Holder)才能处理,其他角色没有这个权限。

  • 参考:
    https://www.pianshen.com/article/33581174442/

ios发布找不到构建版本

  • 问题描述:
    1) ios发布到testflight但是看不到
    2)applestore connect找不到构建版本
    applestore connect显示信息:
从多种工具中选取一种来上传您的构建版本。查看上传工具
  • 参考:
    https://blog.csdn.net/huanghaiyan_123/article/details/48193863
    https://www.jianshu.com/p/1611c48a3d71

  • 处理:根据苹果审核构建版本的邮件,可知,需要在Info.plist中添加NSCameraUsageDescription这个key。

  • 说明:如果ios发布(Archive上传成功,但不一定就能发布),一段时间(验证时间)内仍然在applestore connect找不到构建版本,就需要找邮件或者其他途径看看是不是有报错信息。然后根据报错信息(如上为照相机权限未申请)修改代码再重新发布。

上架问题:

App Store Connect Operation Error
ERROR ITMS-90101: "This bundle does not support one or more of the devices supported by the previous app version. Your app update must continue to support all devices previously supported. You declare supported devices in Xcode with the Targeted Device Family build setting. Refer to QA1623 for additional information: https://developer.apple.com/library/ios/#qa/qa1623/_index.html"
  • 处理:
    去掉iPad选项,导致的问题。同时修改如下配置(去掉iPad)
    "@platforms":["android","iPhone","iPad"]

  • 注意:这里是uniapp离线工程,上面的配置是uniapp工程里的manifest.json配置文件的参数。

  • 参考:
    https://blog.csdn.net/qq_15023917/article/details/100733524

applestore审核

您的 App 包含 NSUserTrackingUsageDescription,这表示您将会请求追踪用户。要在 App 产品页上发布此信息,您必须注明哪些数据类型会追踪用户。如果此描述有误,请更新您的 App 二进制文件,并将新的构建版本上传到 App Store Connect。

Apple Connect:Register an App ID

  • 这个是为新建APP填写套装ID用的。
    套装ID如果找不到对应的APPID,可以通过链接跳转到注册页面。

  • 处理:
    Description:简要填写APP信息
    Bundle ID:选择Explicit(默认),填写报名
    Capabilities:复选:
    (1)用户版本
    Access WiFi Information
    Associated Domains
    Data Protection:选择Complete Protection
    In-App Purchase(默认选择,用户不可选)
    Push Notifications
    Sign In with Apple
    (2)内部版
    Associated Domains
    Inter-App Audio
    In-App Purchase(默认选择,用户不可选)
    Push Notifications
    Sign In with Apple
    (3)注意:除了In-App Purchase(默认选择,用户不可选)之外,其他的都可以重新选择

Apple Connect:新建App

  • 处理:
    平台:选择iOS
    名称:填写APP名称
    主要语言:选择简体中文
    套装ID:从上面Register an ID里选择一个AppID
    SKU:这个自定义即可
    用户访问权限:选择“完全访问权限”

5 推送

ios申请推送服务

推送证书

Apple Push Notification service SSL Certificates

To configure push notifications for this App ID, a Client SSL Certificate that allows your notification server to connect to the Apple Push Notification Service is required. Each App ID requires its own Client SSL Certificate. Manage and generate your certificates below.

Development SSL Certificate

Create an additional certificate to use for this App ID.

Create Certificate
Production SSL Certificate

Create an additional certificate to use for this App ID.

Create Certificate

生成APNs后端推送证书

创建证书:

Certificates, Identifiers & Profiles

All Certificates
Create a New Certificate

Certificate Type
Apple Push Notification service SSL (Sandbox)

Upload a Certificate Signing Request
To manually generate a Certificate, you need a Certificate Signing Request (CSR) file from your Mac.
Learn more

6 其他

腾讯云:IM通讯

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 203,271评论 5 476
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 85,275评论 2 380
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 150,151评论 0 336
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,550评论 1 273
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,553评论 5 365
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,559评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,924评论 3 395
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,580评论 0 257
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,826评论 1 297
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,578评论 2 320
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,661评论 1 329
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,363评论 4 318
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,940评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,926评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,156评论 1 259
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 42,872评论 2 349
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,391评论 2 342

推荐阅读更多精彩内容