Until now I used development push certificate and the push notifications worked great.
到目前为止,我使用了开发推送证书,推送通知效果很好。
Now I want to submit my app to Apple so I created a production certificate and set it under "code signing identity" -> "Release"
现在我想将我的应用程序提交给Apple,因此我创建了一个生产证书并将其设置为“代码签名身份” - >“发布”
I also placed the .p12 file in my production server.
But the push now does not work.
我还将.p12文件放在我的生产服务器中。但推动现在不起作用。
Is it suppose to work when I run from xcode? or will it just work when downloading the app from App Store? If so how can I test it?
当我从xcode运行时,它是否可以工作?或者从App Store下载应用程序时它会起作用吗?如果是这样我该怎么测试呢?
5 个解决方案
#1
26
The production push will work when you download the app from the App Store.
从App Store下载应用程序时,生产推送将起作用。
UPDATE:
You can also test the production push with an AdHoc build of the app; see Trinca's answer.
更新:您还可以使用应用的AdHoc版本测试生产推送;看看Trinca的回答。
UPDATE:
Now, the easiest solution is to use Apple's TestFlight. (In TestFlight, it is easy to add new remote users, sending them an email invitation, they then download on whatever device they choose.)
更新:现在,最简单的解决方案是使用Apple的TestFlight。 (在TestFlight中,很容易添加新的远程用户,向他们发送电子邮件邀请,然后他们会在他们选择的任何设备上下载。)
#2
47
You can test APNS production environment building an AdHoc version of your App. The app will be using the production certificates and servers and it's purpose is exactly to test BEFORE you send it to AppleStore.
您可以测试APNS生产环境,构建App的AdHoc版本。该应用程序将使用生产证书和服务器,它的目的是在您将其发送到AppleStore之前进行测试。
Take a looke at this link: what kind of certificate do I need to test apns using ad-hoc distribution?
在这个链接上找一个looke:使用ad-hoc发行版测试apns需要什么样的证书?
#3
12
Create an Adhoc distribution profile for your app in provisioning profile. Download profile and install. Choose the Adhoc dist profile to code sign your app. Archive ipa and save for adhoc distribution. Copy ipa to your device and test push. It will use production push certs as opposed to development cert. Hope this helps.
在配置文件中为您的应用创建Adhoc分发配置文件。下载配置文件并安装。选择Adhoc dist配置文件以对您的应用进行代码签名。归档ipa并保存以进行adhoc分发。将ipa复制到您的设备并进行测试推送。它将使用生产推送证书而不是开发证书。希望这可以帮助。
#4
1
If you want to test Push Notification on production environment, you need to take care of few things:-
如果要在生产环境中测试推送通知,则需要注意以下几点: -
- Production push notifications can only be tested on ipa. You need to create ipa from AdHoc Distribution profile.
- 生产推送通知只能在ipa上进行测试。您需要从AdHoc Distribution配置文件创建ipa。
- You need to replace the Push certificate on your Push API server. APNS Distribution certificate is to be used in this case.
- 您需要替换Push API服务器上的推送证书。在这种情况下,将使用APNS分发证书。
- If your API is in DOTNET then you need to change the boolean value to true.
- 如果您的API在DOTNET中,则需要将布尔值更改为true。
- Change Code Signing Identity to distribution on both Projects and Targets
- 将代码签名标识更改为在项目和目标上分发
#5
0
Testing production notifications (without releasing the build) is possible when the app is installed via Apple TestFlight.
通过Apple TestFlight安装应用程序时,可以测试生产通知(无需发布版本)。
This way the production notifications will be delivered to the app.
这样,生产通知将被传递到应用程序。
(If the exactly same build is installed via HockeyApp or by other means, the production notifications won't be delivered.)
(如果通过HockeyApp或其他方式安装完全相同的构建,则不会传递生产通知。)
Just set the build to internal testing after the build has finished processing in iTunes Connect.
在构建完成iTunes Connect中的处理后,只需将构建设置为内部测试。
#1
26
The production push will work when you download the app from the App Store.
从App Store下载应用程序时,生产推送将起作用。
UPDATE:
You can also test the production push with an AdHoc build of the app; see Trinca's answer.
更新:您还可以使用应用的AdHoc版本测试生产推送;看看Trinca的回答。
UPDATE:
Now, the easiest solution is to use Apple's TestFlight. (In TestFlight, it is easy to add new remote users, sending them an email invitation, they then download on whatever device they choose.)
更新:现在,最简单的解决方案是使用Apple的TestFlight。 (在TestFlight中,很容易添加新的远程用户,向他们发送电子邮件邀请,然后他们会在他们选择的任何设备上下载。)
#2
47
You can test APNS production environment building an AdHoc version of your App. The app will be using the production certificates and servers and it's purpose is exactly to test BEFORE you send it to AppleStore.
您可以测试APNS生产环境,构建App的AdHoc版本。该应用程序将使用生产证书和服务器,它的目的是在您将其发送到AppleStore之前进行测试。
Take a looke at this link: what kind of certificate do I need to test apns using ad-hoc distribution?
在这个链接上找一个looke:使用ad-hoc发行版测试apns需要什么样的证书?
#3
12
Create an Adhoc distribution profile for your app in provisioning profile. Download profile and install. Choose the Adhoc dist profile to code sign your app. Archive ipa and save for adhoc distribution. Copy ipa to your device and test push. It will use production push certs as opposed to development cert. Hope this helps.
在配置文件中为您的应用创建Adhoc分发配置文件。下载配置文件并安装。选择Adhoc dist配置文件以对您的应用进行代码签名。归档ipa并保存以进行adhoc分发。将ipa复制到您的设备并进行测试推送。它将使用生产推送证书而不是开发证书。希望这可以帮助。
#4
1
If you want to test Push Notification on production environment, you need to take care of few things:-
如果要在生产环境中测试推送通知,则需要注意以下几点: -
- Production push notifications can only be tested on ipa. You need to create ipa from AdHoc Distribution profile.
- 生产推送通知只能在ipa上进行测试。您需要从AdHoc Distribution配置文件创建ipa。
- You need to replace the Push certificate on your Push API server. APNS Distribution certificate is to be used in this case.
- 您需要替换Push API服务器上的推送证书。在这种情况下,将使用APNS分发证书。
- If your API is in DOTNET then you need to change the boolean value to true.
- 如果您的API在DOTNET中,则需要将布尔值更改为true。
- Change Code Signing Identity to distribution on both Projects and Targets
- 将代码签名标识更改为在项目和目标上分发
#5
0
Testing production notifications (without releasing the build) is possible when the app is installed via Apple TestFlight.
通过Apple TestFlight安装应用程序时,可以测试生产通知(无需发布版本)。
This way the production notifications will be delivered to the app.
这样,生产通知将被传递到应用程序。
(If the exactly same build is installed via HockeyApp or by other means, the production notifications won't be delivered.)
(如果通过HockeyApp或其他方式安装完全相同的构建,则不会传递生产通知。)
Just set the build to internal testing after the build has finished processing in iTunes Connect.
在构建完成iTunes Connect中的处理后,只需将构建设置为内部测试。