Search code examples
iosxcodexamarin.iosprovisioning-profilestorekit

Xamarin.iOS SKProductRequest events are not called in Debug (worked before iOS 15 and xCode 13)


We have an iPhone/iPad application in Live which uses subscriptions models. We have no issues there nor in Test Flight.

App is developed using Xamarin.iOS. We are on xCode 13 and iOS 15 on both Physical Devices. As IDE we have tried VS 2019 Mac, VS 2022 Preview Mac and JetBrains Rider

Problem appears only in Debug. I am using two physical devices: iPhone and iPad. Issue 1 appears on both devices.

Here is my code:

        SubscriptionsRequest = new SKProductsRequest(productIdentifiers);
        SubscriptionsRequest.ReceivedResponse += (sender, args) =>
        {
            SKProduct[] products = args.Response.Products;
            _productsCallback?.Invoke(products, subscriptions);
        };

        SubscriptionsRequest.RequestFailed += (sender, args) =>
        {
            _logger.LogError(args.Error.LocalizedDescription);
        };

        SubscriptionsRequest.Start();

None of the events are triggered. No errors or warning in Device Console (using Devices and Simulators from xCode).

Things I have already tried:

  1. Regenerated provision profile and certificate using fastlane
  2. Used Automatic Signing
  3. Created new App with the same bundle identifier and tried to get the subscriptions
  4. Unpaired both of my devices
  5. Tried to use Wifi and Wire connection
  6. Re-installed app, rebooted device, Rebuilt solution
  7. Downgraded xCode. This one solves the issues for the first launch. Next launches in Debug has the same issue.

I am pretty sure I have tried all the solutions suggested on StackOverflow or Apple forums.

Issue is there for couple of weeks as for now.

Please, let me know if I miss something


Solution

  • To everyone who was struggling the issue, after updating of iOS on iPhone to 15.1, Mac OS to Monterey and xCode to 13.1, issue is gone!