針對第三方外掛程式開發者的 InDesign 外掛程式公證

公證可確保您所發佈的開發者 ID 簽署軟體已通過 Apple 的惡意元件檢查。如需有關 Apple 公證規則和需求的詳細資訊,請參閱在發佈 macOS 軟體前完成公證程序

為符合 Apple 的公證規則,InDesign 2020 已啟用強化的執行階段權限,可讓第三方外掛程式載入 InDesign,而不需要對其進行程式碼簽署。不過,外掛程式開發者通常會透過安裝程式 (.pkg 或 .dmg) 在網頁上發佈外掛程式。由於 Apple 在 macOS 上的 Gatekeeper 會自動隔離未經公證的所有二進位檔,因此您的外掛程式安裝程式將無法順利執行。如需詳細資訊,請參閱 InDesign 和 macOS 10.15 (Catalina)。  正因如此,即使 InDesign 外掛程式不需要任何公證程序或程式碼簽署,也仍然需要對外掛程式安裝程式/二進位檔進行公證。

公證需求

憑證產生程序

  1. 要求憑證 (「鑰匙圈存取」選單 >「憑證輔助程式」>「從憑證授權要求憑證」)
  2. .certSigningRequest 檔案儲存至磁碟。
  3. 登入 Apple Developer 入口網站
  4. 按一下「Certificates, Identifiers & Profiles」
  5. 選擇「Developer ID Application」,以建立新的憑證。
  6. 上傳步驟 1 的 .certSigningRequest 檔案並完成程序。將顯示的 .cer 檔案下載至磁碟。
  7. 選擇「Developer ID Installer」,然後重複步驟 4 至 6。
  8. 上傳與步驟 1 相同的 .certSigningRequest 檔案並完成程序。將顯示的 .cer 檔案下載至磁碟。
  9. 按兩下步驟 6 和 8 下載的 .cer 憑證,以將其匯入至「鑰匙圈」。

適用於 .pkg 或 .dmg 檔案的公證步驟

此範例使用 SDK 的 BasicDialog 範例外掛程式。

  1. # 對 .InDesignPlugin 進行程式碼簽署

    codesign --sign "Developer ID Application: <Developer Name>" --verbose=4 --deep --force --strict BasicDialog.InDesignPlugin
  2. # 程式碼簽署驗證

    codesign -dv --verbose=4 BasicDialog.InDesignPlugin
  3. # 將上述已進行程式碼簽署的 .InDesignPlugin 新增至套件/安裝程式,以建立 .pkg 或 .dmg
  4. # 簽署您的安裝程式 (例如 .dmg 或 .pkg)

    productsign --sign "Developer ID Installer: <Developer Name>" ./BasicDialog.pkg ./BasicDialogSigned.pkg
  5. # 程式碼簽署驗證

    pkgutil --check-signature BasicDialogSigned.pkg
  6. # 傳送以供公證

    xcrun altool --notarize-app --primary-bundle-id "com.demo.plugin" --username "your-apple-id@xyz.com" --password "xxxx-xxxx-xxxx-xxxx" --file BasicDialogSigned.pkg
  7. # 線上檢查公證狀態 (步驟 6 應傳回請求 UID)

    xcrun altool --notarization-info <Request UID> --username "your-apple-id@xyz.com" --password "xxxx-xxxx-xxxx-xxxx"
  8. # 裝訂已公證的檔案以供離線使用

    xcrun stapler staple BasicDialogSigned.pkg
  9. # 檢查是否有裝訂器

    stapler validate --verbose BasicDialogSigned.pkg

更快、更輕鬆地獲得協助

新的使用者?