SKCloudServiceSetupViewController sometimes doesn't finish loading

Originator:jay.whitsitt
Number:rdar://30403680 Date Originated:7-Feb-2017
Status:Open Resolved:
Product:iOS + SDK Product Version:Store Kit
Classification:Crash/Hang/Data Loss Reproducible:Sometimes
 
Area:
StoreKit

Summary:
When presenting the SKCloudServiceSetupViewController instance after the handler sent to "loadWitihOptions:completionHandler:" is called with result == YES, the view controller will present but doesn't always finish loading its contents.

Attached is a screenshot showing the issue as well as a sysdiagnose from a device having this issue. On this device, there were several times that did were then several times that didn't. The last time that didn't occurred at 2:16 pm CST. The sysdiagnose was started about 45 seconds after that occurred.

Changing networks or turning wifi off and back on doesn't fix the issue.  Once a device gets stuck on this spinner, it seems to always see the spinner when the view controller is loaded.  It will stay this way for a long time.  Have not yet found what gets it unstuck.

Steps to Reproduce:
SKCloudServiceSetupViewController *setupController = [SKCloudServiceSetupViewController new];
setupController.delegate = weakSelf;
NSDictionary<SKCloudServiceSetupOptionsKey, id> *options = @{ SKCloudServiceSetupOptionsActionKey : SKCloudServiceSetupActionSubscribe,
                                                              SKCloudServiceSetupOptionsAffiliateTokenKey : kiTunesAffiliateCode };
[setupController loadWithOptions:options completionHandler:^(BOOL result, NSError * _Nullable error) {
    if (result) {
        [weakSelf.viewController presentViewController:setupController animated:YES completion:nil];
        
    } else {
        //There was an error loading the SKCloudServiceSetupViewController
    }
}];

Expected Results:
After presenting the setupController in the code above, the screen upselling the trial will fully load.

Actual Results:
After presenting the setupController in the code above, sometimes a spinner will display and the screen will never show its contents like the start trial button or the service description. (Screenshot attached)

Version:
iOS 10.2.1, 10.1.1

Notes:


Configuration:
iPhone 6s, 7 Plus

Attachments:
'sysdiagnose_2017.02.07_14-17-13-0600.tar.gz' and 'Screen Shot 2017-02-07 at 2.32.22 PM.png' were successfully uploaded.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!