Unable to generate a release version of the Cordova iOS application

I am using phonegap CLI 3.1 and XCode5. I am trying to generate release mode builds through Phonegap CLI and Xcrun. I don’t want to use Phonegap Build to upload mobileprovision or any of the processes. I want xcrun to be able to Assign mobileprovison to the release version.

1) cordova build ios –release

Compile the application on the platform “ios” via command
“/Applications/MAMP / htdocs / MyTest / MyTestApp / platforms / ios / cordova / build”-release
The platform “ios” compiled successfully.

2)sudo xcrun -sdk iphoneos PackageApplication -v”ios / build / emulator / MyTestApp.app”-o”/Users/mymac/Desktop/Testnew/MyTestApp.ipa” –sign “iPhone Distribution: NAME(TEAM_ID)” – -embed “MyTestApp_Dis.mobileprovision”

Package application :’Ios / build / emulator / MyTestApp.app’
Parameter: embed = MyTestApp_Dis.mobileprovision verbose = 1 output = / Users / mymac / Desktop / Testnew / MyTestApp.ipa sign = iPhone Distribution: NAME(TEAM_ID)
Environment variable:
HOME = /Users/mymac
SUDO_GID = 20
SDKROOT = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk
VERSIONER_PERL_PREFER_32_BIT=No
MAIL = / var / mail / root
SSH_AUTH_SOCK = / tmp / launch-zsBMC8 / Listeners
LANG = en_US.UTF-8
USER = root
LOGNAME = root
__CF_USER_TEXT_ENCODING = 0x0:0 :0
USERNAME = root
PATH = /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin
SUDO_USER = mymac
SHELL = / bin / bash
TERM = xterm-256color
SUDO_COMMAND = /usr/bin/xcrun -sdk iphoneos PackageApplication -v ios / build / emulator / MyTestApp.app -o /Users/mymac/ Desktop/Testnew/MyTestApp.ipa –sign iPhone Distribution: NAME(TEAM_ID)–embed MyTestApp_Dis.mobileprovision
SUDO_UID = 501
VERSIONER_PERL_VERSION = 5.12

Output directory:’/ Users / mymac /Desktop / Testnew / MyTestApp.ipa’
Temporary directory:’/tmp/W81FhZ9VAH’ (will not be deleted when exiting during detailed settings)
/ bin / cp -Rp ios / build / emulator / MyTestApp.app / tmp /W81FhZ9VAH/Payload
program/bin/cp returns 0: []

Check the original application

> /usr/bin/codesign –verify -vvvv ios / build / emulator /MyTestApp.app
program/usr/bin/codesign returns 1: [ios / build / emulator / MyTestApp.app: code pair There is no signature at all.
In architecture: i386
]
Collaboration setting check failed: ios / build / emulator / MyTestApp.app: The code object is not signed at all.
In architecture: i386

Complete checking the original application

Embedding’MyTestApp_Dis.mobileprovision’

> /bin/rm -rf /tmp/W81FhZ9VAH/Payload/MyTestApp.app/embedded.mobileprovision
program/bin/rm returns 0: []
> /bin/cp -rp MyTestApp_Dis.mobileprovision /tmp/W81FhZ9VAH/Payload/MyTestApp.app/embedded.mobileprovision
program/bin/cp returns 0 :[]
> /usr/bin/codesign -d –entitlements / tmp / W81FhZ9VAH / entitlements_rawixGWnKhi /tmp/W81FhZ9VAH/Payload/MyTestApp.app
Program /usr/bin/codesign returns 1: [/tmp/ W81FhZ9VAH/Payload/MyTestApp.app: The code object has no signature at all.
]
Error: Cannot read rights from’/tmp/W81FhZ9VAH/Payload/MyTestApp.app’

Well, I have a problem like Shashi.

When running’cordova buld ios [–release] from the shell ]’Then do’xcrun ……’ and it worked for me.

But: When running this sequence from a script, I get a “Codeign check failed…” error…

If I insert (as in) a “wait” loop in the script between cordova and xcrun calls, it works.

So – to me – it seems that when cordova is not fully completed , It will return to the shell(? )

The fact is, if I write my script like

#!/bin/bash
cordova build ios --release
sleep 5
sh -c "xcrun ..."

It worked for me. Question: Is this a bug in cordova/phonegap?

I am using phonegap CLI 3.1 and XCode5. I am trying to generate release mode builds through Phonegap CLI and Xcrun. I don’t want to use Phonegap Build to upload mobileprovision or any of the processes. I want xcrun to be able to assign mobileprovison to the release version.

1) cordova build ios –release

Compile the application on the platform “ios” by command
” /Applications/MAMP/htdocs/MyTest/MyTestApp/platforms/ios/cordova/build”-release
Platform “ios” compiled successfully.

2)sudo xcrun -sdk iphoneos PackageApplication -v”ios / build / emulator / MyTestApp.app “-o”/Users/mymac/Desktop/Testnew/MyTestApp.ipa” –sign “iPhone Distribution: NAME(TEAM_ID)” – -embed “MyTestApp_Dis.mobileprovision”

Package the application:’ios / build / emulator / MyTestApp.app’
Parameters: embed = MyTestApp_Dis.mobileprovision verbose = 1 output = / Users / mymac / Desktop / Testnew / MyTestApp.ipa sign = iPhone Distribution: NAME( TEAM_ID)
Environment variable:
HOME = / Users / mymac
SUDO_GID = 20
SDKROOT = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7 .0.sdk
VERSIONER_PERL_PREFER_32_BIT = None
MAIL = /var/mail / root
SSH_AUTH_SOCK = / tmp / launch-zsBMC8 / Listeners
LANG = en_US.UTF-8
USER = root
LOGNAME = root
__CF_USER_TEXT_ENCODING = 0x0:0:0
USERNAME = root
PATH = /usr/bin: / bin: /usr/sbin: / sbin: /usr/local/bin: /usr/local/git / bin
SUDO_USER = mymac
SHELL = /bin/bash
TERM = xterm-256color
SUDO_COMMAND = /usr/bin/xcrun -sdk iphoneos PackageApplication -v ios / build / emulator / MyTestApp.app -o /Users/mymac/Desktop/Testnew/MyTestApp .ipa –sign iPhone Distribution: NAME(TEAM_ID)–embed MyTestApp_Dis.mobileprovision
SUDO_UID = 501
VERSIONER_PERL_VERSION = 5.12

Output directory:’/ Users / mymac /Desktop / Testnew / MyTestApp. ipa’
Temporary directory:’/ tmp / W81FhZ9VAH’ (will not be deleted when exiting during detailed settings)
/ bin / cp -Rp ios / build / emulator / MyTestApp.app / tmp / W81FhZ9VAH / Payload< br>Program/bin/cp returns 0: []

Check the original application

> /usr/bin/codesign –verify -vvvv ios / build / emulator / MyTestApp.app< br>Program /usr/bin/codesign returns 1: [ios / build / emulator / MyTestApp.app: The code object is not signed at all.
In the architecture: i 386
]
Collaboration settings check failed: ios/build/emulator/MyTestApp.app: The code object is not signed at all.
In the architecture: i386

Complete the original application check

p>

Embedding’MyTestApp_Dis.mobileprovision’

> / bin / rm -rf /tmp/W81FhZ9VAH/Payload/MyTestApp.app/embedded.mobileprovision
program/bin/rm returns 0: []
> / bin / cp -rp MyTestApp_Dis.mobileprovision /tmp/W81FhZ9VAH/Payload/MyTestApp.app/embedded.mobileprovision
program/bin/cp returns 0: []
> /usr/bin /codesign -d –entitlements / tmp / W81FhZ9VAH / entitlements_rawixGWnKhi /tmp/W81FhZ9VAH/Payload/MyTestApp.app
program/usr/bin/codesign returns 1: [/tmp/W81FhZ9VAH/Payload/MyTestApp.app: code object root No signature
]
Error: Cannot read rights from’/tmp/W81FhZ9VAH/Payload/MyTestApp.app’

Well, I have Questions like Shashi.

When I run’cordova buld ios [–release]’ from the shell and then do’xcrun…’ it works for me.

But : When running this sequence from a script, I receive a “Codeign check failed…” error…

If I insert (eg) a “wait” loop in the script between cordova and xcrun calls, It’s fine.

So – to me – it seems that when cordova is not fully completed, it returns to the shell(? )

The fact is, if I write my script like

#!/bin/bash
cordova build ios --release
sleep 5
sh -c "xcrun ..."

It worked for me. Question: Is this a bug in cordova/phonegap?

Leave a Comment

Your email address will not be published.