苹果IAP注意事项

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x00000018
Triggered by Thread: 0

Filtered syslog:
None found

Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libc++abi.dylib 0x337a1a64 __dynamic_cast + 212
1 xxxxxxxxx 0x00016482 0x4000 + 74882
2 xxxxxxxxx 0x00016868 0x4000 + 75880
3 xxxxxxxxx 0x00020d46 0x4000 + 118086
4 xxxxxxxxx 0x000208dc 0x4000 + 116956
5 StoreKit 0x26c23f8e __34-[SKProductsRequest _handleReply:]_block_invoke + 506

被reject的iap product,localizedTitle和localizedDescription会是nil,如果直接 [[product localizedTitle] UTF8String]这样使用就会crash,产生类似上面这样的crash log
參考:[url]http://stackoverflow.com/questions/23657046/itunnes-skproduct-localizedtitle-is-nil[/url]

========================================

测试流程:
·先退出设备上的appleID
·进游戏选iap充值
·弹出登录框输入iTunes后天配置的sandbox account
·完成测试后退出sandbox appleID(因为苹果规定sandbox账号不能在proudction环境使用)
参考:[url]https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/ShowUI.html#//apple_ref/doc/uid/TP40008267-CH3-SW11[/url]

越狱设备可能无法测试iap,会报can not connect to iTunes store
如果明明账号密码正确却提示“The Apple ID you entered couldn't be found or your password was incorrect. Please try again”
需要重新配一个sandbox account
参考:[url]http://stackoverflow.com/questions/27049612/how-to-create-test-user-for-in-app-purchase-in-new-ituneconnect
[/url]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值