Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cordova build for iOS - No profile found

Tags:

xcode

ios

cordova

I am confronted with a cordova builds on MacOS. The builds work fine for Android, but building iOS is really painful. Here is what happens:

>cordova build ios --device --debug --buildConfig ./build.json
.....
Check dependencies
No profile matching '******' found:  Xcode couldn't find a profile matching '******'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the General tab of the target editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.2'

This is a fresh install of latest versions of everything (node, cordova, cordova-ios, XCode, etc). I have everything set in terms of developer id, team, certificates and provisioning profiles. All those artifacts are valid and I know for sure because I am moving this build from Intel XDK into my local Mac computer. Here is my build.json:

{
    "ios": {
        "debug": {
            "provisioningProfile": "******",
            "developmentTeam": "******",
            "packageType": "development"
        },
        "release": {
            "provisioningProfile": "******",
            "developmentTeam": "*******",
            "packageType": "app-store"
        }
    }
}

I can see all my provisioning profiles in XCode account preferences. I also see them in /Users/me/Library/MobileDevices/Provisioning Profiles folder. I've opened XCode project and adjusted the code signing for project and target in Build Settings and General tabs. The provisioning profiles are there, the team ID is there.

All I need now is to make cordova command line work.

So, how can I make cordova and XCode to cooperate? Where does it look for those profiles and why can't it find them? What gives?

like image 341
Dima Avatar asked Feb 03 '17 10:02

Dima


1 Answers

I had this problem too and spent days trying to build until I finally figured it out. For some reason the build fails if my iPhone is plugged into the Mac, but if I unplug it, it builds perfectly fine. Then I open Xcode, plug in the phone, and run it with no problems. I have no explanation for why this happens but I haven't seen the error since. Hopefully this helps for anyone struggling with this issue.

like image 95
J. Mac Avatar answered Sep 20 '22 11:09

J. Mac