iOS激光推送到开发环境,但无法推送到生产环境

在测试iOS Development环境下可以收到激光推送,而在iOS AdHoc环境下收不到激光推送。经查证,需要如下配置:
一、App端(iOS)
在AppDelegate.m的initJPush方法中 [JPUSHService setupWithOption:launchOptions appKey:JPushAppKey channel:@"App Store" apsForProduction:versionFlag];/* versionFlag在生产环境时要设为: true, 而在开发环境要设为: false*/

二、Server端(PHP)

$platform = 'android,ios' ;

$msg_content = json_encode(array('n_builder_id'=>0, 'n_title'=>$n_title, 'n_content'=>$n_content,'content-available'=>1,'apns_production'=>1));

$obj = new jpush($masterSecret,$appkeys);

注:App和Server端的“apns_production”一定要保持一致。




猜你喜欢

转载自blog.csdn.net/CDUT100/article/details/77765532