5

シミュレーターでアプリ内購入をテストしているときに、次のクラッシュが発生します。

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 にアップグレードしてから新たに発生したものです。以前のリリースでは問題なく動作していました。

この問題を経験している、または解決策を知っている人はいますか?

4

2 に答える 2

3

iOS 6.0 SDK リリース ノートから直接:

このリリースでは、iOS シミュレーターはアプリ内購入のテストをサポートしていません。デバイスを使用して、この機能を使用するアプリをテストしてください。

于 2012-10-20T00:12:56.097 に答える
1

StoreKit 呼び出しが lsd エラーを引き起こすことを確認しました。

すべての lsd エラーを解消した私のソリューションは次のとおりです。

#import <TargetConditionals.h>
- (Result *) whateverStoreKitCallingFunction
{
#if TARGET_IPHONE_SIMULATOR
    return nil;    
#else // TARGET_IPHONE_SIMULATOR
    // Do whatever normal storekit calls
    return "whatever";
#endif // TARGET_IPHONE_SIMULATOR
}
于 2012-11-19T20:39:00.143 に答える