{"id":2287,"date":"2015-10-20T19:25:51","date_gmt":"2015-10-20T19:25:51","guid":{"rendered":"http:\/\/www.nikola-breznjak.com\/blog\/?p=2287"},"modified":"2015-10-20T19:29:21","modified_gmt":"2015-10-20T19:29:21","slug":"how-to-test-cordova-plugins-in-ionic-without-a-device","status":"publish","type":"post","link":"https:\/\/nikola-breznjak.com\/blog\/stack-overflow\/how-to-test-cordova-plugins-in-ionic-without-a-device\/","title":{"rendered":"How to test Cordova plugins in Ionic without a device?"},"content":{"rendered":"<p><a href=\"http:\/\/stackoverflow.com\/users\/534755\/nikola\"><img loading=\"lazy\" decoding=\"async\" title=\"profile for Nikola at Stack Overflow, Q&amp;A for professional and enthusiast programmers\" src=\"http:\/\/stackoverflow.com\/users\/flair\/534755.png\" rel=\"lightbox[2287]\" alt=\"profile for Nikola at Stack Overflow, Q&amp;A for professional and enthusiast programmers\" width=\"208\" height=\"58\" \/><\/a><br \/>\nI&#8217;m a big fan of <a href=\"http:\/\/stackoverflow.com\/\">Stack Overflow<\/a> and I tend to contribute regularly (am currently in the <a href=\"http:\/\/stackexchange.com\/leagues\/1\/alltime\/stackoverflow\/2008-07-31\/534755?sort=reputationchange#534755\">top 0.X%<\/a>).\u00a0In this category (<a href=\"http:\/\/www.nikola-breznjak.com\/blog\/category\/stack-overflow\/\">stackoverflow<\/a>)\u00a0of posts, I will be posting my top rated questions and answers. This, btw, is allowed as explained in the meta thread <a href=\"http:\/\/meta.stackoverflow.com\/questions\/266971\/can-i-post-so-questions-and-answers-in-a-personal-blog\/266973\">here<\/a>.<\/p>\n<p>As you may know, I&#8217;m really into Ionic framework lately\u00a0and am helping out on StackOverflow with the knowledge I gained so far with the framework. I&#8217;m in the <a href=\"http:\/\/stackoverflow.com\/tags\/ionic\/topusers\">top All time answerers<\/a> list.<\/p>\n<p>I answered\u00a0<a href=\"http:\/\/stackoverflow.com\/questions\/33195114\/testing-cordova-plugins-without-device\/33195673\">this question<\/a>\u00a0by user<a href=\"http:\/\/stackoverflow.com\/users\/5413834\/chris-lawrence\">Chris Lawrence<\/a>:<\/p>\n<p>I think I know the answer to this question already but thought I would throw it out there incase there was a workaround&#8230;.<\/p>\n<p>Just built a ionic app with ngcordova, which works fine and I have tested on my android device and deployed to playstore.<\/p>\n<p>Just in the process of deploying to the apple app store. I currently don&#8217;t have an apple ios physical device to test the cordova plugins.<\/p>\n<p>I am using sms, camera and local notification. These as far as am aware cannot be tested in the ios simulator in xcode.<\/p>\n<p>Don&#8217;t really want to spend \u00a3400 on a tablet to test one app.. any one had the same problem and found a means of testing?<\/p>\n<p>My <a href=\"http:\/\/stackoverflow.com\/questions\/33195114\/testing-cordova-plugins-without-device\/33195673#33195673\">answer<\/a> was:<\/p>\n<blockquote><p>You can test plugins in iOS simulator.<\/p>\n<p><strong>edit:<\/strong> I just stumbled upon <a href=\"http:\/\/docs.ionic.io\/v1.0\/docs\/view-usage\" rel=\"nofollow\">the official documentation<\/a> where it states that even with Ionic View you can test these plugins:<\/p>\n<ul>\n<li>com.brodysoft.sqlitePlugin 1.0.3 &#8220;Brodysoft SQLitePlugin&#8221;<\/li>\n<li>com.ionic.keyboard 1.0.3 &#8220;Keyboard&#8221;<\/li>\n<li>com.phonegap.plugins.barcodescanner 1.1.0 &#8220;BarcodeScanner&#8221;<\/li>\n<li>org.apache.cordova.battery-status 0.2.12 &#8220;Battery&#8221;<\/li>\n<li>org.apache.cordova.camera 0.3.4 &#8220;Camera&#8221;<\/li>\n<li>org.apache.cordova.console 0.2.12 &#8220;Console&#8221;<\/li>\n<li>org.apache.cordova.device 0.2.13 &#8220;Device&#8221;<\/li>\n<li>org.apache.cordova.device-motion 0.2.11 &#8220;Device Motion&#8221;<\/li>\n<li>org.apache.cordova.device-orientation 0.3.10 &#8220;Device Orientation&#8221;<\/li>\n<li>org.apache.cordova.dialogs 0.2.11 &#8220;Notification&#8221;<\/li>\n<li>org.apache.cordova.geolocation 0.3.11 &#8220;Geolocation&#8221;<\/li>\n<li>org.apache.cordova.globalization 0.3.3 &#8220;Globalization&#8221;<\/li>\n<li>org.apache.cordova.network-information 0.2.14 &#8220;Network Information&#8221;<\/li>\n<li>org.apache.cordova.vibration 0.3.12 &#8220;Vibration&#8221;<\/li>\n<li>org.chromium.zip 1.0.0 &#8220;Zip&#8221;<\/li>\n<\/ul>\n<\/blockquote>\n<blockquote class=\"twitter-tweet\" data-width=\"550\">\n<p lang=\"en\" dir=\"ltr\">How to test <a href=\"https:\/\/twitter.com\/hashtag\/Cordova?src=hash\">#Cordova<\/a> plugins in <a href=\"https:\/\/twitter.com\/hashtag\/Ionic?src=hash\">#Ionic<\/a> without a device? <a href=\"https:\/\/t.co\/IpyYNV4uAn\">https:\/\/t.co\/IpyYNV4uAn<\/a><\/p>\n<p>&mdash; Nikola Bre\u017enjak (@HitmanHR) <a href=\"https:\/\/twitter.com\/HitmanHR\/status\/656552435968790532\">October 20, 2015<\/a><\/p><\/blockquote>\n<p><script async src=\"\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m a big fan of Stack Overflow and I tend to contribute regularly (am currently in the top 0.X%).\u00a0In this category (stackoverflow)\u00a0of posts, I will be posting my&hellip;<\/p>\n","protected":false},"author":1,"featured_media":2236,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43,35],"tags":[],"class_list":["post-2287","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ionic","category-stack-overflow"],"_links":{"self":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts\/2287","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=2287"}],"version-history":[{"count":4,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts\/2287\/revisions"}],"predecessor-version":[{"id":2291,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts\/2287\/revisions\/2291"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/media\/2236"}],"wp:attachment":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/media?parent=2287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/categories?post=2287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/tags?post=2287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}