{"id":16,"date":"2014-10-13T02:07:02","date_gmt":"2014-10-13T02:07:02","guid":{"rendered":"http:\/\/macfam.me\/phonegap-blog\/?p=15"},"modified":"2017-04-30T01:10:50","modified_gmt":"2017-04-30T01:10:50","slug":"cordova-build-failed-after-adding-a-new-plugin","status":"publish","type":"post","link":"https:\/\/appsbyjohn.com\/learn\/cordova-build-failed-after-adding-a-new-plugin\/","title":{"rendered":"cordova build failed after adding a new plugin"},"content":{"rendered":"<p>Nothing interrupts your productivity like a random Build Failed from the CLI. If your build is failing after you recently added a new plugin and especially if you are getting a CpResource error here is the solution for iOS and Xcode:<br \/>\n<!--more--><\/p>\n<ul>\n<li>Open the Xcode project<\/li>\n<li>Click on the App name in the sidebar.<\/li>\n<li>Click the <strong>Build Phases<\/strong> tab.<\/li>\n<li>Open the\u00a0<strong>Copy Bundle Resources\u00a0<\/strong>section.<\/li>\n<li>Any missing resources will show up in red. You need to add them manually.<\/li>\n<\/ul>\n<p>For instance, I recently added the <a href=\"http:\/\/plugins.cordova.io\/#\/package\/org.apache.cordova.dialogs\">cordova dialogs plugin<\/a> to my iOS project. The\u00a0build failed with the CpResource error and CDVNotification.bundle was the missing resource. I was able to locate the bundle in the root project folder &#8211; plugins &#8211;\u00a0org.apache.cordova.dialogs &#8211; src &#8211; ios.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nothing interrupts your productivity like a random Build Failed from the CLI. If your build is failing after you recently added a new plugin and especially if you are getting a CpResource error here is the solution for iOS and Xcode:<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-16","post","type-post","status-publish","format-standard","hentry","category-hybrid-app-development"],"_links":{"self":[{"href":"https:\/\/appsbyjohn.com\/learn\/wp-json\/wp\/v2\/posts\/16","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/appsbyjohn.com\/learn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/appsbyjohn.com\/learn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/appsbyjohn.com\/learn\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/appsbyjohn.com\/learn\/wp-json\/wp\/v2\/comments?post=16"}],"version-history":[{"count":2,"href":"https:\/\/appsbyjohn.com\/learn\/wp-json\/wp\/v2\/posts\/16\/revisions"}],"predecessor-version":[{"id":295,"href":"https:\/\/appsbyjohn.com\/learn\/wp-json\/wp\/v2\/posts\/16\/revisions\/295"}],"wp:attachment":[{"href":"https:\/\/appsbyjohn.com\/learn\/wp-json\/wp\/v2\/media?parent=16"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/appsbyjohn.com\/learn\/wp-json\/wp\/v2\/categories?post=16"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/appsbyjohn.com\/learn\/wp-json\/wp\/v2\/tags?post=16"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}