xcode install cocoa project at launchpad - xcode

When I run my Mac OS X Cocoa project, Xcode says build succeeded and the application opens, but never appears as installed. When I go to launchpad I can't find the application. Seems it is only emulated. I need to watch how is shown in the launchpad with the icon and the title. How can I install the application from the xcode?
I have xcode 6.1.
Need help please.
Thanks in advance.

Only Apps inside of /Applications and ~/Applications are displayed in Launchpad. When you launch from Xcode the apps are copied to a temporary build directory. So you have to copy your app to the correct location.
If you only want the Debug version, because you want to test your app, you can simply locate the app bundle in Finder:
Open the Products group in Xcode, right click the .app file and select "Show in Finder". In Finder simply drag & drop the app into the Applications folder.
If you need the Release version you can archive the app. Select Product/Archive in the Xcode menu.
In the Organizer you choose Export, in the Export wizard you select "Export as Mac Application". You can directly save it into the Applications directory, or save it somewhere else and copy or move it into the Applications directory

Related

Mac application update from dmg

Currently I am developing a MacOSX app. it can be launch at startup. So it has launchitem installed.
However, when I need to update app, I drag app to ./Applications from dmg dialog window to replace current app with updated one.
Click the updated one, then reboot my Mac. Mac still show the previous app. It seems like I don't really replace or overwrite the old app.
Does anyone know how to clean the previous launch item and files when users drag new app from dmg to ./Applications ?
Thanks
The root cause is there is one deprecated app archive folder in user/developer/xcode/archive/, which is first triggered by launchitem. So the update app in applications is not called.

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.

Xcode Application sandbox folder doesn't show

I have Mac OS 10.7.3, with Xcode 4.3 , I am not able to see iPhone simulator folder in Application Support folder on MACINTOSH HD drive.
MACINTOSH HD/Library/Application Support/
There is no Library folder in User directory either.
Please help Let me know the solution.
Thanks
The Simulator is stored in ~/Library/Application Support/iPhone Simulator
To see the Library Folder in your user directory you need to choose the Go menu in finder, then hold down the option key on your keyboard and then choose Library, because Apple has hidden it in Lion.
You can also go to the Finder and use the keyboard shortcut ⌘-Shift-G. Paste ~/Library/Application Support/iPhone Simulator into the dialog box and click Go.

Browse the files created on a device by the iOS application I'm developing, on workstation?

I'm developing an IOS app that creates files on the device, e.g. with NSKeyedArchiver.
During Android development it's possible to browse a device filesystem when it's connected to your workstation via USB, for instance to help with troubleshooting your app.
However for IOS I don't see anything similar under the Organizer in Xcode, to help me browse files my app creates from the workstation. Googling "iOO browse device files", "iPhone view files" etc. reveals solutions for jailbroken devices but not for regular devices provisioned for development.
How can I browse files on a device created by an iOS app I'm developing?
In Xcode's Organiser, go to your device's Summary tab. Find your application in the list, and click the disclosure triangle. Under it, you should see an icon saying "Application Data". Click the down pointing arrow to download the data, and it'll prompt you for somewhere to save it.
In Xcode 5, listed under your device in Organizer, click on "Applications" and you can see "Data files in Sandbox" in the bottom half of the window.
In Xcode 6, go to Window -> Devices, select the device, select the app name under Installed Apps, click the settings gearbox, then select Download container.... In finder, double finger tap the package and select Show package contents.
In Xcode 6, open the Devices window:
Then, select the app (in Installed Apps) and then click the gear icon and select Download Container.
Pls note, that you can view contents of downloaded .xcappdata container by right click on it and select "Show Package Contents"
iExplorer works like a charm! Just used it to export some app files! http://www.macroplant.com/iexplorer/download-ie3-mac.php
In Xcode9: / Window / Devices and Simulators
Select the desired installed app, click the gear at the bottom and Download container...
In Finder, "right-click" the downloaded file and Show Package Contents to open it in a new Finder window.
I hope it's useful. Peace.
XCode version : 10.2.1
goto window -> Devices and Simulators
and after that choose your device from the left list, choose the app from the installed app, so you can press show container for show app's contains on the new page on xcode, press download container to download it to your OSX, also you can replace an old container to the moment state with Replace container...

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