In App Sandbox does not work IOS Simulator - Flutter
Asked Answered
C

3

7

I am trying to test my flutter in app implementation.

In itunesconnect->Users and Access->Testers (https://appstoreconnect.apple.com/access/testers), I added one sandbox user.

Then I launch the IOS simulator from Android Studio. Going through the steps to sign in, I always cant seem to sign in.

Could Not Sign In User name or password is incorrect

See the screenshots - https://i.sstatic.net/IGNS2.jpg

I know the username and password is correct as I am able to sign in into apple id site (https://appleid.apple.com/#!&page=signin)

How can I resolve this sign in problem or what should I do to test (sandbox) in app on ios ?

Clock answered 8/6, 2020 at 13:56 Comment(1)
"Then I launch the IOS simulator from Android Studio" sounds scary:)Jugoslavia
A
4

To test your In App functionality against the In App Purchase sandbox, connect your device to your development workstation then choose iPhone Device as the Active SDK—the StoreKit APIs are not available in the iPhone simulator.

See: https://developer.apple.com/news/?id=08282009a

So in-app purchase sandbox accounts cannot be used on iOS Simulator. You would have to connect an iOS device and link that with Android Studio. In that way, the app runs on a physical device. For this, you would need a Mac. Besides make sure you always take into account the following:

  • Always create a test account with an email address that is not associated with another Apple account
  • Remove all account details from the test device, before trying to use a sandbox account (otherwise another Apple account might actually be used for the purchase)
  • Confirming the email address after creating it might be a good idea (not sure whether that still is a thing, it used to be)
Acaleph answered 12/6, 2020 at 6:45 Comment(2)
thanks. do you know if there might be a difference between the result of the inapp getproduct on device and on the simulator. Why in the ios simulator produces empty title and description string. Does device have this problem ? I would need to try on device anyway.Clock
Yes, the simulator does not have the necessary APIs. It thus does not have the code to deal with In App purchases. If you believe my answer is correct, please mark it as such. Thank you.Acaleph
F
0

This is now possible with iOS 14. Apple has a lengthy page documenting the steps needed to set this up in xcode. But it basically involves creating a Create a StoreKit configuration file and storing that in your project. Then, xcode can use that in the simulator to purchase products.

Foliolate answered 1/5, 2024 at 12:36 Comment(0)
J
-1

You can retrieve the list of StoreKit products on the simulator. Don't necessary to be logged as test sandbox user for that.

You can't do purchases on the simulator. To do it you need to be logged in as sandbox user on the real device.

You can receive the products with the empty titles. Thats not depends if you are using device or simulator. Most likely you have some issues with these products in the AppStore. They should be completely filled, sent to review and don't have any errors. If your products have been rejected for no apparent reason, you can try to add new localization for them.

Jugoslavia answered 16/6, 2020 at 10:55 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.