devartis / passbook

Python library to create Apple Passbook (.pkpass) files
http://www.devartis.com/
MIT License
272 stars 108 forks source link

The passbook is not recognized by the iphone #10

Closed ogonbat closed 11 years ago

ogonbat commented 11 years ago

i have make a smple python app that create the passbook files.

this is the code

cardinfo = StoreCard()
        cardinfo.addPrimaryField("name","Name:","name")

        passTypeIdentifier = 'pass.<mytypeidentifier>'
        teamIdentifier = '<teamidentifier>'
        organizationName = 'Test by Cingusoft'

        passfile = Pass(cardinfo,passTypeIdentifier=passTypeIdentifier,organizationName=organizationName,teamIdentifier=teamIdentifier)
        passfile.serialNumber = "34556"
        passfile.description = "this is a passbook description"
        passfile.barcode = Barcode(message = 'Barcode message')
        passfile.addFile('icon.png',open(os.path.join(os.path.realpath(os.path.dirname(__file__)),'icn.png')))
        passfile.addFile('logo.png',open(os.path.join(os.path.realpath(os.path.dirname(__file__)),'logo.png')))
        passfile.create(os.path.join(os.path.realpath(os.path.dirname(__file__)),"../certificates/certificate.pem"),
            os.path.join(os.path.realpath(os.path.dirname(__file__)),"../certificates/key.pem"),
            os.path.join(os.path.realpath(os.path.dirname(__file__)),"../certificates/intermediate.pem"),
            '123456,
            'test.pkpass') # Create and output the Passbook file (.pkpass)

the library create the passbook file test.pkpass i send it eith emails and the Mail application recognize the passbook file. when i open the same email with iphone he don't recognize a passbook file. if i "upload" the passbook file from the Mail app, nothing happen.

i have used the correct certificates. Have some problems? have you tested with your iphone?

thank's in advance

fara commented 11 years ago

Hi Andrea, have you tried latest version? Last commit fixes an issue with json serialization. Also try checking the Console log with Xcode when you open the mail with the pass. It should provide you a descriptive error of the issue. Please post it here if the problem persists.

fara commented 11 years ago

Cannot reproduce and there´s no feedback from the reporter.