How do you export your finished application from Xcode? - xcode

I feel silly for having to ask this. I've got an application to a point where I want to send someone a beta to test on their machine, but I don't know how to get Xcode to produce a .app file for me to send to them. Help?

This has changed in Xcode 4.
Now Apps can be exported from the "Organizer"
If you haven't already, you need to create an Archive.
On the menu go to Product -> Archive
Once you're in the Organizer - Archives screen click Share or Distribute... (Xcode 4.3.3 or newer)
Then choose the format you want to export.

the app is generally under your
project_dir/build/Debug/Name Of App
project_dir/build/Release/Name Of App
project_dir/build/Distribution/Name Of App
depending on which configuration of build you did or want to send.

On Xcode 13 you need to choose Product -> Destination -> Any iOS device (arm64).
Then afterwards you can run Product -> Archive.

to get to the .app application you have to go into the folder where you created it into build the your app will be there

Related

Deploy a Swift OS X app locally?

I am not new to programming, but I am new to Swift. I have developed a small app that I have no intention of distributing, I just want to use it for myself. Everything works just as desired in XCode and now I want to deploy that app locally. How can I run my app on my machine without needing to have XCode also running? I just want to see my app in my Applications folder and run it when I want. Does XCode put build files somewhere that I can access them and use outside of XCode?
On the Product menu there is an Archive option. Select that to create an archive of your app.
Xcode should then automatically open the Organiser window with the archive of your app selected.
You'll see a big blue button called Upload to App Store on the right with two smaller buttons below it. The one you want is called Export... Press it and you'll get a pane giving you various export options with different kinds of signing.
The bottom option creates an unsigned .app file which you can put in your Applications directory.
NB As Eric D says, you can just drag the app out of the products directory, but unless you edit the scheme, that will give you a debug build with less optimisation and with asserts activated.
Update for Xcode 11.2
As Bell B. Cooper points out, the process has changed slightly. Now when you archive an app, you get a window listing the apps and a big blue "Distribute" button. Pressing this, gets you a dialog box giving you the various options. Which one you choose depends on what you want to do with the executable. With Catalina, unless it's just for your own use, you probably want to go for one of the options that involves signing the app.
Edit: while this answer still works, it targets old Xcode versions and uses the debug version of your executable. For recent Xcode versions, and for using the release version of your executable, see JeremyP's answer.
Each time you build an OS X application with the current scheme, Xcode automatically populates the "Products" folder with the related app bundle.
You can find this folder in the Project Navigator:
Xcode > Project Navigator > "Products" folder
Your .app is in there and ready to be used and/or copied to the /Applications folder.

tvOS Invalid Toolchain when Submitting tvOS 9.1 app

I'm trying to submit a tvOS app through iTunes Connect, and every time I try I get the following message:
Invalid Toolchain. New apps and app updates must be built with the public (GM) versions of Xcode 6 or later, and tvOS 8 SDK or later. Don't submit apps built with beta software.
I have made sure to update Xcode to it's newest App Store version, and I'm not using any beta software.
While I never ended up resolving this issue completely, I did find a workaround.
When submitting an app, iTunes Connect checks the compiled app's compatibility to the latest operating system (in this case, for tvOS 9.1 build 13U85). While compatibility is completely fine between the two, Xcode has a bug. During the archiving process, Xcode specified my archive as Build 13U78 which is inaccurate and not correct.
A workaround I found, which is quite simple, changes the archive's build from (in my case) build 13U78 to build 13U85.
First, we'll create an archive which is self explanatory.
Second (and this is essential) we need to do the following:
Open 'Show in Finder'
Next, you need to right-click your archive and choose 'Show Package Content'
Then go to Products, then Applications, then repeat the second step (right click the .app file, then choose 'Show Package Content').
Once you're there, open the Info.plist file.
You'll see some version information in it, but what we want are:
DTSDKBuild
...
DTPlatformBuild
These two options should be something like:
DTPlatformBuild 13U78
...
DTSDKBuild 13U78
Modify 13U78 to be the most recent build of tvOS, or in my case:
DTPlatformBuild 13U85
...
DTSDKBuild 13U85
You're almost done! Just save the modified Info.plist file and close it out. Then Submit to App Store- you're done!
Make absolutely sure you're using the most recent build of tvOS.

Xcode 6 OS X Submission Error: iOS Apps must have a provisioning profile

I'm having the worst time ever submitting an update to my Mac app. Everything was fine until I updated to Xcode 6. I'm in Mavericks, 10.9.4. I get the following error:
iTunes Store operation failed.
Unable to process application at this time due to the following error: iOS Apps must have a provisioning profile.
I have no idea why it says "iOS." Don't know if that's an Xcode bug or it thinks I'm making an iOS app. I used the same Xcode project file to submit the Mac app in the previous Xcode.
I have tried the following with no results:
• Revoked and deleted all certificates and provisioning profiles and started over.
• I created all certificates, provisioning profiles manually rather than Xcode managing them.
• Set the provisioning profile in "release" in the target and in a different occasion, in the project file.
• Gone into the project info and created a separate configuration.
The only "weird" thing I would say that I could be doing insanely obviously wrong is when I look at the options for code singing identity for release, it says "Mac Developer:yata" but there is no option for "Mac Distribution:(myname)" Should there be? I didn't need that in the past. Also, the only options that I can select are in a section called "identities in keychain." Should there be another section? "Identities in Xcode?"
Thank you for anyone that can help. I'll try pretty much anything at this point.
Solution for my case:
I got error in validation stage.
On organizer we see:
1) Go to Apple download page and download xCode 5.1.1
2) Double click on xcode_5.1.1.dmg
3) Copy xCode.app to Desktop
4) Rename xCode.app -> xCode511.app
5) Move xCode511.app -> Applications
6) Close xCode 6.1
7) Work with validation and upload in xCode511.app
UPDATED
8) Be careful ! ITC.apps.validation.prerelease_build_missing
I don't have Xcode right now, but here are the steps:
Delete your certificate and provisioning, both your mac and iTunes account
Regenerate the certificates and provisioning profile (distribution)
Download double click
Go to the account tab, then view account
All certificates and profiles will be listed refresh the stuff there
Clean and rebuild your app with the right provision and 3 party Mac developer
archive, validate and submit (select the right provison and match the app)
voila!
EDIT
Everything you will ever need to know :
https://developer.apple.com/library/mac/documentation/IDEs/Conceptual/AppDistributionGuide/Introduction/Introduction.html
I was having the same problem... finally I click on Submit and it worked! It seems that the problem is on Validate only.
Okay so our problem was that our company name had an apostrophe in it ---- could have the same issue if you have quotes in your company name as well. I contacted Apple for them to change it and then uploading worked from Xcode 5.1.1.

Where to find Application Loader app in Mac?

I have downloaded applicationloader_1.3.dmg and installed in the destination Macintosh HD.
The messages show The installation was successfully done. But, there is the ApplicationLoader app that doesn't appear anywhere.
How to install and get the Applicationloader app in Application->Utility folder?
I'm using Mac OSX version 10.6.8.
In more modern versions of Xcode, you'll find "Application Loader" under the "Xcode" menu (the first menu to the right of the Apple in the menu bar) and it'll be hiding in the "Open Developer Tools" submenu.
As of Xcode 11, "Application Loader is no longer included with Xcode", per the Xcode 11 Release Notes:
Xcode supports uploading apps from the Organizer window or from the command line with xcodebuild or xcrun altool. Application Loader is no longer included with Xcode. (29008875)
The Xcode Help page, Upload an app to App Store Connect, explains how to upload from the Xcode Archives Organizer.
Transporter
In October 2019, Apple announced the Transporter app for macOS, now available in the Mac App Store.
With Transporter you can:
Upload your .ipa or .pkg files to App Store Connect.
View delivery progress, including validation warnings, errors, and delivery logs, so you can quickly fix any issues.
See a history of past deliveries, including date and time.
This was previously a download from iTunes Connect for qualified partners (FAQ)
Notes on Using the Command Line
I've uploaded non-Xcode builds with xcrun altool --upload-app -f path-to-build.ipa -u your-account#apple.com. It won't show any progress, but you can see the network traffic in Activity Monitor. It finishes with No errors uploading 'path-to-build.ipa'.
See xcrun altool --help for usage. If your account has 2FA enabled, first visit https://appleid.apple.com/ and generate an app password.
You can download Application Loader from Itunes Connect.
Go to https://itunesconnect.apple.com/ , sign in, and click on Manage Your Apps.
There is a Download Application Loader link at the bottom.
At the time of writing, this link is: https://itunesconnect.apple.com/apploader/ApplicationLoader_3.1.dmg
I didn't find application loader anywhere, even in spotlight. You can open it through xcode.
Go to Xcode > Open Developer Tools > Application Loader
With Xcode 11, Application Loader has been removed. The Mac App store now has an app called Transporter.
https://apps.apple.com/us/app/transporter/id1450874784?mt=12
For anyone finding this now (23/09/2019) Application Loader has been removed from Xcode.
If you have built the application in Xcode you should be able to follow these instructions to upload your and distribute your project Upload an app
I am not sure what to do if you have been given a .ipa file, for example when building an Expo project, I'll update this post when i have an answer.
In the mean time more info can be found here.
Developer Apple - Whats new
application loader page:
https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/ra/ng/resources_page
application loader 3.1:
https://itunesconnect.apple.com//apploader/ApplicationLoader_3.1.dmg
I have found in following way :
Go to https://itunesconnect.apple.com/ , sign in
Click "Resources and Help"
you can find it by going to xcode > open developer tool > application Loader
You can also upload an app using the Application Loader tool by using it from the terminal:
MacBook-Pro:~ denis$ altool --upload-app -f "ios-app.ipa" -u "applestore#email.com" -p "yourpassword"
To use altool from anywhere in the terminal you could add it to your
PATH env variable by typing in terminal:
MacBook-Pro:~ denis$ export PATH=$PATH:/Applications/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Support/
MacBook-Pro:~ denis$ source ~/.bash_profile
Now you can upload your app binary with the Transporter app.
You can download Transporter from Mac AppStore Here
Here apple mentioned its used for uploading.
Application Loader now moved to tools
https://itunespartner.apple.com/en/apps/tools
It's in Applications > Xcode > Show package contents > Contents > Applications - but easier to open from Xcode!
This error had me really scared because I make my app using Adobe AIR, so once my AIR builder (FDT) tells me it has packaged it, I really have very little I can do if it fails.
I got this error when I uploaded my ipa through the Application Loader (v3.0 [620]) that I had downloaded from the link they provide when submitting the binary. I tried uploading the ipa through Xcode > Application Loader (v3.6 [1020]) and it worked fine.
I am going to write to Apple about this once my blood pressure returns to normal.
With Application Loader now gone from Xcode I had a look around to see how to upload an .ipa file, since I use UE4 and I don't touch Xcode at all during development. Turns out it's pretty hidden away, You need to go to Window, Organiser, Archives. The archive will only appear if you ticked the "Generate Xcode Archive Package" tickbox in Project Settings. Then you just click Distribute and it's just does it.
Application Loader has been removed from XCode 11, the alternative app is Transporter. you can download it from the appstore with the following link:
https://apps.apple.com/ca/app/transporter/id1450874784?mt=12
Now you can use Transporter app instead of Application Loader.
Download Transporter App from this link: https://apps.apple.com/us/app/transporter/id1450874784?mt=12
If anybody is still looking for the Application loader, it has been removed and replaced with Apple Transporter. Download from the mac AppStore.

Sharing iPhone Apps for the Simulator

iPhone Apps built for the simulator are stored here:
/Users/<username>/Library/Application Support/iPhone Simulator/User/Applications
Is it possible to copy the <GUID>.sb and <GUID> directory and install them on a different computer (with Development tools installed)?
This would be very useful for testing/demoing with out having to buy iPhones for all the managers and external clients.
I found a way that requires just a little more setup, but is much easier for non-developers:
Instructions for your users/testers:
Install Xcode following Apple's instructions
Double-click the attached application - the iPhone simulator will launch, install the app and start it automatically.
How to set it up:
Download and unzip (to a folder on your desktop or wherever) 'Simulator Bundler' from: http://github.com/landonf/simlaunch/downloads
Set your XCode build target to the required Simulator configuration (iPad/iPhone/which iOS version)
Do a 'Build and archive'
Find it: select 'Archived applications' in the Organizer, right click the relevant build, select "Reveal archived application in Finder"
Drag the application (yourAppName, no extension) onto the Simulator Bundler app
Done. This will create a self-contained Mac OS X yourAppDisplayName.app file in the same folder (with your app's icon as the icon) that you can stick up on an FTP server or email to your users/testers.
--
I think it's much neater/slicker than having to explain where to copy files, how to launch the simulator and so on.. And if anything gets messed up they can just uninstall via the familiar tap-and-hold + (x) gesture in the simulator UI, then double-click the app you sent them again.
You can also produce several of these packages changing the bundle identifier between builds, allowing them to be installed side by side in your testers' simulators; say for getting some user feedback on different UI designs, or configure one for Production and one for Staging/QA servers, so your content editors can check their changes before they go live or whatever..
The ability to reinstall the app from a desktop icon is also very convenient for localisation testing: launch the simulator, uninstall the app if present, set the required region format and language, double click the icon on your desktop, test; repeat for each required locale. (guarantees a fresh install each time, I've found that switching language with the app installed can result in all sorts of strange behaviour)
Yes, if you send those files to another person, and they put them into that directory, they can test the applications in the iPhone Simulator as well :)

Resources