Search This Blog

Tuesday 29 March 2016

CDVPlugin not found/Mach -o error while archiving or exporting ipa of ionic/cordova apps

When you have a plugin written in swift in your ionic/cordova app, it builds but when archive or export it returns CDVPlugin not found error. Follow the steps below to resolve the issue.
Note: Run all ionic commands build, add etc using sudo only.
Ex: sudo ionic build ios
As we are moving code from windows to mac, permissions are arising.
Steps:
  1. In terminal change give permissions
$ Sudo chown –R:staff <your folder path>
$  sudo chown –R 777 *
  1. Now go to Target-> build settings
    1. Look for RunPaths and add below if it’s not there:
$(inherited)@executable_path/Frameworks
@executable_path/Frameworks

  
    1. Now look for Header Search Paths and add the below:
$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include

    1. Set Enable Bit code to No

    1. In Deployment section, clear Install Owner and Groups

  1. Now go to Build Phases and
    1. Empty Embedded Frameworks, (if any swift plugins are there)

  1. Go to general and in frameworks add UIKit if not added


No comments:

Post a Comment