ios-simulator - iOS 模拟器上的应用内购买导致 .../usr/libexec/lsd 崩溃

标签 ios-simulator in-app-purchase ios6

在模拟器中测试应用内购买时,我遇到以下崩溃:

Path:            /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/usr/libexec/lsd
Parent Process:  launchd [166]

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000030

VM Regions Near 0x975c08c:
    MALLOC_SMALL           0000000002000000-0000000004000000 [ 32.0M] rw-/rwx SM=PRV  
--> 
    __TEXT                 000000008fed8000-000000008ff0b000 [  204K] r-x/rwx SM=COW  /usr/lib/dyld

Application Specific Information:
objc_msgSend() selector name: release
iPhone Simulator 358.4, iPhone OS 6.0 (iPhone/10A403)



Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libobjc.A.dylib                 0x0073509b objc_msgSend + 15
1   CoreFoundation                  0x0098841c CFRelease + 108
2   MobileCoreServices              0x003f3fac _LSServer_CopyVendorIdentifier + 1320
3   MobileCoreServices              0x0040d912 _LSPluginServer_GetVendorIdentifierForAppIdentifier + 311
4   MobileCoreServices              0x004120bb _XGetVendorIdentifierForAppIdentifier + 238
5   MobileCoreServices              0x0041224d LSPlugin_server + 119
6   MobileCoreServices              0x0041e6e8 serverCallback + 154
7   CoreFoundation                  0x00981c93 __CFMachPortPerform + 131
8   CoreFoundation                  0x00981bf5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
9   CoreFoundation                  0x00981962 __CFRunLoopDoSource1 + 146
10  CoreFoundation                  0x009b2bb6 __CFRunLoopRun + 2118
11  CoreFoundation                  0x009b1f44 CFRunLoopRunSpecific + 276
12  CoreFoundation                  0x009bdf91 CFRunLoopRun + 129
13  MobileCoreServices              0x0041e638 _LSServerMain + 360
14  lsd                             0x00001aa6 0x1000 + 2726
15  lsd                             0x00001a41 0x1000 + 2625

Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0   libsystem_kernel.dylib          0x96f2b926 kevent64 + 10
1   libdispatch.dylib               0x01102c2b _dispatch_mgr_invoke + 863
2   libdispatch.dylib               0x011028cc _dispatch_mgr_thread + 61

Thread 2:
0   libsystem_kernel.dylib          0x96f2b02e __workq_kernreturn + 10
1   libsystem_c.dylib               0x9ae3fccf _pthread_wqthread + 773
2   libsystem_c.dylib               0x9ae416fe start_wqthread + 30

Thread 0 crashed with X86 Thread State (32-bit):
  eax: 0x8fef2b02  ebx: 0x009883be  ecx: 0x0073c2c4  edx: 0x0975c084
  edi: 0x8fef2b02  esi: 0x00187d83  ebp: 0xbfffe758  esp: 0xbfffe6f8
   ss: 0x00000023  efl: 0x00010282  eip: 0x0073509b   cs: 0x0000001b
   ds: 0x00000023   es: 0x00000023   fs: 0x00000000   gs: 0x0000000f

模拟器继续运行,但应用内购买不会在模拟器上的任何地方进行。
手机上的相同代码运行正常。

这个问题是升级到 Xcode 4.5.1 后的新问题。它曾经在以前的版本上运行良好。

有人遇到过这个问题或知道解决方案吗?

最佳答案

直接来自 iOS 6.0 SDK 发行说明:

For this release, iOS Simulator does not support testing In-App Purchase. Please use a device to test your apps that use this feature.

关于ios-simulator - iOS 模拟器上的应用内购买导致 .../usr/libexec/lsd 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12785519/

相关文章:

ios - 更新UI时如何同时执行2个函数

ios - 恢复已删除的自动续订订阅

ios - 想在服务器上保存申请状态

ios - iOS 6 中的强弱 IBOutlet

ios - 应用程序 'attaching to' 在 iOS 模拟器中挂起

ios5 - 调用 UITextField 委托(delegate)程序时 iPhone 模拟器崩溃(带有 EXC_BAD_ACCESS)

ios - 在 macOS Sierra 上的任何 iOS 模拟器中 Nanosleep 太长

iphone - 使用 IAP 每月订阅

ios - NSDateFormatter 根据 iOS 版本返回不同的结果

xcode - 如何在模拟器上测试 iOS 麦克风的使用情况?