sI have for my universal-App the today-extension. When tapping in the tableView of the my extension the app is launching.
- Test with simulator iPhones with iOS8 -> ok works and opens app
- Test with simulator iPads with iOS8 -> ok works and opens app
- Test with iPhone 5S iOS8GM -> ok works and opens the app
- Test with iPadAir iOS8 (installed 17/9) -> extension shown when tapping tableView disappears, come back after a few seconds, when tapping again same procedure till after about 8 times made this game the message "loading not possible" is shown.
Does anyone have the same issue and know a solution? Or what can I check?
EDIT to localize the problem:
My code in the today-extension is:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
NSURL *url = [NSURL URLWithString:@"hdb://"];
NSString *ZwischenZiel = [[self.todayParser.todayArray objectAtIndex:indexPath.row] View];
NSInteger Ziel = [ZwischenZiel integerValue];
NSUserDefaults *sharedDefaults = [[NSUserDefaults alloc] initWithSuiteName:@"group.com.hotel-de-bordeaux.HdB"];
[sharedDefaults setInteger:Ziel forKey:@"ViewValue"];
[sharedDefaults synchronize];
[[self extensionContext] openURL:url completionHandler:nil];
[tableView deselectRowAtIndexPath:indexPath animated:NO];
}
The value in the sharedDefaults is stored correct. When starting the app after the today-extension by tapping the icon the app launches with the view corresponding to the stored ViewValue in the sharedDefaults.
So the iPad has a problem with the code:
[[self extensionContext] openURL:url completionHandler:nil];
because the selected row is deselected when appearing after a few seconds.
*********UPDATE**********
After hours of searching and trying I tested to run the today-extension on the iPad Air (real device) to get some logs what happens about the storing userDefaults.
Test1: delete app from iPad Air. Installing the app with the main app scheme
this was only to be sure the issue is still there. Yes, no way to get from the today-extension to the app. In 1 of more than 30 attempts it worked.
Test2: delete the app again. Installing the app with the today-extension scheme:
Now the app is installed but not launched. Instead the notifications opens and the today-extension comes up. In the logs all values are right. Touching one of the cells opens the app as it should!!! And the app is working too. Closing the app and opening the notifications - all logs are correct, all working right.
So there must be a bug in my iOS8 update/general for the iPad or a bug in the xcode6. Or I crated a very special app ;-) On the iPad it depends how I install the app!
Results:
installing by main scheme iPhone -> all correct
installing by main scheme iPad -> app runs ok, extension problems to open app
installing by extension scheme iPhone -> all correct
installing by extension scheme iPad -> all correct
Too fast - it seems that there is a difference which scheme is used as long as the iPad is connected via USB to the imac. When solving the connection the old issue returns. :-(
How can I figure out if my iOS-installation on the iPad has a "error" or the xcode6-installation has a problem?