Jul 132012

After I downloaded  iOS6 on my iPhone last week, the first icon I clicked on was Passbook only to find that Apple had not put any example passes in there. Since Passbook was the primary reason I had downloaded iOS6, I dug into the API and learned how to create a pass myself. It was a great learning experience that I want to share with others. I also provide a shell script to automate the pass generation process and also present to you, iPass.pk, a user-friendly GUI-based service to create passes.

What is a pass? 

A pass is in fact a regular zip archive a .pkpass extension. It contains the following files:

1. logo.png (optional): The file to be used as the logo.

2. background.png (optional): The file to be used as the pass’ background.

3. icon.png (optional): The file to be used as the icon.

4. manifest.json (required):This file contains a JSON object with SHA1 hashes of all files in the pass except the signature file (as its generated using manifest.json) and the manifest.json file itself. The file has the following format:

  "pass.json" : "<sha1 pf pass.json file>",
  "logo.png" : "sdfqefqefqef",

For reference, the easiest way to create a SHA1 hash in Linux is to use the command:

openssl SHA1 <filename>

5. signature (required): File created by signing the manifest.json file with the certificate

6. pass.json (required): It contains a JSON object which specifies the type, formatting, and the data to be displayed on the pass. Apple’s reference is available here, however, it is far from complete and is missing several important details. The only real way to understand pass.json is trial-and-error:  try to generate lots of passes with different options and see the outputs on iOS6 itself. So, that what I was doing for the last two weeks.I developed a few tools to helps me iterate through these options really fast. First it a C-shell script to generate passes from the command-line and second is a pass designer at iPass.pk that allows you to change the values/labels of fields in a reasonable GUI.

Let me give you a few examples of what I have learned that was not mentioned any where in Apple’s docs.  First, to privde some context, lets take a look at a sample pass file and its JSON object with a description of each field.

Screenshot of a boarding pass

Boarding Pass

The most interesting fields are: logoText, and primary, secondary, auxiliary, and header fields.  They are all labelled in this annotated screenshot. I have filled each field with <field type abbreviation><field number in the corresponding fields array>. Thus. P1 implies Primary Filed 1, i.e., the first primary field in the primaryFields array. Similarly S* denotes secondary fields, A* auxiliary fields, and H* header fields. Note their positions, font-sized, and styles. To checkout the other fields, try creating some passes using the following procedure or use the GUI at iPass.pk.


How to generate passes manually?

In case, you don’t want to use the GUI to iterate through the passes, you can use my C-shell script. The C-shell script in effect performs the following steps.

Step 1: Generate the Apple Developer Certificate

Go to the Apple Developer Portal and request a pass type identifier and your certificate. Export a .p12 file from the Key chain.

Step 2:  Generate key.pem and certificate.pem

openssl pkcs12 -in "My PassKit Cert.p12" -clcerts -nokeys -out certificate.pem
openssl pkcs12 -in "My PassKit Cert.p12" -nocerts -out key.pem

Step 3: Gather files 

Copy pass.json and any logo/icon/background image files in a folder.

Step 4: Generate manifest.json 

The goal is to generate JSON object which contains the SHA1 hashes of all the files your gathered in Step 3. I used the following csh script to generate manifest.json

 set MANIFEST = ../manifest.json
 echo '{' > $MANIFEST
 foreach i (*)
   set sha1 = `openssl sha1 $i | cut -d' ' -f2`
   echo \'$i\' : \'$sha1\', >> $MANIFEST
 echo '}' >> $MANIFEST

Step 5: Generate signature

Execute the following csh commands to get a signature file:

set PASSWORD = xxxx
openssl smime -passin pass:$PASSWORD  -binary -sign -signer $CWD/certificate.pem -inkey $CWD/key.pem -in manifest.json -out signature xs-outform DER

Now email this file to yourself, and open it. Cool?

Step 6: Zip the pass

zip test.pkpass *


Now email test.pkpass to yourself and see the magic.


Let me know if you if you have any questions/comments about passes, this tutorial, iPass.pk, or the shell script.


  105 Responses to “Generating passes for iOS6′s Passbook”

  1. icon.png and icon@2x.png are now required.

  2. Hi, thank you for your tutorial!
    I have followed the steps but the pass I get is not recognised by my iPhone (it’s running iOS6 beta 3, and passes from different sources usually work). The only difference I can see with working tickets is that my generated signature file is seen as a ‘document’ instead of a ‘Unix Executable File’… Would you have an idea of what’s going on?

    • @Georges – Is there any chance you were able to get yours working because I am having the exact same issue. When I mail it to myself, it is not being recognized like the other passes that I have downloaded off of the internet. I press it and an empty box pops up with only a ‘Cancel’ button visible. Any help would be… well… helpful :)

      Thanks! Mike

      • We have the same issue indeed. And unfortunately I could’t make it work yet…

      • Hey, my pass works now!
        And actually I didn’t change anything. I was just trying to upload my pass to a webserver, send it again by email (playing with the MIME type) etc… The last thing I did was to send both my pass and a working pass in the same email and both of them were recognised on my iPhone. Since that, I have no problems anymore – but I have no idea what solved the issue.
        The little difference in my signature file I mentioned seems not to be blocking.

  3. Hi, I was following your steps and when I tried to generate signature it says:

    unable to load certificate
    140735321534940:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:696:Expecting: TRUSTED CERTIFICATE

    is there anything I should do?


  4. I can’t get your method to work correctly. When I drag the pkpass file into iOS Simulator, the passcard renders correctly, but clicking the ‘Add’ button causes the following error:

    Invalid data error reading card pass.votizen.membership/123456. Manifest signature did not verify successfully

    I am successfully able to package and add the passcard, if I create it using the signpass tool, so I’ve narrowed the culprits to the p12 file or something broken in the packaging tool. I noticed that the signature file created by the signpass tool is much different than the one created by your script, but don’t know if that’s important.

    I created the p12 file from the Pass Type Id certificate in my Keychain Access.

    Do you have any ideas what I could be doing wrong?


  5. You are missing -certfile wwdr.pem when singing the manifest

  6. Hi
    Is it possible to download passbook for ipad mini and ios7?

  7. I do not know if it’s just me or if perhaps everybody else encountering
    problems with your blog. It seems like some of the written text within your posts
    are running off the screen. Can somebody else please comment and let me know if this is happening to them too?
    This might be a issue with my browser because I’ve had this happen previously.

  8. Amazing Webpage, Carry on the very good job. Thanks for your time!.

  9. Sustain the good job and bringing in the crowd!

  10. So insightful… look ahead to coming back

  11. I’m really enjoying the theme/design of your site. Do you ever run into any internet browser compatibility problems?
    A handful of my blog audience have complained about my blog
    not working correctly in Explorer but looks great in Firefox.

    Do you have any tips to help fix this issue?

  12. However, these gardens will take a lot more time and energy to create than koi waterfalls.

    Cystitis happens due to the penetration of bacteria into the urethra.
    Fortunately, nowadays you do not need to be like an emperor to adopt an indoor wall mounted waterfall sounds like.

  13. I am regular visitor, how are you everybody? This article posted at
    this website is genuinely pleasant.

  14. If you use a network of desktop computers,
    you connect the router directly to your systems.

  15. If somе ߋne wants Introduction to Business Wiley be updated
    with mmost recent technologiеs theгefore he
    must be pay a vusit this webb pаge and be up to date every day.

  16. Hі thete to all, it’s truly a gopod for mе to pay a visit tҺis site,
    it consists of pricfeⅼess Information.

    my blog post lesson plan [tbc.Businesscommunicationnetwork.com]

  17. Еxcellent post.Never knew this, thank you for letting me know.

    Аlso visitt my pаge: methods of teaching introduction to business

  18. Loving the information ⲟn tһis internet sіte, yyou havе done grreat job on tɦe pߋsts.

    my blog – Business and Administrative Communication

  19. Financing your business using personal savings (and
    paying back what you borrowed) can be a great option if you believe that you are disciplined enough
    to actually pay the money back in a timely manner.

  20. El resultado de la suma de las fuerzas ejercidas por
    la Luna y el Sol es una onda compuesta por 2 crestas, cuya situación depende de las situaciones relativas del
    Sol y de la Luna en un instante dado.

  21. Saiba que mel é considerado um fraco substituto a fim de que melaço,
    logo conclui-se que melaço poderá provocar alterações significativas dentro de sabor do sustento de mel.

  22. Ought to you discover yourself eager to enjoy a new
    Punisher recreation out on the Bayou, this one has your identify on it.

    Alsoo visit my blog … Mafia III download

  23. In a lump sum annuity you get all the money that is due to you after a deduction of taxes, charges,
    and any applicable penalties.

  24. I have a friend who is having a birthday this week and I knew this was the perfect card for him!

  25. Essa plataforma também garante a criação de páginas sem nenhuma dificuldade, tem
    recursos essenciais e também está entre as melhores enquanto matéria é preço.

  26. Blog, portanto, serve ao seu consumidor como porta de ingresso para a sua loja, oferecendo
    a ele todas e cada uma das informações que ajudarão na sua resolução de compra.

  27. Entenda-se por plataforma boa, algo que nos
    atenda em materia de recursos, sem bugs e também com respeito decente.

  28. Entretanto, é muito essencial saber como se cevar e a quantidade certa consumida.

  29. Tire suas conclusões pesquisando opiniões em fóruns e também faça contato com que já as utiliza,
    analisando desempenho, a facilidade de chegada ao suporte e nível de satisfação dele em relação à loja virtual que tem.

  30. É essencial ressaltar que não adianta só passar creme:
    é preciso passar da maneira correta, que é incessantemente com uma massagem mas vigorosa, de inferior a fim
    de cima, preferencialmente circundar, com duração média de
    10 minutos e duas vezes ao dia.

  31. Café também é utilizado a fim de elaborar cremes a fim de reduzir as estrias,
    da mesma maneira que será magnífico a fim de a celulite.Combinado com suco ácido do
    limão, seu poder de ação será maior.

  32. A panturrilha é uma localidade onde lona gorduroso subcutâneo
    costuma ser menor, por isso, é menos geral haver celulite.

  33. Que é grátis (e também geralmente open source) é sistema
    de loja virtual, como ela trabalha e também suas funcionalidades.

  34. Desta maneira já vimos que a celulite é uma gordura que precisa de
    ser queimada, que a atrofia muscular irá ajudar para a celulite se forme de modo não
    uniforme no nosso corpo e que a falta de hidratação no nosso corpo fará com que a celulite seja visível.

  35. Para eliminar a celulite do corpo, é preciso entender realmente que é a celulite,
    que a faz dificultar e também uma vez que trabalhar na desculpa do impecilho de uma forma efetiva.

  36. A celulite é sem questionamento um dos avós complicações que, maioritariamente a população feminina encontra enquanto se fala em
    situações de estética e também bem-estar, de antemão de mais a celulite é mas generalidade do que lhe pode parecer.

  37. Enorme dificuldade é a penetração dos ativos de tratamento que, geralmente,
    não conseguem chegar na camada gordurosa, que é onde entrave está concentrado.

  38. Magnificent website. Plenty of helpful information here.
    I am sending it to some pals ans additionally sharing in delicious.

    And of course, thanks in your sweat!

  39. Não é porque seu varejo não é físico ou porque você não está pensando em conseguir um contribuição financeiro,
    que não precisa de um projecto de negócios.

  40. Claro que nem todos os blogs, aliás a maior parte, não possui como alvo ganhar dinheiro acessível, mas anterior atingir outrem
    objetivos pessoais, que podem ser os mais variados.

  41. As empresas descobriram na Rede um supimpa caminho a fim de melhorar seus lucros e as vendas conectado
    dispararam, transformando a Rede em verdadeiros shoppings centers

  42. Já sob a ótica de um rosto que possui três imóveis, mas morada de praia e plaino,
    fazendas e etc, este é só um pobre que melhorou para toda a vida.

  43. Princípios para as mães e pais: outro desafio para as infantes é aprender a impelir e
    também soltar com rato, para isto nós projetamos muitos
    jogos onde eles poderão praticar com os números, os autos, os dinossauros, formas ou reconhecer os pares e também as tramas.

  44. Get out of debt today. Bankruptfy is a dirty scary word.
    But ojce you learn the ins and outs of bankruptcy it iis not so scary
    anymore. In fact, you may conclude it is
    your best chance at starting a new future.

  45. A armadilha funciona da seguinte forma: Primeiro eles
    criam pelo menos 3 ou 4 tipos de cartão de crédito diferentes que utilizam nomes pomposos como Gold, Diamante, Platinum, Esmeralda, ou qualquer outro mineral ou
    metal precioso.

  46. Termo disfunção erétil foi proposto durante a realização de um consenso sobre insuficiência
    sexual realizado em 1992 tendo sido definido como: a incapacidade de obter e
    também sustentar ereção suficiente a fim de que
    uma relação sexual satisfatória”.

  47. Dividido em três módulos, que abordavam a começar de a introdução do Facebook dentro de mundo corporativo até a estudo de certos principais cases
    de sucesso da própria agência, curso contou com uma abordagem prática, descontraída e também consultiva, destacando
    aspectos fundamentais para a maximização dos resultados na plataforma, que nem a segmentação do público-branco.

  48. Magnificent beat ! I would like to apprentice whilst you amend your web site, how could i subscribe for a weblog web site?
    The account helped me a acceptable deal. I have been tiny bit familiar of this your broadcast offered shiny clear concept

  49. Essencialmente, você cria uma conta no interior de
    Facebook estrategicamente para vulgarizar e promover um info-resultado.

  50. Hahahaha… Parabéns pelo excelente e claro artigo, realmente a quantidade de informação aqui é digna de ser cobrada, porém, sabemos
    que atrair cliente com um docinho é mais facil que puxar ele pra dentro
    da loja!!!!

  51. The Rx Crocs will slow the progression of calluses,
    bunions and hammertoes, which will give you prettier feet,
    less pain and will pay off big time as you get older.

  52. Também, isso é essencial também para definir tipo de estudo de mercado que será mais apropriada para trepar ajudar.

    my site como investir em a

  53. Attractive section of content. I just stumbled upon your
    web site and in accession capital to assert that I acquire actually enjoyed
    account your blog posts. Anyway I will be subscribing to your augment and even I achievement you access consistently rapidly.

  54. A ereção é um dos fatores mais importante da libertinagem masculina,
    posto que diversos, para se sentirem homens, baseiam-se nela e na capacidade de manter pênis ereto.

    Feel free to visit my web blog: disfuncao
    eretil (Bruce)

  55. Good write-up, I am regular visitor of one’s blog, maintain up the excellent operate, and It is going
    to be a regular visitor for a lengthy time.

  56. RESULTADOS: A amostra foi composta de 20 acompanhantes de guris atendidas na urgência pediátrica
    do IPPMG, com idade média de 28,6 anos, maioria
    do sexo feminino, nível fundamental de escolaridade
    e com renda de 2 a 4 salários mínimos.

  57. Não sou de perturbar ninguém, fico constantemente na minha e nem agrido pessoas sem ônus, ainda mais quem
    não conheço pessoalmente.

  58. Very rapidly this website will be famous amid all blogging viewers, due to it’s good content

  59. Thanks to my father who told me about this web site, this
    weblog is really awesome.

  60. Excellent weblog here! Additionally your web site rather a lot up
    fast! What web host are you the usage of? Can I get your associate
    link in your host? I desire my site loaded up as quickly as yours
    cheap NFL jerseys

  61. International EDM stars this kind of as Zhu, the 27-yr-outdated Chinese-American, Grammy Award nominee who was 1 of the headline acts at Singapore’s Ultra festival,
    also see a massive long term for EDM in Asia.

  62. Sem perder há três jogos – duas vitórias
    e um empate -, Flamengo possui 20 pontos e está na zona intermediária da tábua,
    porém ora a vitória para sonhar com uma vaga no G4.
    Nada obstante, para isso acontecer, agremiação precisaria concluir com
    um tabu de dez anos sem lucrar da Relação pelo Brasileiro.

  63. Dökülmenin gerçekleştiği bölgeye 15-20 damla olarak yine
    dairesel masajla serumun yedirilmesi gerekmekte.

  64. Böyle durumlarda bitkisel, performğal boyaların tercih edilmesi

  65. Acompanhantes em barretos, catanduva, mirassol, votuporanga, jales,
    fernandopólis e muito mais.

  66. Being all alone is often a good way to have a feeling of self-reliance and freedom but occasionally it could possibly feel a
    little lonesome in addition to terrifying. If you are unable to
    see the property a second or third time you still have ways of
    ensuring you’re not walking into a lemon. Pepper Spray is to be mounted next to one is
    bedroom bed where one sleeps in the event that someone
    enters into your personal space.

  67. Você vai aprender como seduzir um varão – prosseguirei falar do que
    FUNCIONA e também do que NÃO FUNCIONA para produzir atração intensa,
    aquele classe de atração que vai fazer este ficar com vontade
    de ter uma ligação mais profunda e longa com você.

  68. En 2014, lɑ Escuela Ԁe Negocios ԁe ⅼa Pontificia Universidad Católica del Ꮲеrú , lanza
    centrumX , ⅼa plataforma virtual especializada еn cursos MOOC ɗe negocios.

  69. Lοѕ aspirantes а estaѕ especialidades deben dar ⅼа
    documentación requerida en el Centro dde Posgrados еl
    díɑ quᥱ presentan lа prueba ⅾᥱ admisión, únicamente quienes pasen ɑl siguiente proceso de entrevista.

  70. Além do mais os métodos trazidos pelos poucos médicos que aqui estavam eram rejeitados consoante:
    FILHO, 2003.

  71. Mais ou menos 50 a 60% dos homens que fazem tratamento cirúrgico do cancro de próstata ficam com qualquer
    proporção de disfunção erétil (insuficiência
    sexual) e por volta de 10% acabam também ao longo de desenvolver a
    doença de Peyronie.

  72. It’s difficult plastic waste to energyfind well-informed peopole about this subject, but you sound like you know what you’re talking about!

  73. Nos casos orgânicos diagnóstico é concluído por
    meio de exames e também acompanhamento médico.

  74. Instead of spending funds on costly chemicals and treatments, with aquaponic gardening,
    your main cost is absorbed into the upfront tariff of equipment.
    You won’t be growing vegetation, but you will also be maintaining the fish
    in your system. Where as a process that is heavily stocked with
    fish, you might have better success with fruiting plants
    like tomatoes or peppers.

  75. It’s remarkable in favor of me to have a web site, which
    is valuable in support of my experience. thanks admin

  76. Não se trata de fazer alguma coisa impressionante ou entreter (na verdade,
    você não tem que falar nada, se você não quiser).

  77. I was very pleased to discover this website. I want to to
    thank you for your time due to this fantastic read!! I definitely loved
    every little bit of it and I have you book marked to
    look at new things in your website.

  78. Hey very cool blog!! Guy .. Beautiful .. Amazing .. I will bookmark your web site and take the feeds also?
    I’m glad to search out a lot of helpful information right here within the submit, we’d like
    develop extra strategies in this regard, thank you for
    sharing. . . . . .

  79. This post offers clear idea in favor of the new people of blogging,
    that truly how to do running a blog.

  80. Your style is unique in comparison to other folks
    I have read stuff from. Many thanks for posting when you’ve got the
    opportunity, Guess I’ll just bookmark this blog.

  81. Hello I am so glad I found your site, I really found you
    by mistake, while I was looking on Bing for something else, Regardless I am here
    now and would just like to say kudos for a incredible post and a all round exciting blog (I also love
    the theme/design), I don’t have time to go through it all at the minute but I have saved it and also added your RSS
    feeds, so when I have time I will be back to read more, Please do keep up the awesome work.

  82. Outstanding post, I conceive people should larn a lot from this
    web site its really user genial. So much great info on here :D .

  83. Em seguida recebimento do título, proprietário deve se encaminhar
    ao cartório de registro de imóveis para finalizar processo de posse.

  84. Segundo este, processo de ciência nas vendas começou
    com a acolhimento do televendas, depois se estendeu aos páginas e também
    agora chega ao WhatsApp.

  85. Simply wish to say your article is as surprising.
    The clarity in your publish is just excellent and that i could suppose you
    are a professional in this subject. Fine with your permission allow me to
    snatch your RSS feed to keep updated with imminent post.
    Thank you one million and please carry on the rewarding work.

    wholesale NFL jerseys

  86. Em outras palavras, se não tem gente chegando na sua loja não adianta colocar mais coqueiros,
    porque as suas vendas continuarão iguais.

  87. 最近のスマゲーは、画質もキレイで、なかなか楽しめるゲームが増えていますよね。

    ポケモンGO 遊び方

  88. Assim você pode usar WhatsApp para conversar sobre mas informações,
    preços, condições de pagamento, benefícios, e negociar com os seus compradores.

  89. Wonderful beat ! I would like to apprentice while you amend your website,
    how can i subscribe for a blog site? The account aided me
    a acceptable deal. I had been tiny bit acquainted of this your broadcast offered bright clear concept

  90. Entretanto, deve-se atuar no modelo hospitalocêntrico APENAS
    com a finalidade de se atingir aquele público que necessita do nosocômio sobre motivos outras pessoas, urgentes
    e também emergentes, por doenças crônicas ou imprevisíveis, acidentais ou
    incidentais, ou quando não se pôde atuar na prevenção.

  91. Por isso, é preciso estar ciente dos possíveis efeitos colaterais e também contraindicações dessas soluções mágicas” vendidas no mercado, já que tratamento
    da disfunção erétil depende sobretudo da desculpa
    do respectivo desencadeamento, seja da doença que a causou
    ou especificamente da disfunção.

  92. Por consequência que esse classe de treinamento na qual se baseia Q48 vem ganhando qualquer vez mais espaço
    no Brasil e no mundo por conta queima de 48 horas na academia
    sua versatilidade e eficiência, e está deixando os exercícios aeróbicos tradicionais
    cada vez mais para trás.

  93. d9clubはこちら

  94. I was wondering if you ever thought of changing the page layout of
    your blog? Its very well written; I love what youve got to say.
    But maybe you could a little more in the way of content so people could connect with it better.
    Youve got an awful lot of text for only having 1 or 2 images.

    Maybe you could space it out better?

  95. I think what you published made a ton of sense. But, what about
    this? suppose you added a little content? I mean,
    I don’t wish to tell you how to run your blog, however suppose
    you added a post title that grabbed people’s attention? I mean Generating passes
    for iOS6′s Passbook | Future Chips is kinda boring.
    You could glance at Yahoo’s front page and see how they create article headlines to get people to open the links.

    You might add a video or a related picture or two to get readers excited about what you’ve
    got to say. Just my opinion, it might make your posts a little

  96. Hi there every one, here every person is sharing such experience, therefore it’s fastidious to
    read this webpage, and I used to visit this blog all the time.

  97. Admiring the dedication you put into your website
    and detailed infоrmation yоu preѕent. It’s awesome tⲟ comee across
    a blog еverу onbce in a while that іsn’t tɦе sаme outdated rehashed іnformation. Excellent гead!
    I’vebookmarked your site and I’m including ʏⲟur RSS feeds tο my Google account.

    Ꭺlso visit my bog post … nấu ăn

  98. Elle fait partie du matériel de coiffure à avoir pour réaliser des coupes de cheveux.

  99. Ⅰ have fun աith, cauѕe I discovered ϳust what I was ⅼooking for.
    Ⲩou have ended mү 4 day lengthy hunt! God Bless үou man. Have
    a nice day. Bye

 Leave a Reply



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>