无需设备即可调试 StoreKit 功能
我正在将具有应用内购买功能的应用程序从 iPhone 移植到 iPad,但模拟器不处理任何 StoreKit 调用(它们会立即失败并出现警告)。由于还没有可用的 iPad,我无法使用设备进行调试。
我想到了一些替代方案:
- 按原样使用 iPhone 代码。这是一个安全的选择,因为一切都可以在 iPhone 上运行,但在 iPad 上感觉不太好(iPhone 上的 NavigationController 中有多个 ViewController,但一切都可以放在 iPad 上的一个屏幕上)。
- 为 StoreKit 编写一个测试框架。我实际上已经开始这样做了,但我无法及时完成。
- 提交未经测试的代码并祈祷。不,只是开玩笑——这不是一个选择:)
那么,有什么想法吗?有没有其他人为这种事情编写过测试框架?我用谷歌搜索了一下但找不到任何东西。我很感激对此的任何想法!
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 anything. I'm grateful for any thoughts on this!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
FWIW,我最终在 iPhone 和 iPad 上使用相同的类,并使用不同的 .xib 文件来使其看起来稍微好一些。它并不完美,但在我拥有自己的 iPad 之前它就足够了。考虑到我无法在模拟器上完全测试它,涉及的编码仍然比我希望的要多,但我至少在 iPhone 上测试了大部分代码。
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.