{"id":746,"date":"2017-01-23T15:36:44","date_gmt":"2017-01-23T14:36:44","guid":{"rendered":"https:\/\/zaven.co\/blog\/?p=746"},"modified":"2025-04-08T19:55:09","modified_gmt":"2025-04-08T17:55:09","slug":"jet-lobster-ruby-local-apns-testing-tool","status":"publish","type":"post","link":"https:\/\/zaven.co\/blog\/jet-lobster-ruby-local-apns-testing-tool\/","title":{"rendered":"JetLobster ruby local APNs testing tool"},"content":{"rendered":"<p>Are you working on an iOS mobile app and have to check if all of the programmed notifications work correctly? Keep on reading: <em>JetLobster ruby local APNs tool<\/em> can easily test the service of notifications in your iPhone app.<!--more--><\/p>\n<p>Testing the notification service isn&#8217;t difficult. Although, in our case, it happened to be impossible. Why? Functionalities on the back-end side weren&#8217;t ready yet, and that\u2019s why we needed a tool that would help us send real notifications in a quick and easy way.<\/p>\n<h1>How did I make JetLobster ruby local APNs testing tool?<\/h1>\n<p>I came up with an idea to write a ruby script which will make it possible. The main goal was to make everything work efficiently and flexibly. Creating the script took me only a few minutes.&nbsp;<b>To send notifications to APNs, I&#8217;ve used a gem called <a href=\"https:\/\/github.com\/jpoz\/APNS\" rel=\"nofollow\">APNS<\/a>&nbsp;<\/b>&#8211; it happened to be easy and at the same time, it provided everything that I needed. Additionally, <b>I&#8217;ve used the <a href=\"https:\/\/rubygems.org\/gems\/OptionParser\" rel=\"nofollow\">OptionParser<\/a> gem to parse parameters in a terminal.<\/b>&nbsp;Thanks to that the tool became more functional and user-friendly.<\/p>\n<h1>Next steps of testing the&nbsp;notifications<\/h1>\n<p>To send the notification I needed <b>an application with configurated APNs services, generated *.pem file and the tool&#8217;s token <\/b>(that I&#8217;ve managed to get after registering the service).&nbsp;<b>The script requires <a href=\"https:\/\/github.com\/ruby\/ruby\" rel=\"nofollow\">ruby<\/a> and <a href=\"https:\/\/rubygems.org\/gems\/bundler\" rel=\"nofollow\">bundler<\/a>. <\/b>After cloning a <a href=\"https:\/\/github.com\/MrOnyszko\/jet-lobster\" rel=\"nofollow\">repository<\/a>, it was needed to move on to a directory and run bundle install command. All that had to be done, was to run the script with a minimum of 3 parameters.<\/p>\n<pre><code class=\"language-bash\">ruby jet_lobster.rb --pem \"PathToYourPemFile.pem\" &nbsp;\n--token DEADC00FE --message \"JetLobster is awesome!\"<\/code><\/pre>\n<p>With the <code>--pem<\/code> option I gave a path to our pem file, <code>--token<\/code>. Here I&#8217;ve provided tool&#8217;s token, and in <code>--message<\/code>, a notification message. In the above command, I didn&#8217;t use <code>--other<\/code> option &#8211; but if used, it helps to send an extra data that is placed in a notification. Exemplary:<\/p>\n<pre><code class=\"language-bash\">ruby jet_lobster.rb --pem \"PathToYourPemFile.pem\" \n--token DEADC00FE --message \"JetLobster is awesome!\" \n--other \"{:sent =&gt; 'with JetLobster'}\"\n<\/code><\/pre>\n<p>Remember that when providing the data, you must use ruby syntax creating <a href=\"https:\/\/ruby-doc.org\/core-2.4.0\/Hash.html\" rel=\"nofollow\">Hash<\/a>.<\/p>\n<p>And that&#8217;s it. In my opinion, <strong>JetLobster ruby local APNs<\/strong> is an easy, quick and flexible tool to test the service of notification in an iOS app.&nbsp; And how do you like it?<\/p>\n<p>Check out other <em>iOS development<\/em> tutorial on our blog: <a href=\"https:\/\/zaven.co\/blog\/core-ml-machine-learning-for-ios\/\">Core ML: Machine Learning for iOS<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<hr>\n<h3>You can find the source code on my <a href=\"https:\/\/github.com\/MrOnyszko\/jet-lobster\" rel=\"nofollow\">Github<\/a>.<\/h3>\n<hr>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Are you working on an iOS mobile app and have to check if all of the programmed notifications work correctly? Keep on reading: JetLobster ruby local APNs tool can easily test the service of notifications in your iPhone app.<\/p>\n","protected":false},"author":11,"featured_media":764,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[57,5],"tags":[74,38,34,36,19,72,73,71],"class_list":["post-746","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ios-development","category-tutorials","tag-apns","tag-app-ios-developer","tag-ios-app-building","tag-ios-app-development","tag-ios-development","tag-jetlobster","tag-ruby","tag-testing-tool"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>JetLobster ruby local APNs testing tool | Zaven Blog<\/title>\n<meta name=\"description\" content=\"JetLobster ruby local APNs tool allows you to test the notification service in iPhone app. It is an easy, quick and flexible tool to tests. Find out more.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/zaven.co\/blog\/jet-lobster-ruby-local-apns-testing-tool\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JetLobster ruby local APNs testing tool | Zaven Blog\" \/>\n<meta property=\"og:description\" content=\"JetLobster ruby local APNs tool allows you to test the notification service in iPhone app. It is an easy, quick and flexible tool to tests. Find out more.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/zaven.co\/blog\/jet-lobster-ruby-local-apns-testing-tool\/\" \/>\n<meta property=\"og:site_name\" content=\"Zaven Blog\" \/>\n<meta property=\"article:published_time\" content=\"2017-01-23T14:36:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-08T17:55:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/zaven.co\/blog\/wp-content\/uploads\/2017\/01\/mniejsze-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1440\" \/>\n\t<meta property=\"og:image:height\" content=\"583\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Slawomir Onyszko\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Slawomir Onyszko\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/zaven.co\/blog\/jet-lobster-ruby-local-apns-testing-tool\/\",\"url\":\"https:\/\/zaven.co\/blog\/jet-lobster-ruby-local-apns-testing-tool\/\",\"name\":\"JetLobster ruby local APNs testing tool | Zaven Blog\",\"isPartOf\":{\"@id\":\"https:\/\/zaven.co\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/zaven.co\/blog\/jet-lobster-ruby-local-apns-testing-tool\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/zaven.co\/blog\/jet-lobster-ruby-local-apns-testing-tool\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/zaven.co\/blog\/wp-content\/uploads\/2017\/01\/mniejsze-1.png\",\"datePublished\":\"2017-01-23T14:36:44+00:00\",\"dateModified\":\"2025-04-08T17:55:09+00:00\",\"author\":{\"@id\":\"https:\/\/zaven.co\/blog\/#\/schema\/person\/54027190fa6219030f9c4705fa7e0168\"},\"description\":\"JetLobster ruby local APNs tool allows you to test the notification service in iPhone app. It is an easy, quick and flexible tool to tests. Find out more.\",\"breadcrumb\":{\"@id\":\"https:\/\/zaven.co\/blog\/jet-lobster-ruby-local-apns-testing-tool\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/zaven.co\/blog\/jet-lobster-ruby-local-apns-testing-tool\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zaven.co\/blog\/jet-lobster-ruby-local-apns-testing-tool\/#primaryimage\",\"url\":\"https:\/\/zaven.co\/blog\/wp-content\/uploads\/2017\/01\/mniejsze-1.png\",\"contentUrl\":\"https:\/\/zaven.co\/blog\/wp-content\/uploads\/2017\/01\/mniejsze-1.png\",\"width\":1440,\"height\":583,\"caption\":\"JetLobster ruby local APNs testing tool\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/zaven.co\/blog\/jet-lobster-ruby-local-apns-testing-tool\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/zaven.co\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JetLobster ruby local APNs testing tool\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/zaven.co\/blog\/#website\",\"url\":\"https:\/\/zaven.co\/blog\/\",\"name\":\"Zaven Blog\",\"description\":\"Software development blog. Generative AI, web &amp; mobile applications.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/zaven.co\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/zaven.co\/blog\/#\/schema\/person\/54027190fa6219030f9c4705fa7e0168\",\"name\":\"Slawomir Onyszko\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zaven.co\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4dc8884e2167c9cc97596c4b71c7c250?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4dc8884e2167c9cc97596c4b71c7c250?s=96&d=mm&r=g\",\"caption\":\"Slawomir Onyszko\"},\"description\":\"S\u0142awek is our mobile developer who mostly takes care of creating Android applications. He is constantly enhancing his skills of advanced Android app development and he wants to share this knowledge via Zaven\u2019s blog. In his spare time S\u0142awek enjoys watching a good movie at the cinema.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/mronyszko\"],\"url\":\"https:\/\/zaven.co\/blog\/author\/slawekzaven-pl\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JetLobster ruby local APNs testing tool | Zaven Blog","description":"JetLobster ruby local APNs tool allows you to test the notification service in iPhone app. It is an easy, quick and flexible tool to tests. Find out more.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/zaven.co\/blog\/jet-lobster-ruby-local-apns-testing-tool\/","og_locale":"en_US","og_type":"article","og_title":"JetLobster ruby local APNs testing tool | Zaven Blog","og_description":"JetLobster ruby local APNs tool allows you to test the notification service in iPhone app. It is an easy, quick and flexible tool to tests. Find out more.","og_url":"https:\/\/zaven.co\/blog\/jet-lobster-ruby-local-apns-testing-tool\/","og_site_name":"Zaven Blog","article_published_time":"2017-01-23T14:36:44+00:00","article_modified_time":"2025-04-08T17:55:09+00:00","og_image":[{"width":1440,"height":583,"url":"https:\/\/zaven.co\/blog\/wp-content\/uploads\/2017\/01\/mniejsze-1.png","type":"image\/png"}],"author":"Slawomir Onyszko","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Slawomir Onyszko","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/zaven.co\/blog\/jet-lobster-ruby-local-apns-testing-tool\/","url":"https:\/\/zaven.co\/blog\/jet-lobster-ruby-local-apns-testing-tool\/","name":"JetLobster ruby local APNs testing tool | Zaven Blog","isPartOf":{"@id":"https:\/\/zaven.co\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/zaven.co\/blog\/jet-lobster-ruby-local-apns-testing-tool\/#primaryimage"},"image":{"@id":"https:\/\/zaven.co\/blog\/jet-lobster-ruby-local-apns-testing-tool\/#primaryimage"},"thumbnailUrl":"https:\/\/zaven.co\/blog\/wp-content\/uploads\/2017\/01\/mniejsze-1.png","datePublished":"2017-01-23T14:36:44+00:00","dateModified":"2025-04-08T17:55:09+00:00","author":{"@id":"https:\/\/zaven.co\/blog\/#\/schema\/person\/54027190fa6219030f9c4705fa7e0168"},"description":"JetLobster ruby local APNs tool allows you to test the notification service in iPhone app. It is an easy, quick and flexible tool to tests. Find out more.","breadcrumb":{"@id":"https:\/\/zaven.co\/blog\/jet-lobster-ruby-local-apns-testing-tool\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zaven.co\/blog\/jet-lobster-ruby-local-apns-testing-tool\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zaven.co\/blog\/jet-lobster-ruby-local-apns-testing-tool\/#primaryimage","url":"https:\/\/zaven.co\/blog\/wp-content\/uploads\/2017\/01\/mniejsze-1.png","contentUrl":"https:\/\/zaven.co\/blog\/wp-content\/uploads\/2017\/01\/mniejsze-1.png","width":1440,"height":583,"caption":"JetLobster ruby local APNs testing tool"},{"@type":"BreadcrumbList","@id":"https:\/\/zaven.co\/blog\/jet-lobster-ruby-local-apns-testing-tool\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zaven.co\/blog\/"},{"@type":"ListItem","position":2,"name":"JetLobster ruby local APNs testing tool"}]},{"@type":"WebSite","@id":"https:\/\/zaven.co\/blog\/#website","url":"https:\/\/zaven.co\/blog\/","name":"Zaven Blog","description":"Software development blog. Generative AI, web &amp; mobile applications.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/zaven.co\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/zaven.co\/blog\/#\/schema\/person\/54027190fa6219030f9c4705fa7e0168","name":"Slawomir Onyszko","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zaven.co\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4dc8884e2167c9cc97596c4b71c7c250?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4dc8884e2167c9cc97596c4b71c7c250?s=96&d=mm&r=g","caption":"Slawomir Onyszko"},"description":"S\u0142awek is our mobile developer who mostly takes care of creating Android applications. He is constantly enhancing his skills of advanced Android app development and he wants to share this knowledge via Zaven\u2019s blog. In his spare time S\u0142awek enjoys watching a good movie at the cinema.","sameAs":["https:\/\/www.linkedin.com\/in\/mronyszko"],"url":"https:\/\/zaven.co\/blog\/author\/slawekzaven-pl\/"}]}},"_links":{"self":[{"href":"https:\/\/zaven.co\/blog\/wp-json\/wp\/v2\/posts\/746","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zaven.co\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zaven.co\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zaven.co\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/zaven.co\/blog\/wp-json\/wp\/v2\/comments?post=746"}],"version-history":[{"count":34,"href":"https:\/\/zaven.co\/blog\/wp-json\/wp\/v2\/posts\/746\/revisions"}],"predecessor-version":[{"id":69773,"href":"https:\/\/zaven.co\/blog\/wp-json\/wp\/v2\/posts\/746\/revisions\/69773"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/zaven.co\/blog\/wp-json\/wp\/v2\/media\/764"}],"wp:attachment":[{"href":"https:\/\/zaven.co\/blog\/wp-json\/wp\/v2\/media?parent=746"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zaven.co\/blog\/wp-json\/wp\/v2\/categories?post=746"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zaven.co\/blog\/wp-json\/wp\/v2\/tags?post=746"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}