{"id":3664,"date":"2017-09-07T09:42:52","date_gmt":"2017-09-07T09:42:52","guid":{"rendered":"http:\/\/www.nikola-breznjak.com\/blog\/?p=3664"},"modified":"2017-09-07T09:59:05","modified_gmt":"2017-09-07T09:59:05","slug":"use-fastlane-pem-automatically-generate-renew-push-notification-profiles","status":"publish","type":"post","link":"https:\/\/nikola-breznjak.com\/blog\/ios\/use-fastlane-pem-automatically-generate-renew-push-notification-profiles\/","title":{"rendered":"How to use fastlane pem to automatically generate and renew your push notification profiles"},"content":{"rendered":"<p>This is a short tip which will save you a lot of time!<\/p>\n<p>Ever gone through the tedious task of manually creating and maintaining your push notification profiles for your iOS apps? Tutorials like <a href=\"http:\/\/www.apptuitions.com\/generate-pem-file-for-push-notification\/\">this one<\/a> were very useful, but nowadays thanks to <a href=\"https:\/\/github.com\/fastlane\/fastlane\/tree\/master\/pem\">fastlane pem<\/a>, you can do it with a single command.<\/p>\n<p>The pem tool creates new <code>.pem<\/code>, <code>.cer<\/code>, and <code>.p12<\/code> files to be uploaded to your push server if a valid push notification profile is needed.<\/p>\n<p>To install pem run:<\/p>\n<p><code>sudo gem install fastlane<\/code><\/p>\n<p>Also, make sure you have the latest version of the Xcode command line tools installed:<\/p>\n<p><code>xcode-select --install<\/code><\/p>\n<p>Then, just run <code>fastlane pem<\/code> and it will ask you information about the app for which you wish to renew the certificates.<\/p>\n<p>You can pass parameters like this:<\/p>\n<p><code>fastlane pem -a com.mygreat.app -u username<\/code><\/p>\n<p>If you want to generate a development certificate run:<\/p>\n<p><code>fastlane pem --development<\/code><\/p>\n<p>To get a list of available options run:<\/p>\n<p><code>fastlane pem --help<\/code><\/p>\n<p>?<\/p>\n<p>If you&#8217;re looking to generate the same thing but for VoIP push notification, then check out <a href=\"http:\/\/www.nikola-breznjak.com\/blog\/ios\/use-fastlane-pem-automatically-generate-renew-voip-push-notification-profiles\/\">this tutorial<\/a>.<\/p>\n<blockquote class=\"twitter-tweet\" data-width=\"550\">\n<p lang=\"en\" dir=\"ltr\">How to use fastlane pem to automatically generate and renew your <a href=\"https:\/\/twitter.com\/hashtag\/push?src=hash\">#push<\/a> notification profiles <a href=\"https:\/\/t.co\/cutGxIDH6Y\">https:\/\/t.co\/cutGxIDH6Y<\/a><\/p>\n<p>&mdash; Nikola Bre\u017enjak (@HitmanHR) <a href=\"https:\/\/twitter.com\/HitmanHR\/status\/905728308037513217\">September 7, 2017<\/a><\/p><\/blockquote>\n<p><script async src=\"\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a short tip which will save you a lot of time! Ever gone through the tedious task of manually creating and maintaining your push notification profiles&hellip;<\/p>\n","protected":false},"author":1,"featured_media":3665,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[52],"tags":[],"class_list":["post-3664","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ios"],"_links":{"self":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts\/3664","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/comments?post=3664"}],"version-history":[{"count":4,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts\/3664\/revisions"}],"predecessor-version":[{"id":3673,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts\/3664\/revisions\/3673"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/media\/3665"}],"wp:attachment":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/media?parent=3664"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/categories?post=3664"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/tags?post=3664"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}