1

I am making an app for iOS which uses Passbook / PassKit. I have all of the certificates, provisioning, and IDs. However, in recent builds of my application, I've been getting these two errors when attempting to add a pass to Passbook:

Invalid data error reading card pass.PASSTYPE.ID/PASSTYPE-ID. Pass dictionary must contain key 'key'.

And:

Creation of pass failed: Error Domain=PKPassKitErrorDomain Code=1 "The pass cannot be read because it isn't valid." UserInfo=0x1c5de340 {NSUnderlyingError=0x1d5dca50 "Pass dictionary must contain key 'key'.", NSLocalizedDescription=The pass cannot be read because it isn't valid.}

This seems quite random (again, thank you Xcode 4), however I'm sure it's something I'm doing.

I'm creating the pass by connecting to a server (www.PassSlot.com) and then editing it and downloading it. Could this have to do with my internet connection (ex. HTTP vs. HTTPS or speed)? Or does it have to do with something completely different, such as an invalid entitlements file or something of the sort?

I've seen a lot of errors in Xcode, but this PassKit error is mysterious to me. Any help would be appreciated!

4

1 に答える 1

1

pass.json多くの退屈な努力の後、ファイルに次のようなセクションがある場合にこれらのエラーが表示されることがわかりました。

eventTicket {
    primaryField {
       key : key
       label : label
       value : value
    }
}

しかしkey、エラーにあるようにがありません。passDictionaryエラーについて混乱していた唯一の部分は、いわゆるpass.json.

今後の注意として、どのフィールドkeyも同じ値を持つことはできません。

于 2012-11-04T21:55:37.037 に答える