推入门通过Adhoc建立合作 [英] Getting push to work with adhoc builds

查看:210
本文介绍了推入门通过Adhoc建立合作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下面上设置教程推iOS版在这里:

这里,雷 - Wenderlich

它为开发版本,也就是说,在使用开发者证书调试模式下的应用程序。我可以用随附的simplepush.php脚本将消息发送到一台设备。

我不能得到这个工作,并即席建立 - 这是使用分配证书建

我需要什么在simplepush.php更改与即席建立,使这项工作?

我改的 gateway.sandbox.push.apple.com:2195 gateway.push.apple.com:2195 ,因为我认为沙箱应该用于发展/调试版本,并即席与AppStore的建立应该使用gateway.push.apple.com:2195。

我得到这个答复,但没有消息被传递到由设备令牌指定的设备。


  

连接到APNS
  邮件成功发送



解决方案

请注意在的设备令牌ID


  

这是发展和放大器不同;&安培;生产环境。


   - (无效)应用:(*的UIApplication)应用didRegisterForRemoteNotificationsWithDeviceToken:(NSData的*)deviceToken {       UIAlertView中*警报= [[UIAlertView中页头] initWithTitle:deviceToken消息:无委托:自我cancelButtonTitle:@OKotherButtonTitles:无];
        [警报显示]
}

I am following the tutorial on setting up iOS push here:

Here - Ray Wenderlich

It works for development builds, ie an app in Debug mode using Developer certificate. I can send messages to a single device using the provided simplepush.php script.

I can't get this to work with adhoc builds - which are built using the distribution certificate.

What do I need to change in simplepush.php to make this work with adhoc builds?

I changed gateway.sandbox.push.apple.com:2195 to gateway.push.apple.com:2195 because I reckon the sandbox should be used for Development/debug builds, and adhoc and appstore builds should use gateway.push.apple.com:2195.

I get this response, but no messages are delivered to the device specified by the device token.

Connected to APNS Message successfully delivered

解决方案

Please be aware of the device token-ID,

which is different for the development && Production environment .

- (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {

       UIAlertView *alert= [[UIAlertView alloc]initWithTitle: deviceToken message:Nil delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil];
        [alert show];
}

这篇关于推入门通过Adhoc建立合作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆