开发 Apple 的 iOS 应用程式,若在 Mac 装置安装好 Xcode 时,就可以透过 Xcode 直接建立该 Mac 装置的机器凭证,送至 Apple 的 Developers 网站当中以利后续使用 "iOS 装置" 开发或测试应用程式。
甚至,后续要将 iOS 应用程式发布至 AppStore Connect 当中,无论是要先进行 TestFlight 测试;或是对自己的 iOS 应用很有信心要直接送审,也都是需要先有 Mac 装置製作的机器凭证,作为 iOS 应用程式发布凭证才行。
也就是说无论要用哪种开发技术,想要发布 iOS 应用程式到 App Store 都必须处理这档事。
Xcode
在 Xcode 的选单列中,找到 "Settings…"
点选 "Accounts" 后,点选 "+":
选择 "Apple Account" 后点选 "Continue":
输入 Apple Account 的帐号密码:
登入完成后应该会显示这样的画面,如果你登入的帐号是拥有 Admin 以上权限的角色,那就可以进一步的进行 "Manage Certificates…" 的处理:
如果看倌是第一次建立 Apple Developer 的 Certificate 或是先前建立的 Certificate 都已经过期,那就都会空空如也。
对照 Apple Developers 网站上的 Certificates 与 Xcode 当中的显示:
点选画面上的 "+" → "Apple Development" 理论上 Xcode 就会自动完成建立:
建立完成后,透过 macOS 的钥匙圈确认一下。
在 macOS 中透过 Spotlight 搜寻 "钥匙圈",点选 "钥匙圈存取":
点选 "打开钥匙圈存取",此时会需要输入使用该 Mac 装置帐号的密码作为验证:
建立完成后 "钥匙圈" 会看到此张凭证与凭证的专用密钥:
而此时再到 Apple 的 Developer 网站当中查看 Certificates 的部分,会看到已经建立一张 "Type" 为 Development 的凭证:
再次回到 Xcode 的 Certification 来建立发布用的凭证。
点选画面上的 "+" → "Apple Distritubtion" 理论上 Xcode 就会自动完成建立。
再次到 macOS 当中的钥匙圈查看一次:
再到 Apple 的 Developer 网站当中查看 Certificates 的部分,会看到已经建立一张 "Type" 为 Distribution 的凭证:
这张 "Type" 为 Distribution 的凭证就可以準备用来发布 iOS 应用程式到 AppStore Connect 当中。
I'm a Microsoft MVP - Developer Technologies (From 2015 ~).
I focus on the following topics: Xamarin Technology, Azure, Mobile DevOps, and Microsoft EM+S.
If you want to know more about them, welcome to my website:
https://jamestsai.tw
本部落格文章之图片相关后製处理皆透过 Techsmith 公司 所赞助其授权使用之 "Snagit" 与 "Snagit Editor" 软体製作。