xcnotary, the missing Mac app notarization helper made with Rust

栏目: IT技术 · 发布时间: 6年前

xcnotary, the missing Mac app notarization helper made with Rust

the missing macOS app notarization helper, built with Rust

About

Notarizing a macOS app involves a series of manual steps, including zipping the bundle, uploading it to to Apple, and polling the notarization service.

xcnotary automates these steps for you. It:

stderr

xcnotary, the missing Mac app notarization helper made with Rust

Screencap sped up for brevity. The service takes several minutes to notarize your upload.

Installation

Homebrew

brew install akeru-inc/tap/xcnotary

Usage

xcnotary \
  -d <Apple Developer account> \
  -k <keychain item for Apple Developer account password, see below> \
  -b <bundle path>

Specifying the password keychain item

This tool does not handle your Apple Developer password. Instead, Xcode's helper altool reads an app-specific Apple Developer ID password directly from the keychain. See the documentation for xcrun altool --store-password-in-keychain-item to set up a suitable keychain item.

Required network access

  • Xcode's altool will connect to several Apple hosts as outlined in the documentation .

  • When notarization fails, xcnotary will connect to https://osxapps-ssl.itunes.apple.com/ on port 443 to retrieve the failure log.

Bundle pre-checks

xcnotary attempts to check your bundle for some common notarization issues before uploading it to Apple. While not foolproof, these checks may potentially save you minutes waiting for a response only to fail due to an incorrect code signing flag.

xcnotary, the missing Mac app notarization helper made with Rust

The following checks are currently performed:

  • Bundle being signed with a Developer ID certificate and not containing unsigned items.
  • Bundle being signed with a secure timestamp.
  • Bundle not having the get-task-allow entitlement.
  • Bundle having hardened runtime enabled.

Building a notarization-friendly bundle

Following is a working example that sets various necessary build flags, such as code signing with a "secure timestamp":

xcodebuild \
   -target <target> \
   -scheme <scheme> \
   -configuration Release \
   -derivedDataPath .xcodebuild \
   "CODE_SIGN_IDENTITY=Developer ID Application: <team name>" \
   "OTHER_CODE_SIGN_FLAGS=--timestamp --options=runtime" \
   CODE_SIGN_INJECT_BASE_ENTITLEMENTS=NO \
   CODE_SIGN_STYLE=Manual

CODE_SIGN_IDENTITY should match the corresponding Keychain certificate.

Note that --options=runtime will have the effect of opting in your binary to the hardened runtime environment. You most likely want to first manually enable the "Hardened Runtime" capability in Xcode's target settings > "Signing and Capabilities" and make sure your application functions as expected. There, you may also add any entitlements to relax the runtime restrictions.

Contact

Feature requests/comments/questions? Write: david@akeru.com


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

产品增长力

产品增长力

李阳 / 机械工业出版社 / 2018-4-1 / 59

本书由京东资深数据产品经理撰写,重新定义了数据与产品、业务的关系,从数据分析方法、数据价值挖掘、数据结果倒逼业务优化3个层次,以及设计、运营和优化3个维度,为产品增长提供了科学的依据和方法论,得到了PMCaff创始人阿德、GrowingIO创始人&CEO张溪梦、增长官研究院创始人范冰、腾讯高级产品经理刘涵宇等专家的高度评价。 全书内容以理论为主线,以实操为目标,萃取技术实操与管理思维中的精华......一起来看看 《产品增长力》 这本书的介绍吧!

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

html转js在线工具
html转js在线工具

html转js在线工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具