iOS 6 Passbook: Open Passbook app from my app

后端 未结 1 1858
离开以前
离开以前 2020-12-30 18:22

I am building an application related to the Passbook app. Basically I am generating a boarding pass for a flight ticket and adding it to Passbook. That part is working fine.

1条回答
  •  感情败类
    2020-12-30 19:04

    I had the same problem, it worked well with the emulator but crashed on the device. 1 - Double check the Entitlements 2 - I used this when the _pass is already in the library:

    if([_passLibrary containsPass:_pass])
    {
        [[UIApplication sharedApplication] openURL:[[_passLibrary passWithPassTypeIdentifier:[_pass passTypeIdentifier] serialNumber:[_pass serialNumber]] passURL]];        
    }
    

    Use the same context to delete the pass too:

    [_passLibrary removePass: [_passLibrary passWithPassTypeIdentifier:[_pass passTypeIdentifier] serialNumber:[_pass serialNumber]]];
    

    I hope it helps.

    0 讨论(0)
提交回复
热议问题