LoginSignup
13
11

More than 5 years have passed since last update.

XCODE8 entitlements ファイル設定

Posted at

XCODE8での証明書記入方法

※APPNAMEは、アプリケーション名です。

XCODE8では、通知での証明書が義務付けされ entitlementsファイルが必要になります。(Capabilities > Push Notification = ON で自動作成される)
XCODE8にて、新規作成時に「APPNAME.entitlements」が自動作成される。

内容は以下となる。(Source codeでの表示)

APPNAME.entitlements
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>aps-environment</key>
    <string>development</string>
</dict>
</plist>

developmentのみの設定となるので、production用も作成が必要なので、新規plist作成する方法で、「APPNAME_production.entitlements」などで作成(中身をAPPNAME.entitlementsをコピーして下記のように、「development」を「production」に変更する)

APPNAME_production.entitlements
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>aps-environment</key>
    <string>production</string>
</dict>
</plist>

後、TARGETSのBuild Settings > Signing > Code Signing Entitlements に指定が必要です。

Code_Signing_Entitlements
Debug   APPNAME/APPNAME.entitlements
Release APPNAME/APPNAME_production.entitlements

以上での通知設定の証明書設定となります。

13
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
11