IOS???????????
???????????? ???????[ 2014/8/20 10:40:41 ] ????????iOS ?????
????Provider??APNS???????????ο?javapns??NotificationTest.java???????ο??????????
????(1)??????????????????
????Push.badge(2?? keystore?? password?? false?? "7bb8d508e32df651c6c239439737dbd40a88d2461ad2ac1e5dbe49ecea5ccc67");
???????У?2????????????
????String keystore = "PushCertificates.p12"; //P12?????·????
????String password = "sosoimage"; //P12?????????
????false?????????ò??????????????????????????true.
????"7bb8d508e32df651c6c239439737dbd40a88d2461ad2ac1e5dbe49ecea5ccc67"???????ò?????Provider??DeviceToken????????????????String[]?????????????????Push?????
????(2)??????????????????
????Provider??????????Push???Message?????????????????????Message?????????????????????????
????Push.alert("A Message"?? keystore?? password?? )false?? "7bb8d508e32df651c6c239439737dbd40a88d2461ad2ac1e5dbe49ecea5ccc67");
????(3)?????
?????????????Push????︽???????????Message?? ???????????????????′???.
????PushNotificationPayload payload = PushNotificationPayload.complex();
????payload.addAlert("A Message");
????payload.addBadge(2);
????payload.addSound("test.aiff");
????Push.payload(payload?? ?? keystore?? password?? false?? "7bb8d508e32df651c6c239439737dbd40a88d2461ad2ac1e5dbe49ecea5ccc67");
?????????????п???????????Exception??????????????????????÷??????ο? http://code.google.com/p/javapns/
????IOS?????????????APNS?????????
????(1)??????δ???????????????????????AppDelegate?е?didFinishLaunchingWithOptions??????????????????£?
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
...
NSDictionary* payload = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
if (payload)
{
...
}
...
}
????(2)?????????????У?????????????????????????????????????????????????????????????????????????????????????AppDelegate??didReceiveRemoteNotification???????????????????д????????????????????????????????
????- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)payload
????{
????...
????}
????(3)???????????????????????????NSDictionary??????????????ο????′???
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)payload
{
NSLog(@"remote notification: %@"??[payload description]);
NSString* alertStr = nil;
NSDictionary *apsInfo = [payload objectForKey:@"aps"];
NSObject *alert = [apsInfo objectForKey:@"alert"];
if ([alert isKindOfClass:[NSString class]])
{
alertStr = (NSString*)alert;
}
else if ([alert isKindOfClass:[NSDictionary class]])
{
NSDictionary* alertDict = (NSDictionary*)alert;
alertStr = [alertDict objectForKey:@"body"];
}
application.applicationIconBadgeNumber = [[apsInfo objectForKey:@"badge"] integerValue];
if ([application applicationState] == UIApplicationStateActive && alertStr != nil)
{
UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:@"Pushed Message" message:alertStr delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alertView show];
}
}
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
???ios???????????????Щ????IOS???á?????豸?????TestAgent??????????????????MR????ν???IOS?豸???????????????????????MobileRunner iOS???????iOS???????iOS???????????? ???????????iOS??JSON?????????????iOS UnitTest?????????iOS?????????????6С???BugAppium iOS 10 ????????iOS???????iOS UI???????????iOS APP????????????????????????????????ν???iOS????????????????iOS?湫?????????????????????????????????????iOS???????????????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????