Post not yet marked as solved
Trying to go into My Apps on itunes connect (https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/ra/ng/app) after uploading a new build of an application, and receiving an email notification that it had completed processing, and I get the following error page:(https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/wa/defaultError)We can't process your request.Try reloading the page. If the problem persists, contact us.iTunes Connect HomepageThis has been happening for a number of hours now, and I can't get in to release a new beta build.
Post not yet marked as solved
I have two projects (three actually) that are similar, except for appId and provisioning. They are all going to be using APNs, so I can't use the generic profile.Now, one project com.redskyit.mobile.rmcv2d is building fine, xcode finds the development provisioning profile that matches its ID and signs it ok.The second project com.redskyit.mobile.rmcv2 is not finding the provisioning profile that matches the id and is falling back on the generic one, which then fails because the project is configured to use the aps-environment which isn't supported by the generic profile.What I don't understand is why is xcode not finding the specifc profile for this app id?I installed it (I believe) because I downloaded it and double clicked it. Though I can't find where to check if it is installed, Xcode -> Preferences... -> Accounts -> (my account) doesn't list any provisioning profiles, just two teams, my own team and the companies team.Where can I view the profiles that are installed?How can I debug why xcode is not finding them.Thanks
Post not yet marked as solved
I have an app delegate that has the following method:--(BOOL) registerForNotifications:(UIApplication *)application {
// [START register_for_notifications]
// Register for remote notifications. This shows a permission dialog on first run, to
// show the dialog at a more appropriate time move this registration accordingly.
if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_7_1) {
// iOS 7.1 or earlier. Disable the deprecation warnings
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
UIRemoteNotificationType allNotificationTypes =
(UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge);
[application registerForRemoteNotificationTypes:allNotificationTypes];
#pragma clang diagnostic pop
} else {
// iOS 8 or later
if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_9_x_Max) {
UIUserNotificationType allNotificationTypes =
(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge);
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:allNotificationTypes categories:nil];
[application registerUserNotificationSettings:settings];
} else {
// iOS 10 or later
#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
// For iOS 10 display notification (sent via APNS)
[UNUserNotificationCenter currentNotificationCenter].delegate = self;
UNAuthorizationOptions authOptions = UNAuthorizationOptionAlert | UNAuthorizationOptionSound | UNAuthorizationOptionBadge;
[[UNUserNotificationCenter currentNotificationCenter]
requestAuthorizationWithOptions:authOptions
completionHandler:^(BOOL granted, NSError * _Nullable error) {
NSLog(@"notification permission is %@", granted ? @"granted" : @"denied");
}
];
#endif
}
[application registerForRemoteNotifications];
// [END register_for_notifications]
}
return YES;
}If I call this method from- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[self registerForNotifiations:application];
}it works.However, if I call it later (from another thread) as follows, it doesn't work:UIApplication *application = [UIApplication sharedApplication];
[(AppDelegate *)[application delegate] registerForNotifications:application];If I delete, and install app with the first method, so notifications work, I can switch to the second code and update the app, and notifications will still work, but I can't do the reverse, that is, install app with second method, notifications don't work, update app to use first method, notifications still don't work, until I delete the app and re-install.Do I need to call this on the main thread perhaps? If so how do I do that?*edit*Ok, tried the following version of the second method and it made no difference. dispatch_async(dispatch_get_main_queue(), ^{
UIApplication *application = [UIApplication sharedApplication];
[(AppDelegate *)[application delegate] registerForNotifications:application];
});Is [UIApplication sharedApplication] the same as application passed to didFinishLaunchingWIthOptions?I am at a loss as to why this is not working.