我一直在研究使用模拟器测试远程通知,并且知道从Xcode 11.4 beta开始,我们应该能够做到这一点。
我要测试的方式是:
[[UIApplication sharedApplication] registerForRemoteNotifications];
- (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
NSLog( @"Succeeded at registering for remote notifications" );
return;
}
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
{
NSLog( @"Failed to register for remote notifications" );
return;
}
我在didFailToRegisterForRemoteNotificationsWithError中遇到了断点,错误是: 模拟器中不支持远程通知
有办法解决吗?我是否误解了XCode 11.4支持的功能?