Sign application using .p12 and .mobileprovision from 3rd party - ios

I need to sign app for Enterprise deployment. Customer's security department refused to add my apple ID to their team, thought they send me mobileprovision and p12 files. As far as I remember, in XCode 5 there was possibility to sign IPA without Apple ID using mobileprovision only, like that:
Xcode5 - Enterprise deploy screenshot
When I try to do it in XCode 7 or 8, I got error like XCode 8 - Enterprise export error because my Apple ID is not registered in customer's enterprise team.
I've already added .p12 to keychain, unchecked "Automatically manage signing", selected customer's provisioning profile.
I try to use xcodebuild like xcodebuild -exportArchive -exportFormat ipa -archivePath <FILE_NAME>.xcarchive -exportPath ~/Desktop/<FILE_NAME>.ipa -exportProvisioningProfile <PROVISIONING PROFILE NAME>, but still no success.
Also, I need to generate manifest file, that's why xcodebuild is rough solution even if it will work.
I know that its unusual when customer give cert and keypair, but dont want to add developer to team, but cannot change it.
How can I export build for Enterprise if I have provision and certificate, but my account is not in team?

Related

Failed to locate or generate matching singing assets:When i'm triyng to generate ad hoc ipa

Anyone can help me.Actually i'm 6 month kid for ios app development,this is my first app to submit in appstore.When i'm trying to generate the ad_hoc distribution IPA,it shows error(as like the below screenshot).But for appstore IPA generated successfully,i'm so confused.....what a magic this!
I have tried the follwing things To solve this problem:
1.Deleted all my mac keychain certificates.
2.Delete all xcode caches and and provisioning profiles and also deleted the developer account from xcode.
and restarted my mac...
then,
1.Reinstalled the certifcates in keychain from exported .P12 from another mac
2.login in xcode preferences accounts tab.... and refresh it. it downlods all provisioning profiles from my developer account.
Status: Not working,still the same issue....all of another projects of my mac and appstore ipa too.
Even i have generated new developer certificate and updated all my project provisioning profiles.still have the same issue...,then try with it new bundle id and new provisioning profiles..i can't got it!
Bcoz of this problem i can't generete ipa for allof another app from my mac..for this issue i wasted entirely 2 working days.totally disturbed.....
Once i solve this then only i can sleep well.pls help me ,thanks in advance to you....
I was having same trouble few weeks back. Though I haven't yet figured out the exact issue behind it but I found that exporting an .ipa file via commandline works.
Archive your project using your desired build settings.
Locate the .xarchive file in finder (DON'T follow the usual procedure from this point).
Copy it and paste it to your project directory (Where your .xcodeproj file is). (Though I usually rename it to remove all the spaces from the name as well)
cd to your project directory in terminal
Run following Command:
xcodebuild -exportArchive -archivePath YourArchiveName.xcarchive -exportPath YourIpaName.ipa -exportFormat ipa -exportProvisioningProfile YOUR_PROVISION_PROFILE_NAME
Your .ipa file will be generated in your project directory. Use it as you will.
For example if My archive name was mySillyApp and I wanted to create an ad hoc ipa from it named mySillyApp with provisioning profile named MySillyProfile, I'd run it like this
xcodebuild -exportArchive -archivePath mySillyApp.xcarchive -exportPath mySillyApp.ipa -exportFormat ipa -exportProvisioningProfile MySillyProfile
NOTE: Even though this doesn't fix the issue of xcode but it gets the ipa. Just thought it would help someone looking for a quick way to get the ad hoc build, who doesn't have the time to figure out what's wrong with Xcode.
If you are doing this for distribution environment, and previously if you
have already created the distribution certificate from different mac then
Either export that same certificate from that mac and import it here or
Revoke the same certificate from your mac, that will be then added to your key chain (https://help.como.com/hc/en-us/articles/201708891-Revoke-Your-iOS-Distribution-Certificate-P12-File-)
https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html
After doing this just restart your XCode and give try
Hope this will help you!

How to create IPA without Developer Account credentials in Xcode6

One of my customers won't provide access to his Developer Portal & iTunes Connect credentials. With Xcode 5 we have used this flow to submit apps for review:
Customer sends me Distribution Certificate & App Store Provisioning Profile
I generate an IPA with these credentials and export it for Ad-Hoc distribution
I send the IPA to customer
Customer submits it to iTunes Connect using App Loader
Now as I can see that Xcode 6 doesn't allow me to build IPA even for Ad-Hoc development without a developer login and password. Is there any way to generate an IPA without credentials?
Thanks in advance.
#frozen_lion you can still use xcodebuild to export ipa without Developer Account access:
xcodebuild -exportArchive -archivePath $projectname.xcarchive -exportPath $projectname -exportFormat ipa -exportProvisioningProfile “Provisioning Profile Name”
More details you can find in this article Using xcodebuild To Export a .ipa From an Archive
You should use Xcode6.1.1, it was supported. Choose "Use local signing assets" by accounts dropdown box.

Make Ad-hoc builds in Xcode 6 without signing in to developer account

Before Xcode 6, it was sufficient to provide only a *.p12 certificate and *.mobileprovision file to Xcode in order to export an *.ipa file for Ad Hoc builds.
Xcode 6 opens the Organizer as usual when the archive is ready, but when I press the "Export" button, the Organizer asks to select a Development Team. It does not allow me to proceed without one even though I have *.p12 and *.mobileprovision installed.
To save for Ad Hoc Development, select a Development Team to use for provisioning:
I know that a developer account could be exported from Xcode accounts pane, but there is a problem with that. It exports all certificates and mobileprovision files associated with it. This includes other profiles that I don't want to include (because I want to share the resulting export with a project team and don't want to include non-relevant profiles).
Is there any way to avoid this "helpful" feature and just export the relevant *.p12 and *.mobileprovision?
If you are using Testflight to upload adhoc builds, it's easier. Install the Testflight app for Mac and run it. Whenever you do an archive in Xcode, it auto shows a popup whether to upload it. You need not export the build from Xcode and avoid signing in to developer account.
Alternatively, if you don't want to distribute on Testflight, you can right click (or option click) on the build in Xcode > Organizer and select "Show in Finder" and right click the archived file for "Show package contents" and get the .app. Put the .app inside a directory called Payload and zip up the the file to Payload.zip. Rename Payload.zip to myapp.ipa to distribute manually.
Edit: A long time has passed since this answer. As for now I suggest using Fastlane for building the app from command line - with proper configuration it won't require signing with dev account.
Original answer below:
I don't know how to do it in xcode, however - I've managed to do it using command line tools:
xcodebuild -configuration Release -scheme SCHEME_NAME -workspace Workspace.xcworkspace clean archive -archivePath build/App
xcodebuild -configuration Release -exportArchive -exportFormat ipa -archivePath "build/App.xcarchive" -exportPath "build/App.ipa" -exportProvisioningProfile "PROVISIONING_PROFILE_NAME"
Just select "Use local signing assets" in the accounts drop down.
We were having the same problem. I tried building the project and making the archive using Xcode 6 and after that I go to the Organizer window of XCode 5 and export the adhoc build from there. It works fine.
This solution worked for me.
https://stackoverflow.com/a/26497744/1500634
Xcode Version 6.1
TestFlight Version 1.0 (320)
Download a previous version of Xcode, I just got the version 4.6.3 and it worked fine so far.
https://developer.apple.com/downloads/index.action
In my case, i use Unity 5.0.1p1 with Vuforia 4.2.3.
So, it have a QCARWrapper.bundle on "Build Phases > Copy Bundle Resources"
I delete it, and export. Works!!!
I do this only for EXPORT FOR AD HOC.
Hope this help someone.
In fact, you need to create a new Distribution profile, specific for Ad Hoc Deployment.
This can be found in the classic member center, but it is a new type of certificate.
You can then select which devices can be used to test the app as ou would do with a developer profile.
Alternatively you can use the TestFlight solution provided by Apple with iOS 8 to enable your user to have access to prereleases.

Re-signing xcarchive file, but IPA does not install

A third-party-company has sent us an xcarchive file so that we can export their application as an IPA for our client. They've done this because we control our client's provisioning profiles and certificates. They don't have our certificates and keys and so cannot build a distribution version of the app.
I opened the xcarchive in Organizer and attempted to export an ad-hoc IPA using the client's Enterprise distribution provisioning profile. However, when I attempt to install the app on my iPad, the installation fails.
I've verified that I'm using the correct provisioning profile, and I checked to make sure that I have the correct certificate for the profile as well as the private key. I've never signed an app with this provisioning profile before, but I've used the certificate and key for other profiles.
From what I understand, re-signing an archive should be possible. I'm not sure why this isn't working, though. Does the third-party company need to do anything specific when they export the xcarchive file - do they need to build with a specific certificate or provisioning profile?
Any insight on this would be helpful. Thanks!
I was able to re-sign an ipa following the instructions found at this link: http://sholtz9421.wordpress.com/2012/06/08/digitally-resigning-ipa/. However, I used Xcode to edit the plist, not emacs.

sigining iphone app with customer certificate and provisioning profile

I went through all related questions here on the site as well blogs but they leave it open that I can re-use the certificates and profiles of customers. There is no problem of course when the distribution and certificate has been generated with the CSR of my server.
I need to build iphone apps on a dedicated server, using the uploaded p12 certificates and mobile provision profiles of customers.
I am facing 2 scenarios :
Distribution for AppStore submissions
Ad-hoc
Regarding 1.) I could import and sign the app as follows :
security import CertificatesVOSX.p12 -k ~/Library/Keychains/login.keychain -P "asdasd" -T /usr/bin/codesign
xcrun -verbose -sdk iphoneos PackageApplication "build/Release-iphoneos/JIOSApp.app" -o /tmp/app.ipa -sign "iPhone Distribution: PUBLISHING LIMITED" -embed JIOSBase.mobileprovision
This went fine but of course iTunes fails to install it. Does this application works for Appstore submissions ?
Then regarding 2.)
As said, usually the customer has their own certs, bound to the original CSR. xcodebuild or xcrun doesn't work here, because of a private key mismatch.
Did anybody could build apps with customer's certs and mobile provision profiles yet ? Seems rather impossible to me.
Thanks,
Guenter
Reference Links :
http://www.iphonedevsdk.com/forum/iphone-sdk-tools-utilities/73719-hudson-continuous-integration-ios.html
Name of Provisioning Profile used to sign an iPhone app?
And the most related one but still not 100% answered : Command line installation of Code Signing certificates, .p12 files, and mobileprovisions

Resources