async Task PresentCloudServiceSetupAsync() { if (didPresentCloudServiceSetup) { return; } /* * If the current `SKCloudServiceCapability` includes * `.musicCatalogSubscriptionEligible`, this means that the currently signed * in iTunes Store account is elgible for an Apple Music Trial Subscription. * To provide the user with an option to sign up for a free trial, your * application can present the `SKCloudServiceSetupViewController` as * demonstrated below. */ var cloudServiceSetupViewController = new SKCloudServiceSetupViewController { Delegate = this }; var options = new SKCloudServiceSetupOptions(); options.Action = SKCloudServiceSetupAction.Subscribe; var result = await cloudServiceSetupViewController.LoadAsync(options); if (result.Item2 != null) { throw new NSErrorException(result.Item2); } if (result.Item1) { didPresentCloudServiceSetup = true; InvokeOnMainThread(() => PresentViewController(cloudServiceSetupViewController, true, null)); } }
public void DidDismiss(SKCloudServiceSetupViewController cloudServiceSetupViewController) { TableView.ReloadData(); }