移动设备中的aps环境,但不包括权利

时间:2013-07-03 03:17:16

标签: ios xcode xcodebuild

我正在从命令行构建iOS应用程序,然后使用xcrun签名/嵌入移动设备。

当我从GUI运行时,我看到了预期的结果,并且我能够收集推送通知的设备令牌: Payload / appname.app / embedded.mobileprovision中的嵌入式配置文件显示以下信息:

<key>aps-environment</key>
<string>production</string>

当我在app负载上运行codesign -d --entitlements时,我看到以下内容:

<key>aps-environment</key>
<string>production</string>

当我从命令行运行时,我在嵌入式配置中看到了相同的内容,但是codesign --entitlement的输出不再显示aps-environment。我用于命令行构建的命令如下:

/usr/bin/xcodebuild -configuration Distribution clean build
/usr/bin/xcrun -sdk iphoneos PackageApplication "path-to-the.app" -o "file.ipa" --sign "iPhone Distribution: My Name" --embed "path-to-the.mobileprovision"

我从设备看到的错误是:

No valid 'aps-environment' entitlement string found for application 'appname': (null). Notifications will not be delivered.

与GUI相比,我在命令行中做错了什么?

0 个答案:

没有答案