且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

验证iPhone推送通知令牌?

更新时间:2023-02-27 09:11:11

请求的推送令牌是特定于应用程序的,还是设备上的所有应用程序共享令牌?没有所请求的令牌是特定于您的应用程序和每个设备的.

Is a requested push token specific to the app, or do all apps on the device share a token? No the requested token is specific to your Application and each device.

我是否可以通过任何方法验证设备发送给我的服务器的令牌确实是由我的应用程序中的请求生成的?苹果提供了一项服务,您可以在其中查询并确定令牌是否仍然有效",该令牌用于诸如用户删除您的应用程序且其令牌无效的事情,您可以查询该服务并检查是否令牌仍然有效,如果不从您的数据库中删除它,那么您也可以使用此服务来确保给定的任何令牌都是有效的...无论如何,如果您尝试使用无效的令牌,我怀疑不会发生任何事情...

Is there any way for me to validate that the token the device sends to my server was indeed generated by a request within my app? There is a service with apple in which you can query and find out if a token is "still valid", this is used for things such as when a user deletes your application and their token is invalidated, you can query the service and check if the token is still valid and if not delete it from your database...So you can also use this service to make sure any tokens given are valid...anyway if u try to push to an invalid token i suspect nothing will happen...

希望这会有所帮助