Я новичок в iOS и уведомлении Push. Мой PNS работает хорошо в режиме разработки, теперь я хочу сделать это для производственных целей.Push-уведомление о режиме производства
Plase руководство мне все процедуры для производственного режима. Также как можно проверить тестовое уведомление Push или нет в режиме «Производство».
Бела код хорошо работает в режиме Devlopment ...
#pragma mark - Push Notifications Methods
- (void)application:(UIApplication *)application
didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
NSString *tokenStr = [deviceToken description];
// Separete Your device token with <,< and blanksapace
NSString *pushToken = [[[tokenStr
stringByReplacingOccurrencesOfString:@"<" withString:@""]
stringByReplacingOccurrencesOfString:@">" withString:@""]
stringByReplacingOccurrencesOfString:@" " withString:@""];
sclass.deviceToken = pushToken;
// Save the token to server
NSString *urlStr = [NSString stringWithFormat:@"http://www.vijaywebsolutions.com/Development_FTP/webservice/webservices.php?deviceToken=%@",pushToken]; // Passing token to URL
NSURL *url = [NSURL URLWithString:urlStr];
NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:url];
NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:req delegate:self]; // Support to perform URLrequest
if(theConnection)// checking connection successfull or not
{
webData = [NSMutableData data];
NSLog(@"device token is %@", pushToken);
}
}
- (void)application:(UIApplication *)application
didReceiveRemoteNotification:(NSDictionary *)userInfo
{
if (application.applicationState == UIApplicationStateActive) // If app is running and you got notification then show it
{
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Did receive a Remote Notification" message:[NSString stringWithFormat:@"You Have a Notification :\n%@",userInfo[@"aps"][@"alert"]]delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alertView show];
}
NSLog(@"Payload: %@", userInfo);
imageURL = userInfo[@"aps"][@"alert"];
MainViewController *MvC=[[MainViewController alloc]initWithNibName:@"MainViewControlleripad" bundle:nil];
self.window.rootViewController=MvC;
[MvC sshowansimage:imageURL];
}
Используете ли вы надлежащую подготовку к производственной среде? – rishi
Нет, у меня не было профиля для производственного режима. нужна вся помощь gudline pls – user2902101
может дать пошаговую процедуру для режима проксирования – user2902101