具有通配符和推送通知标识符的 iOS 配置文件

标签 ios objective-c provisioning-profile

当我尝试为推送通知注册配置文件时,苹果不允许指定通配符标识符的选项。 我是否必须始终在我的开发者帐户中创建两个配置文件?一个用于推送和一个普通标识符,还是有更好的方法?

最佳答案

那是因为 Apple 必须为这个特定的应用程序提供一个唯一的标识符。如果您尝试创建一个包含应用内购买的应用,同样的规则也适用。在这两种情况下,都不允许使用通配符。

您别无选择,只能创建一个明确的 ABCDEFGHIJ.com.myCompanyName.myAppNameHere 类型标识符,并将其用作您的开发/分发配置文件的供应配置文件的 App ID。

此处的文档:https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/AddingCapabilities/AddingCapabilities.html

Apple Push Notification service (APNs) allows an app that isn't running in the foreground to notify the user that it has information for the user. Unlike other capabilities, you don't configure push notifications in your Xcode project. To enable push notifications, you create an explicit App ID that enables push notifications and a corresponding client SSL certificate.

You can create only one explicit App ID that matches your bundle ID. Therefore, if Xcode created an explicit App ID for you—for example, when you added another capability that requires an explicit App ID—you should use it; otherwise, you create an explicit App ID that matches your bundle ID. You then generate and download a corresponding client SSL certificate—this step fully enables push notifications—and refresh provisioning profiles in Xcode. Later, you install the client SSL certificate and key on your server.

关于具有通配符和推送通知标识符的 iOS 配置文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19188470/

相关文章:

读取字符串值时 iPhone 泄漏

ios - MonoTouch 创建带圆角的 UIImage

xcodebuild - 'Code Sign error: Provisioning profile X can' 找不到'

iphone - 在 NSObject 上使用非正式协议(protocol)或使用可选方法的协议(protocol)有什么区别?

iOS 团队配置。 Xcode 不提供我们的团队配置文件作为选项。为什么?

ios - 安装的 iOS 应用程序可以在设备中运行,尽管其配置文件已从开发人员门户中删除

c# - Xamarin Forms 中的后台计时器 [PCL]

android - GLSL - 用于图像处理/混合的 fragment 着色器

iphone - 不兼容的指针类型将 'NSURL *__strong' 发送到类型为 'NSString *' 的参数

iphone - 我应该用什么来代替 OpenGL ES 2.0 中的 glTexCoordPointer()?