1

我目前正在开发一个应用程序,现在我正在测试一个简单的实现,以便在用户 iPhone 上通过 Passbook 测试。这是按下 UIButton 时调用的方法:

- (IBAction)addTicketToPassbook {
NSArray *passFiles = [[NSFileManager defaultManager]
                      contentsOfDirectoryAtPath:@"/Users/Adam/Developer/Eagan High School/Eagan High School/" error:nil];
NSString *passName = @"";
    NSError* error = nil;

    for (NSString *pass in passFiles) {
        if([pass hasSuffix:@".pkpass"])
            passName = pass;
}

    passName = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:passName];
    NSData *passData = [NSData dataWithContentsOfFile:passName];
    PKPass *pass = [[PKPass alloc] initWithData:passData error:&error];
    if (error != nil) {
        [[[UIAlertView alloc] initWithTitle:@"Passes error" message:[error localizedDescription] delegate:nil cancelButtonTitle:@"Ooops" otherButtonTitles: nil] show];
        return;
    }

    PKAddPassesViewController *addController = [[PKAddPassesViewController alloc] initWithPass:pass];
    addController.delegate = self;
    [self presentViewController:addController animated:YES completion:nil];
}

我一直在使用 NSLog 来记录错误,每次在执行PKPass *pass = [[PKPass alloc] initWithData:passData error:&error];. 任何提示将不胜感激。谢谢!

这是崩溃日志:

Incident Identifier: CDEB9D43-753F-406A-A258-E4CA8EF0EA61
CrashReporter Key:   a7451fa84770c22b3118e1fdd759c920e445a7c9
Hardware Model:      iPhone4,1
Process:         Eagan High School [5121]
Path:            /var/mobile/Applications/09FB5826-1122-4774-8C1A-F38FD8B6A84B/Eagan High School.app/Eagan High School
Identifier:      Eagan High School
Version:         ??? (???)
Code Type:       ARM (Native)
Parent Process:  launchd [1]

Date/Time:       2012-10-28 13:03:56.586 -0500
OS Version:      iOS 6.0 (10A403)
Report Version:  104

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x000000000000defe
Crashed Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   CoreFoundation                  0x34f1cd24 CFRetain + 8
1   CoreFoundation                  0x34f9eb08 CFReadStreamCreateWithData + 12
2   Foundation                      0x32a9ba96 -[NSCFInputStream initWithData:] + 14
3   Foundation                      0x32a9c0c6 +[NSInputStream(NSInputStream) inputStreamWithData:] + 38
4   PassKit                         0x38f6bffc -[PKLocalCard initWithData:error:] + 244
5   PassKit                         0x38f6dcd4 -[PKIngestibleCard initWithData:error:] + 56
6   Eagan High School               0x000b5ec0 0xb4000 + 7872
7   UIKit                           0x363990a8 -[UIApplication sendAction:to:from:forEvent:] + 68
8   UIKit                           0x3639905a -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 26
9   UIKit                           0x36399038 -[UIControl sendAction:to:forEvent:] + 40
10  UIKit                           0x363988ee -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 498
11  UIKit                           0x36398de4 -[UIControl touchesEnded:withEvent:] + 484
12  UIKit                           0x362c15f4 -[UIWindow _sendTouchesForEvent:] + 520
13  UIKit                           0x362ae804 -[UIApplication sendEvent:] + 376
14  UIKit                           0x362ae11e _UIApplicationHandleEvent + 6150
15  GraphicsServices                0x354615a0 _PurpleEventCallback + 588
16  GraphicsServices                0x354611ce PurpleEventCallback + 30
17  CoreFoundation                  0x34fb2170 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
18  CoreFoundation                  0x34fb2112 __CFRunLoopDoSource1 + 134
19  CoreFoundation                  0x34fb0f94 __CFRunLoopRun + 1380
20  CoreFoundation                  0x34f23eb8 CFRunLoopRunSpecific + 352
21  CoreFoundation                  0x34f23d44 CFRunLoopRunInMode + 100
22  GraphicsServices                0x354602e6 GSEventRunModal + 70
23  UIKit                           0x363022fc UIApplicationMain + 1116
24  Eagan High School               0x000b5984 0xb4000 + 6532
25  libdyld.dylib                   0x39a0eb1c start + 0

Thread 1:
0   libsystem_kernel.dylib          0x30be1d98 __workq_kernreturn + 8
1   libsystem_c.dylib               0x38d65cf6 _pthread_workq_return + 14
2   libsystem_c.dylib               0x38d65a12 _pthread_wqthread + 362
3   libsystem_c.dylib               0x38d658a0 start_wqthread + 4

Thread 2 name:  Dispatch queue: com.apple.libdispatch-manager
Thread 2:
0   libsystem_kernel.dylib          0x30bd1648 kevent64 + 24
1   libdispatch.dylib               0x33cd4974 _dispatch_mgr_invoke + 792
2   libdispatch.dylib               0x33cd4654 _dispatch_mgr_thread$VARIANT$mp + 32

Thread 3:
0   libsystem_kernel.dylib          0x30be1d98 __workq_kernreturn + 8
1   libsystem_c.dylib               0x38d65cf6 _pthread_workq_return + 14
2   libsystem_c.dylib               0x38d65a12 _pthread_wqthread + 362
3   libsystem_c.dylib               0x38d658a0 start_wqthread + 4

Thread 4 name:  WebThread
Thread 4:
0   libsystem_kernel.dylib          0x30bd0eb4 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x30bd1048 mach_msg + 36
2   CoreFoundation                  0x34fb2040 __CFRunLoopServiceMachPort + 124
3   CoreFoundation                  0x34fb0d9e __CFRunLoopRun + 878
4   CoreFoundation                  0x34f23eb8 CFRunLoopRunSpecific + 352
5   CoreFoundation                  0x34f23d44 CFRunLoopRunInMode + 100
6   WebCore                         0x344c7a70 RunWebThread(void*) + 440
7   libsystem_c.dylib               0x38d7030e _pthread_start + 306
8   libsystem_c.dylib               0x38d701d4 thread_start + 4

Thread 0 crashed with ARM Thread State (32-bit):
    r0: 0x00000000    r1: 0x00000000      r2: 0x00000001      r3: 0x1e079390
    r4: 0x00000000    r5: 0x00000000      r6: 0x00000000      r7: 0x2fd4b658
    r8: 0x1e065440    r9: 0x1e000000     r10: 0x00000000     r11: 0x00000001
    ip: 0x3a6afb80    sp: 0x2fd4b654      lr: 0x34f9eb0d      pc: 0x34f1cd24
  cpsr: 0x60000030

Binary Images:
   0xb4000 -    0xb6fff +Eagan High School armv7  <496f03ab87d530e59db84940383c8c07> /var/mobile/Applications/09FB5826-1122-4774-8C1A-F38FD8B6A84B/Eagan High School.app/Eagan High School
 0x294c000 -  0x294dfff  GeoServices armv7  <200ee83ae0183f27814f9a433da23176> /System/Library/AccessibilityBundles/GeoServices.axbundle/GeoServices
 0x2955000 -  0x2959fff  AccessibilitySettingsLoader armv7  <31a0fd14f9b43911a96880416fd4832f> /System/Library/AccessibilityBundles/AccessibilitySettingsLoader.bundle/AccessibilitySettingsLoader
 0x2960000 -  0x29bbfff  UIKit armv7  <937f649f950237fc86272e0f34adf57d> /System/Library/AccessibilityBundles/UIKit.axbundle/UIKit
 0x2a19000 -  0x2a1dfff  PassKitFramework armv7  <5e1f3ec3b89e3a67b7d95abdc13b2988> /System/Library/AccessibilityBundles/PassKitFramework.axbundle/PassKitFramework
 0x3f81000 -  0x3f82fff  AXExtraExtras armv7  <af2d3f1b110c3865b609169be8672a79> /System/Library/AccessibilityBundles/AXExtraExtras.axbundle/AXExtraExtras
0x2fe94000 - 0x2feb4fff  dyld armv7  <75594988728831d98e1f7c4c7b7ca29d> /usr/lib/dyld
0x30bd0000 - 0x30be6fff  libsystem_kernel.dylib armv7  <f167dacec44b3a86a8eee73400ff7a83> /usr/lib/system/libsystem_kernel.dylib
0x30c86000 - 0x30c9bfff  libresolv.9.dylib armv7  <e79b59a3406f34d9b37f8085955115ce> /usr/lib/libresolv.9.dylib
0x30e4e000 - 0x30f13fff  CFNetwork armv7  <3e973794a4d13428bb974edcb2027139> /System/Library/Frameworks/CFNetwork.framework/CFNetwork
0x30f58000 - 0x310a1fff  libicucore.A.dylib armv7  <0253932c1b9038a0849ef73c38e076ca> /usr/lib/libicucore.A.dylib
0x310a2000 - 0x310a3fff  CoreSurface armv7  <b3f9d4e8dd803a48b88c58a0663d92a3> /System/Library/PrivateFrameworks/CoreSurface.framework/CoreSurface
0x31343000 - 0x31368fff  OpenCL armv7  <f7706501012430fc94ed99006419fba9> /System/Library/PrivateFrameworks/OpenCL.framework/OpenCL
0x313d5000 - 0x313d8fff  MobileInstallation armv7  <e6b6ae9d4f5f3831a40fcc370afc1429> /System/Library/PrivateFrameworks/MobileInstallation.framework/MobileInstallation
0x31504000 - 0x31578fff  ProofReader armv7  <cc89a352199a393ba0e46af69e670ef9> /System/Library/PrivateFrameworks/ProofReader.framework/ProofReader
0x3158e000 - 0x3159bfff  TelephonyUtilities armv7  <0e07c7484ca63c189fd19790eb48bb28> /System/Library/PrivateFrameworks/TelephonyUtilities.framework/TelephonyUtilities
0x3168d000 - 0x31742fff  CoreImage armv7  <ba744c4f6a1c3c0598de9d429022093a> /System/Library/Frameworks/CoreImage.framework/CoreImage
0x31827000 - 0x31873fff  IMFoundation armv7  <b1a5542b977e3ae683f40ee5755d5b32> /System/Library/PrivateFrameworks/IMFoundation.framework/IMFoundation
0x31877000 - 0x31953fff  WebKit armv7  <73fa195f63bc32c29060ac0fecabdca6> /System/Library/PrivateFrameworks/WebKit.framework/WebKit
0x31b95000 - 0x31b96fff  libdnsinfo.dylib armv7  <6c912cedc1e938ad914dfce91a529b68> /usr/lib/system/libdnsinfo.dylib
0x31ba2000 - 0x31ba6fff  libGFXShared.dylib armv7  <6a8f59f89218372d9f24c4193a179008> /System/Library/Frameworks/OpenGLES.framework/libGFXShared.dylib
0x32038000 - 0x32044fff  libbsm.0.dylib armv7  <e98708fbfa683df2a91d45dc765071a7> /usr/lib/libbsm.0.dylib
0x3205f000 - 0x3205ffff  Accelerate armv7  <22bee3e96cbc3538bfc50ca5be618cc0> /System/Library/Frameworks/Accelerate.framework/Accelerate
0x320c1000 - 0x320c1fff  vecLib armv7  <66204595f7653ef29e5e26cb8629177a> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/vecLib
0x320c6000 - 0x320ccfff  libcommonCrypto.dylib armv7  <690aaa493b5c3f9582499f174adf4964> /usr/lib/system/libcommonCrypto.dylib
0x320cd000 - 0x32118fff  libstdc++.6.dylib armv7  <55a7612b28c43cfcad7089b688591b80> /usr/lib/libstdc++.6.dylib
0x32136000 - 0x32149fff  libc++abi.dylib armv7  <c5a5f03138353747b539e620ef2bb5c0> /usr/lib/libc++abi.dylib
0x32333000 - 0x32395fff  CoreText armv7  <4a0bece315e9316fa1aa1b5923740f55> /System/Library/Frameworks/CoreText.framework/CoreText
0x323a3000 - 0x323a3fff  liblangid.dylib armv7  <a04b639c18593885bd81bfa623a6f07c> /usr/lib/liblangid.dylib
0x323bc000 - 0x323befff  TCC armv7  <f641dd0500fa3f0087d93da665ea84b8> /System/Library/PrivateFrameworks/TCC.framework/TCC
0x323bf000 - 0x323c5fff  MobileKeyBag armv7  <a81d768a49cf37a1a111594d39cea3fe> /System/Library/PrivateFrameworks/MobileKeyBag.framework/MobileKeyBag
0x323c6000 - 0x323c6fff  libCVMSPluginSupport.dylib armv7  <1fd63e8305ab3ca190b1ef6ab2555f9d> /System/Library/Frameworks/OpenGLES.framework/libCVMSPluginSupport.dylib
0x323c7000 - 0x323c9fff  libcompiler_rt.dylib armv7  <7add7c91a2673641b0c5f0433a203da6> /usr/lib/system/libcompiler_rt.dylib
0x323ca000 - 0x323d5fff  AXRuntime armv7  <5aaab62509c73da4a47db8f0c3273a13> /System/Library/PrivateFrameworks/AXRuntime.framework/AXRuntime
0x32406000 - 0x3240bfff  IOMobileFramebuffer armv7  <3a351ca1d4ae3146a787f3e13564294b> /System/Library/PrivateFrameworks/IOMobileFramebuffer.framework/IOMobileFramebuffer
0x324de000 - 0x324e0fff  libCoreVMClient.dylib armv7  <e57152bacb36350e8a023e0c1b540a0c> /System/Library/Frameworks/OpenGLES.framework/libCoreVMClient.dylib
0x3263a000 - 0x3263afff  libkeymgr.dylib armv7  <8a2e3a8fdf9335e2867a33e2d1a9baf8> /usr/lib/system/libkeymgr.dylib
0x326cd000 - 0x326defff  SpringBoardServices armv7  <22255260ec6436d19176696422441c40> /System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices
0x326e1000 - 0x32707fff  libtidy.A.dylib armv7  <134c41c587fb33dca014bd525f68a0c7> /usr/lib/libtidy.A.dylib
0x32789000 - 0x3278cfff  libcache.dylib armv7  <e08b913e17753180b91728a8bd5dda7b> /usr/lib/system/libcache.dylib
0x3278d000 - 0x32794fff  liblockdown.dylib armv7  <257ecb171a363e4298a63f72d7fffea2> /usr/lib/liblockdown.dylib
0x32795000 - 0x32842fff  libxml2.2.dylib armv7  <ef245c0afc113f54b6f30921671edab2> /usr/lib/libxml2.2.dylib
0x328b3000 - 0x329a1fff  GeoServices armv7  <6af26ce81030330b97122ba8c1deaaa2> /System/Library/PrivateFrameworks/GeoServices.framework/GeoServices
0x329ef000 - 0x32bb2fff  Foundation armv7  <2e1ac190c4f837e2a1059043dd7b1c63> /System/Library/Frameworks/Foundation.framework/Foundation
0x32bbb000 - 0x32c14fff  libvDSP.dylib armv7  <ad4c53081a263f0d96f63b9a80f2ae91> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libvDSP.dylib
0x32c15000 - 0x32d2afff  QuartzCore armv7  <d96571a6986c3012b315cb860f4d65ca> /System/Library/Frameworks/QuartzCore.framework/QuartzCore
0x32e91000 - 0x32e9dfff  GenerationalStorage armv7  <74d50f4c8d243a35ad3ae89d85f2793a> /System/Library/PrivateFrameworks/GenerationalStorage.framework/GenerationalStorage
0x32fe9000 - 0x33024fff  AppSupport armv7  <74ed50d2f7d23ce696b029dd817749c0> /System/Library/PrivateFrameworks/AppSupport.framework/AppSupport
0x33250000 - 0x3326efff  WebBookmarks armv7  <012ed1a1f54a3d6d836e2836781d4f73> /System/Library/PrivateFrameworks/WebBookmarks.framework/WebBookmarks
0x332e5000 - 0x333e3fff  libobjc.A.dylib armv7  <5224e803eca737a4b2c6451d136b3d28> /usr/lib/libobjc.A.dylib
0x33c96000 - 0x33ccbfff  libcorecrypto.dylib armv7  <ebd023957d853fa8bd35309592e92dac> /usr/lib/system/libcorecrypto.dylib
0x33ccc000 - 0x33ce9fff  libdispatch.dylib armv7  <4abccf75caf33fa5a0c6037b2e1c5f41> /usr/lib/system/libdispatch.dylib
0x33e2f000 - 0x33e53fff  Bom armv7  <c76b4156e0463ecb922608d44c126d86> /System/Library/PrivateFrameworks/Bom.framework/Bom
0x340a0000 - 0x340a5fff  liblaunch.dylib armv7  <021ff140d6003f3281dfa29b79fa9e6e> /usr/lib/system/liblaunch.dylib
0x340bd000 - 0x34112fff  CoreTelephony armv7  <54708e241c5c3e2297c2fca0d685497d> /System/Library/Frameworks/CoreTelephony.framework/CoreTelephony
0x34474000 - 0x34474fff  libsystem_blocks.dylib armv7  <993c9bfe8bf031548b9ddba63cc17015> /usr/lib/system/libsystem_blocks.dylib
0x344bd000 - 0x34decfff  WebCore armv7  <cd34aedf72653d1dbef6b14fdfd0c053> /System/Library/PrivateFrameworks/WebCore.framework/WebCore
0x34ded000 - 0x34e2bfff  VideoToolbox armv7  <bfc75ceef01e366e8335949abf037d4b> /System/Library/Frameworks/VideoToolbox.framework/VideoToolbox
0x34e4d000 - 0x34e6dfff  libxslt.1.dylib armv7  <7f6f63b31f333c41952f685fdd54a6cb> /usr/lib/libxslt.1.dylib
0x34f1b000 - 0x3504dfff  CoreFoundation armv7  <e30fc309df7b3c9f8ac57f0f6047d65f> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x35127000 - 0x35214fff  libiconv.2.dylib armv7  <faa5abb937e3306ab87c7f7c38315839> /usr/lib/libiconv.2.dylib
0x3521a000 - 0x35255fff  libCGFreetype.A.dylib armv7  <7a68e65e523030faa9d91478e939bc00> /System/Library/Frameworks/CoreGraphics.framework/Resources/libCGFreetype.A.dylib
0x352f5000 - 0x35301fff  libMobileGestalt.dylib armv7  <0338ce49444332ec88cfc45c624bb39b> /usr/lib/libMobileGestalt.dylib
0x35348000 - 0x35357fff  StoreKit armv7  <906d82194db23f03b584859ca0a1ed93> /System/Library/Frameworks/StoreKit.framework/StoreKit
0x3545b000 - 0x35466fff  GraphicsServices armv7  <c5879083e8693aba827c78a32abe2391> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x35525000 - 0x356fdfff  ImageIO armv7  <fdfa8aa6307235b29435e5c8f6bc9819> /System/Library/Frameworks/ImageIO.framework/ImageIO
0x35715000 - 0x3576bfff  CoreAudio armv7  <a3a2eb3a29443b42a23aa8ecb1232846> /System/Library/Frameworks/CoreAudio.framework/CoreAudio
0x35847000 - 0x35853fff  libz.1.dylib armv7  <a3bba3842596315a81aa171a8bbda7b5> /usr/lib/libz.1.dylib
0x35854000 - 0x3586ffff  UIAccessibility armv7  <d15ad1db86f33fcb8472379c220a0597> /System/Library/PrivateFrameworks/UIAccessibility.framework/UIAccessibility
0x358b1000 - 0x358cefff  PersistentConnection armv7  <8e4d21f987d4334e927222c28ff1130b> /System/Library/PrivateFrameworks/PersistentConnection.framework/PersistentConnection
0x358cf000 - 0x3590efff  SystemConfiguration armv7  <44d84d23d10f344c90b4d9e9611ec976> /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration
0x35965000 - 0x35968fff  AggregateDictionary armv7  <20bde7d58a573f2fbd5d6458d4e50ef8> /System/Library/PrivateFrameworks/AggregateDictionary.framework/AggregateDictionary
0x359b2000 - 0x359c7fff  libmis.dylib armv7  <3afeeea531013420af75315d8d6dd332> /usr/lib/libmis.dylib
0x359ca000 - 0x359cbfff  DataMigration armv7  <25f8874067393208acc083124bc3eb86> /System/Library/PrivateFrameworks/DataMigration.framework/DataMigration
0x35a87000 - 0x35a8ffff  ProtocolBuffer armv7  <359ccc7700c93d58adbbd74ecfda80d9> /System/Library/PrivateFrameworks/ProtocolBuffer.framework/ProtocolBuffer
0x35a90000 - 0x35aa8fff  libsystem_info.dylib armv7  <be3d5625aed733ffb2d53400655fe110> /usr/lib/system/libsystem_info.dylib
0x35aaa000 - 0x35aaafff  libSystem.B.dylib armv7  <f2cad3bd15f63f448a9c5be732c65819> /usr/lib/libSystem.B.dylib
0x35c20000 - 0x35c79fff  MobileCoreServices armv7  <d831f1f9285535acac5035a29d84aaaf> /System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices
0x35d5b000 - 0x35dfbfff  UIFoundation armv7  <795a2f216cc3379c95eb645c633cc527> /System/Library/PrivateFrameworks/UIFoundation.framework/UIFoundation
0x35dfc000 - 0x35e08fff  AccountSettings armv7  <0b7524e9a8ef36bf9e9f6a5c445478af> /System/Library/PrivateFrameworks/AccountSettings.framework/AccountSettings
0x35e5e000 - 0x35e74fff  libCRFSuite.dylib armv7  <9b3fd56781103f209be2c43e48c1efc9> /usr/lib/libCRFSuite.dylib
0x35eef000 - 0x35f2cfff  libGLImage.dylib armv7  <7db25f3d55b93f31868e37326fba1e57> /System/Library/Frameworks/OpenGLES.framework/libGLImage.dylib
0x36070000 - 0x36074fff  IOSurface armv7  <1f598a3806073bdaa906c51dccc9429e> /System/Library/PrivateFrameworks/IOSurface.framework/IOSurface
0x3608e000 - 0x36094fff  libAccessibility.dylib armv7  <9e8bfe02e370375ea8439ab895528982> /usr/lib/libAccessibility.dylib
0x360a8000 - 0x360abfff  MobileSystemServices armv7  <6edd9c74c5a73c33809152446abe1538> /System/Library/PrivateFrameworks/MobileSystemServices.framework/MobileSystemServices
0x362ab000 - 0x367fefff  UIKit armv7  <98789fe7c21b3fe0bf5c0bb36648147f> /System/Library/Frameworks/UIKit.framework/UIKit
0x36869000 - 0x3686afff  libremovefile.dylib armv7  <6a0dd04f0710329b9c1722db2235f5c3> /usr/lib/system/libremovefile.dylib
0x3686b000 - 0x3687afff  CoreVideo armv7  <092f3aa965803a1aaea69af2ac5143f5> /System/Library/Frameworks/CoreVideo.framework/CoreVideo
0x3689a000 - 0x368c8fff  Security armv7  <be87724ccad837479efd45ca9f2c6b2c> /System/Library/Frameworks/Security.framework/Security
0x368ce000 - 0x36a83fff  CoreData armv7  <a42aa4f0f01833c390bc8c6c394dda1c> /System/Library/Frameworks/CoreData.framework/CoreData
0x36a8c000 - 0x36a93fff  MobileIcons armv7  <c7b5eb7ec2283f0b9611448ddccdd352> /System/Library/PrivateFrameworks/MobileIcons.framework/MobileIcons
0x36a94000 - 0x36b6cfff  StoreServices armv7  <9da3466c9cf13402a9f0412065f0ada7> /System/Library/PrivateFrameworks/StoreServices.framework/StoreServices
0x36b6d000 - 0x36bc5fff  ManagedConfiguration armv7  <9d006173bfcc3001b45c44b8e78833ed> /System/Library/PrivateFrameworks/ManagedConfiguration.framework/ManagedConfiguration
0x36bf0000 - 0x36bf9fff  libbz2.1.0.dylib armv7  <5258dce78afc3fd7934a5674b92ad785> /usr/lib/libbz2.1.0.dylib
0x36bfa000 - 0x36c44fff  libc++.1.dylib armv7  <a361a382693032b9bdfb2860033b3024> /usr/lib/libc++.1.dylib
0x36c45000 - 0x36c4cfff  libsystem_notify.dylib armv7  <6e39f8511ecc3c3489829714eb6fde12> /usr/lib/system/libsystem_notify.dylib
0x36d34000 - 0x36d3afff  libsystem_dnssd.dylib armv7  <6c1c1aaf9a3537d7ada4b519d14da7ab> /usr/lib/system/libsystem_dnssd.dylib
0x36d6c000 - 0x36ff2fff  AudioToolbox armv7  <6a4804d0e35e362dbad6f047c25227ca> /System/Library/Frameworks/AudioToolbox.framework/AudioToolbox
0x36ff3000 - 0x36ff3fff  libunwind.dylib armv7  <85e7546accc23ae1a973da4758512b7f> /usr/lib/system/libunwind.dylib
0x3714f000 - 0x37150fff  libsystem_sandbox.dylib armv7  <46cd200d99323aebbf6d81e5fb16424f> /usr/lib/system/libsystem_sandbox.dylib
0x371c2000 - 0x371d3fff  libvMisc.dylib armv7  <a3d025234d1a3880a0e5f87879633ee0> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libvMisc.dylib
0x37263000 - 0x37264fff  IOAccelerator armv7  <de8af6be681832008d180d7424d55f0d> /System/Library/PrivateFrameworks/IOAccelerator.framework/IOAccelerator
0x37265000 - 0x373a3fff  vImage armv7  <a7fd7fcd7041356db2ca297402ab6e8c> /System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/vImage
0x37881000 - 0x378aefff  MobileAsset armv7  <23e6b8ea85dd3dea84d8c295b4777753> /System/Library/PrivateFrameworks/MobileAsset.framework/MobileAsset
0x378ed000 - 0x378f4fff  OpenGLES armv7  <e035b741746c316dba8f1e59a568bf17> /System/Library/Frameworks/OpenGLES.framework/OpenGLES
0x37e96000 - 0x37e9bfff  CrashReporterSupport armv7  <7bde3532f2953f3894eb725379575926> /System/Library/PrivateFrameworks/CrashReporterSupport.framework/CrashReporterSupport
0x37f2a000 - 0x37f31fff  XPCObjects armv7  <5bc4f7282e9d3945a6c1885217670667> /System/Library/PrivateFrameworks/XPCObjects.framework/XPCObjects
0x37f32000 - 0x37f47fff  DataDetectorsCore armv7  <f15e924939fa39bbb9f57391824f8ce9> /System/Library/PrivateFrameworks/DataDetectorsCore.framework/DataDetectorsCore
0x3815d000 - 0x38174fff  BackBoardServices armv7  <e3eb5191f83339a1abad4c332c1b9d83> /System/Library/PrivateFrameworks/BackBoardServices.framework/BackBoardServices
0x38317000 - 0x38332fff  libRIP.A.dylib armv7  <6e5f3b4c18e137e0a464fe13095b7dab> /System/Library/Frameworks/CoreGraphics.framework/Resources/libRIP.A.dylib
0x3835c000 - 0x38375fff  DictionaryServices armv7  <e1f8d258d02c344cb0d17cec31818d3f> /System/Library/PrivateFrameworks/DictionaryServices.framework/DictionaryServices
0x38380000 - 0x38385fff  CommonUtilities armv7  <cb484bdaf5003e4baa13f83bafff62a9> /System/Library/PrivateFrameworks/CommonUtilities.framework/CommonUtilities
0x383fd000 - 0x38810fff  FaceCoreLight armv7  <0cb7a12beb3d32c1abd1834be8328b7c> /System/Library/PrivateFrameworks/FaceCoreLight.framework/FaceCoreLight
0x38811000 - 0x38896fff  libsqlite3.dylib armv7  <759ca29f533a33e88a81fddc3364bf19> /usr/lib/libsqlite3.dylib
0x38897000 - 0x388b8fff  AccessibilityUtilities armv7  <f077ed789cf53361b998f2fce70b089c> /System/Library/PrivateFrameworks/AccessibilityUtilities.framework/AccessibilityUtilities
0x388f2000 - 0x3893bfff  IOKit armv7  <c4786e65ac913839b1bb3b85a9c951fa> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x38d49000 - 0x38d5efff  libxpc.dylib armv7  <9fbb123276823c2383fc34b7a55404d7> /usr/lib/system/libxpc.dylib
0x38d5f000 - 0x38de5fff  libsystem_c.dylib armv7  <d45dc8901531343caf9b7e703d3eba50> /usr/lib/system/libsystem_c.dylib
0x38e29000 - 0x38e45fff  libsystem_m.dylib armv7  <7b2a25c750063de480f6a691f716b9d7> /usr/lib/system/libsystem_m.dylib
0x38f53000 - 0x38fa6fff  PassKit armv7  <c0bb9c8aa86430bfbe848843a2443af5> /System/Library/Frameworks/PassKit.framework/PassKit
0x39116000 - 0x3911bfff  libcopyfile.dylib armv7  <15aa2c3c8d523273913d4fc6717d3b7c> /usr/lib/system/libcopyfile.dylib
0x3911c000 - 0x39254fff  CoreGraphics armv7  <903960bfcfe93adb943752851f88491e> /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics
0x39391000 - 0x39537fff  JavaScriptCore armv7  <6b14c224c0e0306aa9084679ec6a99d2> /System/Library/PrivateFrameworks/JavaScriptCore.framework/JavaScriptCore
0x3953e000 - 0x39596fff  CoreLocation armv7  <3235bde1608331bebc291891405896c6> /System/Library/Frameworks/CoreLocation.framework/CoreLocation
0x39657000 - 0x3990cfff  libLAPACK.dylib armv7  <dd6f3958c3d536d6be90836682d2ffee> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libLAPACK.dylib
0x3990d000 - 0x3999afff  CorePDF armv7  <61e2baa344333bae9096a10de62543ff> /System/Library/PrivateFrameworks/CorePDF.framework/CorePDF
0x399ba000 - 0x399c3fff  AssetsLibraryServices armv7  <e51cbfefefbc30b6b47d99739123033e> /System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices
0x399c4000 - 0x399ecfff  PrintKit armv7  <a8ef6136b9773d42ac20f7eb54279039> /System/Library/PrivateFrameworks/PrintKit.framework/PrintKit
0x39a0d000 - 0x39a0efff  libdyld.dylib armv7  <3a149b4730663b1ea84e4a0a68ccc689> /usr/lib/system/libdyld.dylib
0x39a8d000 - 0x39a9bfff  libsystem_network.dylib armv7  <d0fb0eda6cb53a4da859d598c59e7522> /usr/lib/system/libsystem_network.dylib
0x39a9c000 - 0x39a9ffff  libmacho.dylib armv7  <2a9fe0b48f473d0f8fe2bf076cd12753> /usr/lib/system/libmacho.dylib
0x39c9c000 - 0x39d7ffff  libBLAS.dylib armv7  <56d8e00447133cd89457deec007327cb> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libBLAS.dylib
0x39d80000 - 0x39de5fff  CoreMedia armv7  <d227864b757e3a7ea5d7d96dcbb948fe> /System/Library/Frameworks/CoreMedia.framework/CoreMedia
4

1 回答 1

0

我想它可以帮助你

     NSString* passFile =[[NSBundle mainBundle] pathForResource:@"pass" ofType:@"pkpass"];

     //3
     NSData *passData = [NSData dataWithContentsOfFile:passFile];

     //4
     NSError* erro = nil;
     PKPass *newPass = [[PKPass alloc] initWithData:passData
                                              error:nil];
     //5
     if (erro!=nil) {
         [[[UIAlertView alloc] initWithTitle:@"Passes error"
                                     message:[error
                                              localizedDescription]
                                    delegate:nil
                           cancelButtonTitle:@"Ooops"
                           otherButtonTitles: nil] show];
         return;
     }

     PKAddPassesViewController *addPassVC = [[PKAddPassesViewController alloc] initWithPass:newPass];
     addPassVC.delegate = self;
     addPassVC.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
     [self presentViewController:addPassVC animated:YES completion:nil];
于 2012-12-20T09:16:46.960 回答