Logout from AppStore on iOS Simulator

2019-01-21 16:16发布

Since 5.0, iOS simulator has StoreKit support so you can debug your In-App purchases without device. But, it has one issue. Once logged in (make In-App purchase) I can't change AppStore login. Settings has not "AppStore" item, so I can't "logout" from account.

I tried to delete application from simulator, restart simulator, delete test user from iTunesConnect — no success.

Screen of the problem

Any idea?

5条回答
Lonely孤独者°
2楼-- · 2019-01-21 16:41

There is another way to log out from that sandbox account without "Reset Content & Settings" . Just remove the files from the following path in your home directory :

~/Library/Application\ Support/iPhone\ Simulator/5.0/Library/com.apple.itunesstored 

You may also need to restart the Simulator for the change to take effect.

This just removes the stored information about iTunes from Simulator. So it doesn't delete any apps in the Simulator. It works cool :)

查看更多
Bombasti
3楼-- · 2019-01-21 16:42

To logout from iOS simulator using xCode 6.3.1, go to Setting -> Safari -> Clear History and Website Data.

查看更多
爷、活的狠高调
4楼-- · 2019-01-21 16:50

Try to "Reset content & settings"

查看更多
走好不送
5楼-- · 2019-01-21 16:56

Simulator 6.0 stored information location:

~/Library/Application Support/iPhone Simulator/6.0/Library/com.apple.itunesstored/

Update for 6.1:

~/Library/Application Support/iPhone Simulator/6.1/Library/com.apple.itunesstored/
查看更多
不美不萌又怎样
6楼-- · 2019-01-21 16:56

With iOS 7 Apple appear to have removed the ability to test In App Purchases using the simulator. Whatever you do (including removing the files in the relevant com.apple.itunesstored simulator directory) you always get the "Could not connect to iTunes store" error when trying to request the product identifiers.

Testing on a device works fine.

UPDATE: I have found that the regular "iPhone Retina (4-inch)" simulator works, but the 64bit simulator doesn't. Very odd.

查看更多
登录 后发表回答