XCode4 does not produces archives. At all - xcode4

I am attempting to create my first ever app to be tested/deployed via:
XCode 4.0.1
TestFlight
I cannot get archive to actually produce an archive in XCode.
It always says it has succeeded in building the archive (see image), but I cannot find it in the Organiser and it doesn't appear in Finder either.
I am doing it for Ad Hoc distribution as per TestFlight instructions for Xcode4
I have done the following.
Created development certificate for the app
Created app ID for the app
Assigned a device The green lights appear for Enabled for
development and Enabled for Production, and Game Center / In App
Purchase are active/green.
Created a development provisioning profile
Downloaded all provisioning profiles.
I can launch the app successfully in my device.
Now we get onto distribution.
In certificates, created a 'Current Distribution Certificate' for
the app
In provision, created a 'Distribution profile' where 'Ad hoc' is
selected, the app id is selected and the device is selected
Now we get onto following the TestFlight instructions for XCode4
I can do everything except the last part,
Archiving and Packaging
1. Select the iOS Device option in the Schemes drop-down
Under the Product menu, select Archive
In the Organizer window that appears (go to Window -> Organizer if
it does not), select Archives at the top, your application on the
left, and the most recent archive at the bottom, and click Share
It simply does not list/show or apparently create the archive.
I ensured that the archive and all adhoc setup is as the instructions say.
I clean the product, save it as a workspace (this is not in the TestFlight docs, but in Apple's docs), and verify again that it will deploy in the device.
But when I try to archive it, no archive ever appears.
I have no idea how to solve this, its really annoying.
One video I've seen shows a guy click "Enable entitlements", but I cannot find this option -- is this only in the latest Xcode?
There must be an easier way to do all this!
Any help on this would be very useful.
Edits:
I have a video of the process I have taken, if people are interested.
I have no idea what I am doing wrong.
I can find no video that documents this specific process.
A full breakdown of the exact steps I do and use;
Steps #date: 05-10-2011
Sidebar: Certificates > [Distribution tab]
Clicked Request certificate button
Generate CSR with keychain Online certificate status protocol =
off Certificate revocation list = off
a. Request CSR from Certifcate Authority b. Enter credentials
EXACTLY as they are when I signed up to Apple c. Keysize = 2048,
Algorithm = RSA
Upload this CSR via "Choose file" button & submit
Download 'distribution_identity.cer'
Double click, it say "Do you want to add the certificate from the
file 'distribution_identify.cer' to a keychain?" with "login"
selected. I press OK.
Sidebar: Provisioning > [Distribution provisioning tab]
Click new profile
Select 'Ad hoc'
Enter profile name of "{name of app profile}"
Select App ID of "helloWorld_3oct"
Select iPod to distribute to. Note: it says "the final application
will run only on these selected devices." Note: Not sure if I'm meant
to say "Yes" but I do anyway.
Distribution provisioning profile is now created.
Download the "{nameofapp}.mobileprovision"
Double click on it.
It now appears in the organizer
Close organizer.
Open project.
Add icon and icon#2x.png to project. They appear in .plist file
for the project They also appear under Targets > Summary
Under project > info
a. Create duplicate release configuration b. Name it "Ad Hoc"
Under project > build settings
a. Make sure everything is set under "iPhone distribution (Amarjit
Deo)" no codes appear in this title. ie: In the development one there
is a code in brackets next to the name.
Under targets > build settings
a. Change code signing identity to "iPhone distribution (Amarjit Deo)"
no codes appear in this title.
Go to Edit Schemes.
In Archive select Build configuration to be "Ad Hoc"
Press "OK"
Make sure "iOS device" is selected (it is not plugged in)
Run Product > Clean
Run Product > Archive.
No errors. Success is reported.
Go to organizer.
No product archives exist at all in the organizer.
Try doing skip install trick Tried Yes/No/Yes combination for
both product & target, then Product > Archive = No archive Tried all
permutations, still no joy.

I've resolved the issue now!
Okay, it turns out either XCode was corrupted in download or was conflicting with earlier builds (Even if you uninstall it for some odd reason).
Here's what I did.
1) Re-downloaded XCode (via a better/faster connected line, ie: University)
2) Used
sudo /Developer/Library/uninstall-devtools --mode=all
To uninstall Xcode.
3) Removed all references to XCode that I could find.
For some reason Xcode installed in Developer and Developer (null) so both these folders I deleted.
4) Checked existence of ~/Library/Developer/Xcode/Archives and deleted this folder
5) Cleared out all keychain certificates and re-downloaded all required certificates, including the ones at this address
http://www.apple.com/certificateauthority/
6) Went through the entire process with a fine tooth comb, ensured and double checked everything.
7) Got an archive for a simple app!
Picture included.
Thank goodness for that. I'm backing up my computer and all these files and I'm going onto the next stage, TestFlight!

Related

getting binary errror with Watchkit app on submission from Application Loader on Testflight

I am using Xcode 8 and trying to upload my watchKit app to Testflight but its failing all the time.so far i have tried these options,
tried uploading it from Application Loader 3.6 and get invalid swift support, invalid watchkit support,and invalid executable error.
tried from Xcode 8. The app validates succesfully but upon upload to store, it just gets stuck. when i refresh, i do get an upload sccessful message but nothing is visible on testflight.
how to upload my watch app on testflight? please help
Have you enabled the version of your app to test on the iTunes Connect website?
I hope I'm not stating the obvious here, but if you:
Select your app in the "My Apps" section
Select the "TestFlight" tab at the top
Select "Internal Testing" on the left hand menu
Click on the "Select version to test" link in the page
Uploading an archive with a new version number doesn't automatically add it to TestFlight, so you have to go through this procedure every time you change version number (or on the first upload).
Once it's added, you should see the app appear in the TestFlight app on your phone. When it also has a Apple Watch app, and you have a watch paired with your phone, TestFlight will also install the app to your watch.
Hope that helps!

/usr/bin/codesign failed with exit code 1 in Xcode 6.4 (yosemite 10.10.5) when trying to run on iPad

Everything started when I tried to create and validate my archive for the new app version.
My developer certificate expired, I revoked it (I didn't revoke distribution certificate it is still valid) and now it is up to date. I deleted my old associated provisioning profiled from Xcode and Xcode is configured to generate them automatically. After The provisioning profiles were not in my account. I was able to compile fine without errors using simulator, but I can not run app on my iPad. I deleted old app version (I could not find in iPad Settings->General any Profiles to delete since my version is iOS8.4 and it deletes it automatically) I don't know if I need to delete anything else on iPad?
Now when I try to run from Xcode app on iPad, I get this error:
Command /usr/bin/codesign failed with exit code 1
(see details below)
NOTE1: I don't get this error when I run it in the simulator, only when I chose to run on registered iPad
NOTE2: I was able to run app on this same iPad before I revoked the certificate.
NOTE3: I was able to create archive and submit the app before, problems started when certificates expired.
All troubles started after revoking the certificate.
I am running Xcode version 6.4
Mac has OS X Yosemite Version 10.10.5
Here is what I did so far:
After revoking certificates,I tried to delete provisioning profiles and restart Xcode, Mac and iPad and that didn't help.
I deleted old certificates from keychain, right now I have just the new up to date certificate in my keychain.
When I tried to run Xcode it asked me to fix non-existing provisioning profiles and it worked for simulator, but not for iPad.
I also looked in Xcode general settings for the build and tried various things, but that didn't help...
This didn't help too:
Xcode -> Preferences -> Accounts -> Choose your account, and then View Details -> Refresh (button on bottom left), Refresh again, restart Xcode
I tried to read developer guides for distribution, but troubleshooting suggestions how to run on development device didn't help, also I didn't find much about this codsign error.
I also downloaded new certificate WWDR from Apple, that didn't help.
I tried most of the things what people suggested related to this error posted, but didn't help...
One additional info:
My problem is also that I am trying to submit second version of the existing app, so I don't know what I can delete in order to be able to submit the updated version of my app again. If it was new project I would create new project from scratch and start from zero, but this happened just when I was ready to submit new archive...
Do you have any suggestion how to fix this issue, which steps to follow?
I would appreciate your pointers where to read or what to do.
If you need additional info from me, please let me know.
Thanking you in advance, -Tatjana
CodeSign /Users/t/Library/Developer/Xcode/DerivedData/K-eskcdowdkybtiygveputefcuziqr/Build/Products/Debug-iphoneos/K.app
cd /Users/t/Desktop/myProjects/K
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
Signing Identity: "iPhone Developer: T... (G....)"
Provisioning Profile: "iOS Team Provisioning Profile: com.k.K"
(5....)
/usr/bin/codesign --force --sign D.... --entitlements /Users/t/Library/Developer/Xcode/DerivedData/K-e.../Build/Intermediates/K.build/Debug-iphoneos/K.build/K.app.xcent /Users/t/Library/Developer/Xcode/DerivedData/K-e..../Build/Products/Debug-iphoneos/K.app
CSSM_SignData returned: 8001094A
/Users/t/Library/Developer/Xcode/DerivedData/K-e..../Build/Products/Debug-iphoneos/K.app: errSecInternalComponent
Command /usr/bin/codesign failed with exit code 1

Packaging Operation Failed in Xcode 4

When I use Xcode 4 to create an app IPA fie, I go to Product --> Archive to get an Xcode Archive. I recently read the SO post here detailing on how to distribute an app in the AppStore. I followed the instructions in this post and my errors still persist.
First, I begin with validation. When I click Validate I login, elect the correct code signing ID and then get the following error:
I get the same error message when I attempt to distribute to the AppStore.
Any ideas as to why I cannot share and/or distribute my app?
EDIT
Previously, I was having trouble validating and distributing and as a result I would receive this error:
I fixed this problem by finishing my CCATs / Encryption Registration in iTunes Connect.
I got the same error and found this solution (Xcode 4.4).
In Build Settings/Code Signing I had "Don't Code Sign" in my first Archive attempt.
I then put a valid Distribution Certificate (in the Release identity) and, after Archiving, validation of package went flawless.
Thanks to Apple that at every release does something (undocumented) different from the previous version.
Cheers.
Couple months late, but in case someone else encounters this problem and finds this question (as I did) and none of the other suggestions work for you. After reading the other answers, there seem to be multiple causes for this error.
In my case, it was because my project's scheme had its Archive build configuration set to Release, instead of Distribution. After changing this to Distribution, I was able to submit the app without issues.
Hope this helps someone else.
I had similar situation and standard solutions like removing files with prefix _. and certificate experimenting did not lead into success.
Build distribution of English version worked, but localised to Croatian did not. So I used heavy weapon. I installed Croatian keyboard layout. And guess what? Since that moment all worked out!
So maybe there was something else in the place, but I would suggest you at least to check if this matches your situation.
Possible error with your certificate/provisioning profiles. Here is a short summary of my certificate quest with Xcode 4.3:
Make certain (in developer.apple.com) that you have created a distribution certificate
Make certain your application id in Xcode matches perfectly the one in developer.apple.com
Create your app in itunesconnect.apple.com
Load the distribution certificate in your keyChain create a distribution provisioning profile for your app (make certain you add all devices when creating the provisioning profile)
Drag the provisioning profile in Xcode organizer, LIBRARY section, Provisioning Profiles.
Make your archive.
In Xcode organizer, validate your app, then distribute it for ad-hoc.
Eventually (if you are patient) Xcode will offer to save the IPA somewhere. Save it, place the IPA in a place where your testers can download it.
After download, the tester can drag the IPA in iTunes (LIBRARY), and eventually sync up the device (if and only if their device UDID was checked when you created/modified the provisioning profile).
more or less. Best of luck.
ps. there is a free app in AppStore , Get UDID. Ask your testers to use that and email you the devices specifics, will save you tons of frustrations with the 40'ish characters long device ID.
It happnes to me when I've try distribute app from Xcode DEVELOPER PREVIEW.
From actual version of XCode - everything works fine.
I was also seeing this inexplicable error, and tried all of the suggestions here with no success. I finally went and deleted my local certificates and provisioning profiles and downloaded them again from Apple's provisioning website. After making sure the code signing options were set correctly in my build settings, I cleaned the project and archived again and this time the error disappeared when I ran the validation step.
Check if the code signing entries are correct (containing the distribution profile) for both the project and the target. It is possible to archive the project even if only the project settings are correct.
To me the answer came after trying to validate my app after unsuccessfully submitting it to the MacAppStore. I thought that by validating it, I should get a more detailed error message, instead ot this "Packaging operation error". And here it comes:
And that was because I had to revoke my certificates (as for why I had to revoke them, don't ask, I don't know, it happens in one every 2 submissions...). And I had recreated only the Mac Submission certificate. Actually, you also need the Installer one. It waqs late, I thought do I really need this?... Hence I finally made twice the little dance in Keychain.app -> Request Certificate from a Certificate Authority... etc, uploading to itunesconnect, and downloading them back. After that, it worked.

Distribution Provisioning Profile not showing up in code signing identity selection in Xcode 4

I have followed all steps carefully mentioned in the iOS provisioning portal. The biggest problem is that those steps are not updated to the latest version of XCode.
In Xcode's organizer, the distribution profile is showing up in Library>Provisioning profiles. But when I go to iPod Touch > Provisioning profiles, it's not there. (I don't know if this information is relevant, just mentioned to make sure I don't miss anything).
To distribute the app with this new provisioning profile, I have to change the Code Sign Identity in the app configuration to this distribution provisioning profile but I can't see it anywhere in the menu. It's just not there, where is it? How can I can build my app with this distribution provisioning profile?
I did everything from beginning for at least 2 times. Still no success.
Is there any step by step tutorial to do this in XCode 4? Please help! I am going insane.
In the Navigator view, select your project name, then go to Build Settings for your target. In the drop-down under Code Signing Identity, select the developer identity you want to build with...if you have multiple provisioning profiles, select the developer identity under the appropriate provision you want to use. You can see all your provisioning profiles in this drop-down.
If you cannot select a developer identity under the provision you want to use, you might check your Bundle identifier in your Info.plist.
Make sure your iPod Touch's UDID is added to your provisioning profile as well.
I solved this problem by switching targets. After clicking on the blue project icon in the project navigator, there are 2 rows with thin icons in the main viewing area. Make sure your whole project (the BLUE icon) is selected in the second row, not just the main target (the drafting tools icon).
So this:
Not this:

Xcode 4 Ad-Hoc Distribution - Unable to Download

I had recently upgrade our development machine to Xcode4 and after the initial interface change has gone quite smoothly.
I'm now in the process of using Ad-Hoc distribution on it for the first time so I followed this guide to set up profiles/schemes etc. http://diaryofacodemonkey.ruprect.com/2011/03/18/ad-hoc-app-distribution-with-xcode-4/
This is the process I took:
1/ Setup a new provisioning profile under distribution. I selected Ad-Hoc, the correct App and my UUIDs.
2/ Installed the profile within Xcode 4.
3/ In xcode duplicated the Release Configuration and named it Ad-Hoc.
4/ Under Code-Signing made sure Ad-Hoc had the new profile selected.
5/ Edit Archive scheme and selected 'Ad-Hoc' Build Configuration.
6/ Select Product > Archive and made sure the profile listed was correct.
7/ On save screen selected 'enterprise distribution' and entered the App URL and Title.
8/ Copied the resulting ipa archive, plist and mobileprovision (downloaded in point 1) to our http server.
9/ Added the required html to and pointed mobile Safari to it.
10/ Selected the mobileprovision which installed without a problem.
11/ Selected the App which begins to install resulting in "Unable to Download" at about 90%.
I've tried several potential solutions from other posts but they all result in the same thing. This is used to work fine in Xcode 3 (using normal developer account, NOT enterprise) and as far I can tell I'm not really doing anything different so what am I doing wrong?
Thanks.
Try this: Open the Scheme you are using to edit it. Then check if in ALL the build phases (Build, Run, Test, Profile, ...) the Build Configuration is set correctly. If not set it to the correct configuration and build it again.
If this does not work ad a new Entitlements.plist to your project and add a new value with the key get-task-allow to NO.
Edit: Have you tried to make Product > Build For > Build For Archiving and then Product > Archive.
This worked for me.
we just had the same problem (and we still have it for one device only working on iOS5 Beta, not sure if it is related. All other devices work.), some tips that could help :
Apple dev site:
your provisioning profile could need to be renewed on the apple web site.
on the apple web site check that the device is linked to the provisional profile in the "Device" section. In the "provisional profile" section, the "Edit" feature could lie to you. To add a missing device to a provisional profile, go the "provisional profile" section then uncheck and check back the missing device (the lying part from apple web site ;))
in xcode:
I switched deployment target OS from 4.0 to 4.2
I plugged my iPhone and selected it as target before to create the archive.
this issue doesn't depend on the "team provisioning file", we could build a working archive with another provisioning file too.
If it can help too, I created a doc for distributing the Moodle app but it's generic to any app I guess: http://docs.moodle.org/dev/how_to_distribute_iPhone_test_app

Resources