开发者

Debugging StoreKit functionality without a device

开发者 https://www.devze.com 2022-12-25 04:29 出处:网络
I\'m porting an app with in-app purchase functionality from the iPhone to the iPad, but the simulator doesn\'t handle any StoreKit calls (they fail immediately with a warning). Since there are no iPad

I'm porting an app with in-app purchase functionality from the iPhone to the iPad, but the simulator doesn't handle any StoreKit calls (they fail immediately with a warning). Since there are no iPads available yet, I can't use a device for debugging.

I have thought of a few alternatives:

  • Use the iPhone code as is. This is the safe bet since everything already works on the iPhone, but it will not feel right on the iPad (there are several ViewControllers in a NavigationController involved on the iPhone, but everything could fit on one screen on the pad).
  • Write a test framework for StoreKit. I actually started doing this, but I won't be able to finish it in time.
  • Submit untested code and pray. Nah, just kidding -- that's not an option :)

So, any thoughts? Has anyone else written a test framework for this kind of thing? I googled a bit but couldn't find anyt开发者_开发技巧hing. I'm grateful for any thoughts on this!


FWIW, I ended up using the same classes on both iPhone and iPad, with different .xib files to make it look slightly better. It's not perfect, but it will do until I get my own iPad. There was still more coding involved than I would have liked, considering that I couldn't test it fully on the simulator, but I did at least get to test most of it on the iPhone.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号