{"id":154,"date":"2016-07-02T00:31:57","date_gmt":"2016-07-01T15:31:57","guid":{"rendered":"http:\/\/www.kwonline.org\/memo2\/?p=154"},"modified":"2016-07-02T00:31:57","modified_gmt":"2016-07-01T15:31:57","slug":"phonegap%e3%82%a2%e3%83%97%e3%83%aa%e3%81%abadobe-mobile-sdk%e3%82%92%e5%85%a5%e3%82%8c%e3%82%8b","status":"publish","type":"post","link":"https:\/\/www.kwonline.org\/memo2\/2016\/07\/02\/phonegap%e3%82%a2%e3%83%97%e3%83%aa%e3%81%abadobe-mobile-sdk%e3%82%92%e5%85%a5%e3%82%8c%e3%82%8b\/","title":{"rendered":"Phonegap\u30a2\u30d7\u30ea\u306bAdobe Mobile SDK\u3092\u5165\u308c\u308b"},"content":{"rendered":"<p>\t\t\t\t\u307e\u305a\u306fMac\u4e0a\u3067Phonegap\u30a2\u30d7\u30ea\u3092\u4f5c\u308b\u3068\u3053\u308d\u304b\u3089\u59cb\u3081\u305f\u3002<\/p>\n<p>\u30b0\u30b0\u308b\u3068\u7d50\u69cb\u53e4\u3044\u60c5\u5831\u304c\u30d2\u30c3\u30c8\u3057\u3066\u56f0\u3063\u305f\u304c\u3001Phongegap\u306e\u4e2d\u8eab\u306fCordova\u306a\u306e\u3067\u3001Cordova\u306e\u74b0\u5883\u3092\u63c3\u3048\u308c\u3070\u826f\u3044\u305d\u3046\u3060\u3002<\/p>\n<p>Xcode\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u3060\u3063\u305f\u306e\u3067\u3001<br \/>\nXcode\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30c4\u30fc\u30eb\u3092\u5165\u308c\u308b\u3002<\/p>\n<p>\u3042\u3068\u3001git\u3082\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u306a\u306e\u3067\u3001\u305d\u306e\u307e\u307e\u4f7f\u3046\u3002<\/p>\n<p>\u3067\u3001\u4eca\u5ea6\u306fNode.js\u3092\u5165\u308c\u308b\u3002<br \/>\nnode.js\u306b\u542b\u307e\u308c\u308bnpm\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3046\u305f\u3081\u3067\u3042\u308b\u3002<br \/>\n<a href=\"https:\/\/nodejs.org\/en\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/nodejs.org\/en\/<\/a><\/p>\n<p>\u305d\u3057\u3066cordova\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">$ sudo npm install cordova -g<\/pre>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3089\u3001\u65e9\u901f\u30c6\u30b9\u30c8\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u308b<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">$ cordova create test-project<\/pre>\n<p>\u305d\u3057\u3066iOS\u3068Android\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3092\u8ffd\u52a0<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">$ cordova platforms add ios\n$ cordova platforms add android<\/pre>\n<p>\u305d\u3046\u3059\u308b\u3068test-project\/platforms\u914d\u4e0b\u306bios\u3068android\u3068\u3044\u3046\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u305d\u308c\u305e\u308c\u51fa\u6765\u4e0a\u304c\u308b\u306e\u3067\u3001\u305d\u308c\u3089\u3092build\u3057\u305f\u306e\u3061\u3001\u30a8\u30df\u30e5\u30ec\u30fc\u30bf\u30fc\u3067\u8d77\u52d5\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">$ cordova build ios\n$ cordova emulate ios<\/pre>\n<p>\u3068\u3044\u3046\u308f\u3051\u3067\u3001\u6b21\u306fAdobe\u306eSDK\u3092\u5165\u308c\u307e\u3059\u3002<br \/>\n\u7ba1\u7406\u753b\u9762\u304b\u3089Phonegap plugin\u3068\u3044\u3046\u306e\u3082\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u304a\u304d\u307e\u3059\u3002<br \/>\n<a href=\"https:\/\/marketing.adobe.com\/resources\/help\/en_US\/mobile\/ios\/phonegap.html\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/marketing.adobe.com\/resources\/help\/en_US\/mobile\/ios\/phonegap.html<\/a><br \/>\n\u6700\u521d\u306fiOS\u3002\u901a\u5e38\u306eiOS\u30a2\u30d7\u30ea\u3068\u540c\u3058\u304fADBMobile\u30e9\u30a4\u30d6\u30e9\u30ea\u3068ADBMobileConfig.json\u3092\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001ADBMobile_PhoneGap.h \u3068 ADBMobile_PhoneGap.m \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306eplugins\u30d5\u30a9\u30eb\u30c0\u306b\u30b3\u30d4\u30fc\u3002<\/p>\n<p>\u305d\u308c\u304b\u3089\u3001test-project\/platforms\/ios\/www \u306bPhonegap\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u542b\u307e\u308c\u308bADBHelpler.js\u3092\u30b3\u30d4\u30fc\u3059\u308b\u3002<\/p>\n<p>\u3067\u3001config.xml\u306b\u4e0b\u8a18\u306e\u8981\u7d20\u3092\u8cbc\u308a\u4ed8\u3051\u308b\u3068\u3042\u308b\u304c\u3001config.xml\u304c\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306eroot\u3068platforms\/ios\/\u306e\uff12\u7b87\u6240\u306b\u3042\u308b\u3093\u3060\u304c\u3001\u3069\u3063\u3061\u3060\uff1f<br \/>\n\u3068\u308a\u3042\u3048\u305a\u4e21\u65b9\u306b\u5165\u308c\u3068\u3044\u305fw<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">&lt;feature name=&quot;ADBMobile_PhoneGap&quot;&gt;\n    &lt;param name=&quot;ios-package&quot; value=&quot;ADBMobile_PhoneGap&quot; \/&gt;\n&lt;\/feature&gt;<\/pre>\n<p>\u3053\u3053\u307e\u3067\u3084\u3063\u305f\u3089\u3001\u6b21\u306fADBHelper.js\u306e\u5b9f\u88c5\u3002<br \/>\n\u3068\u308a\u3042\u3048\u305awww\u306e\u4e2d\u306eindex.html\u306b\u5165\u308c\u308b\u3002<br \/>\n<\/head>\u9589\u3058\u30bf\u30b0\u306e\u76f4\u524d\u306b\u3001ADBHelper.js\u3092\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u3002<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">&lt;script type=&quot;text\/javascript&quot; charset=&quot;utf-8&quot; src=&quot;ADB_Helper.js&quot;&gt;&lt;\/script&gt;<\/pre>\n<p>\u3042\u3068\u306f\u5404ADB.trackState\u3092\u30b3\u30fc\u30eb\u3059\u308c\u3070\u30d3\u30fc\u30b3\u30f3\u304c\u98db\u3076\u3001\u306f\u305a\u306a\u306e\u3067\u3059\u304c\u3001\u3069\u3046\u3084\u3089Cordova\u30a2\u30d7\u30ea\u5185\u3067\u306fonDeviceReady\u30a4\u30d9\u30f3\u30c8\u304c\u767a\u751f\u3057\u3066\u304b\u3089\u3058\u3083\u306a\u3044\u3068\u5236\u5fa1\u51fa\u6765\u306a\u3044\u3002<\/p>\n<p>\u3067\u3001\u3068\u308a\u3042\u3048\u305ajs\/index.js\u5185\u3067onDeviceReady\u3067\u5b9f\u884c\u3055\u308c\u308b\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u6570\u304c\u3042\u3063\u305f\u306e\u3067\u3001\u305d\u306e\u4e2d\u306bADB.trackState\u3092\u5165\u308c\u305f\u3089\u52d5\u3044\u305f<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">    onDeviceReady: function() {\n        app.receivedEvent('deviceready');\n    },\n    \/\/ Update DOM on a Received Event\n    receivedEvent: function(id) {\n        var parentElement = document.getElementById(id);\n        var listeningElement = parentElement.querySelector('.listening');\n        var receivedElement = parentElement.querySelector('.received');\n\n        listeningElement.setAttribute('style', 'display:none;');\n        receivedElement.setAttribute('style', 'display:block;');\n\n        console.log('Received Event: ' + id);\n        \n        \/* \u3053\u3053\u3067Adobe Analytics\u306e\u30b3\u30fc\u30c9\u3092\u5b9f\u884c *\/\n        ADB.setDebugLogging(true);\n        ADB.collectLifecycleData();\n        \/\/pageName\u306bHelloCordova\u3001prop1\u306bhoge\u3092\u30bb\u30c3\u30c8\n        ADB.trackState(&quot;HelloCordova&quot;, {&quot;&amp;&amp;c1&quot;:&quot;hoge&quot;}); \n    }\n<\/pre>\n<p>trackingServer\u3078\u306e\u9001\u4fe1\u30d3\u30fc\u30b3\u30f3\u306e\u4e2d\u8eab\u306fXcode\u306e\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u51fa\u3066\u304f\u308b\u306e\u3067\u3001\u305d\u308c\u3067\u78ba\u8a8d\u3002<br \/>\nPhonegap\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u3061\u3083\u3093\u3068plugins\u30d5\u30a9\u30eb\u30c0\u306b\u30b3\u30d4\u30fc\u3055\u308c\u3066\u306a\u3044\u3068\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u898b\u3064\u304b\u3089\u306a\u3044\u3068\u3044\u3046\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u304d\u3066\u6012\u3089\u308c\u308b\u306e\u3067\u6ce8\u610f\u3002<\/p>\n<p>\u4ee5\u4e0aiOS<\/p>\n<p>Android\u3082\u5927\u4f53\u3084\u308b\u4e8b\u306f\u540c\u3058\u3002<br \/>\n<a href=\"https:\/\/marketing.adobe.com\/resources\/help\/en_US\/mobile\/android\/phonegap.html\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/marketing.adobe.com\/resources\/help\/en_US\/mobile\/android\/phonegap.html<\/a><br \/>\n\u3057\u304b\u3057build\u3057\u305f\u3089target\u304c\u898b\u3064\u304b\u3089\u306a\u3044\u3068\u304b\u3067\u6012\u3089\u308c\u308b\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">$ cordova build android<\/pre>\n<p>\u3068\u3044\u3046\u308f\u3051\u3067Android SDK Manager\u3092\u8d77\u52d5\u3057\u3066\u3082\u308d\u3082\u308d\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3057\u305f\u308a\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066retry\u3057\u305f\u3089\u52d5\u3044\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u307e\u305a\u306fMac\u4e0a\u3067Phonegap\u30a2\u30d7\u30ea\u3092\u4f5c\u308b\u3068\u3053\u308d\u304b\u3089\u59cb\u3081\u305f\u3002 \u30b0\u30b0\u308b\u3068\u7d50\u69cb\u53e4\u3044\u60c5\u5831\u304c\u30d2\u30c3\u30c8\u3057\u3066\u56f0\u3063\u305f\u304c\u3001Phongegap\u306e\u4e2d\u8eab\u306fCordova\u306a\u306e\u3067\u3001Cordova\u306e\u74b0\u5883\u3092\u63c3\u3048\u308c\u3070\u826f\u3044\u305d\u3046\u3060\u3002 Xcode\u306f\u30a4\u30f3\u30b9\u30c8\u30fc [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,6,12],"tags":[],"class_list":["post-154","post","type-post","status-publish","format-standard","hentry","category-android","category-ios","category-web"],"_links":{"self":[{"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/posts\/154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/comments?post=154"}],"version-history":[{"count":0,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/posts\/154\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/media?parent=154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/categories?post=154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/tags?post=154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}