简体   繁体   中英

iTunes Sign In Keeps Popping Up On In-App Purchase View Controller

When I navigate to a view controller which uses StoreKit and in-app purchase, it automatically pops up a "Sign In to iTunes Store" dialog, despite the fact that I haven't pressed or done anything. After this happens, if I minimize my app and open it back up, no matter what view controller I am on, the dialog "Sign In to iTunes Store" keeps popping up.

What's even more aggravating is that I have fixed this problem before and I have no idea how I did so.

I am calling [[SKPaymentQueue defaultQueue] finishTransaction:transaction]; on all transactions.

Any help would be much appreciated!

Fixed it! For future developers who run into this problem, (which I'm sure you will) these are the steps I took.

In Xcode iOS Simulator:

Click on iOS Simulator at the top left, then click on Reset Content & Settings.

On my iPhone:

I Erased All Content & Settings. I set my phone up as a new phone.

I also deleted any Sandbox Test Users and created a new one.

Hope this helps! If you need further help, let me know!

UPDATE:

I think the problem is using a Sandbox Test User on a real device that already has a iTunes account signed in on it. What I would suggest is signing out of your iTunes account before running any tests with the Sandbox users. Go to Settings > Apple ID, iCloud, iTunes & App Store > iTunes & App Store > Apple ID > Sign Out. After you sign out, sign in to iTunes using the Sandbox user account. Hopefully this helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM