Xcode Application sandbox folder doesn't show - xcode

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.

Related

xcode install cocoa project at launchpad

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

Delete app from OSX simulator in Xcode

How do i delete an app from the OSX simulator like on the iOS simulator??
I want to delete an app due to the change of Core Data xcdatamodeld but i can't find a way.
Thanks in advance
For macOS Monterey and Big Sur, the location links to the devices folder location:
~/Library/Developer/CoreSimulator/Devices/{device_uuid}/data/Containers/Data/Application/
On MacOS Mojave 10.14.4 the folder is in the following location:
~/Library/Containers/com.yourcompany.yourapp/
As playitgreen mentioned in one of the comments, the way to delete data relating to your OSX app is by removing the folder/.storedata file from:
~/Library/Application Support/<YOUR OSX APP BUNDLE NAME>/
for example:
~/Library/Application Support/com.yourcompany.yourapp/
All credit to playitgreen
Specifically for Catalyst apps in macOS 10.15 (Catalina) and Xcode 11.2.1.
I tried right-clicking on the app's icon in the dock and then Options -> Show in Finder. I deleted all the files there and ran again from Xcode. The files returned and the app still had the data from before.
In ~/Library/Containers I found a folder called maccatalyst.<my_apps_bundle_identifier>. I deleted the files contained there and when I reran the app from Xcode the files returned and original data was gone. So that seems to be the way.
~/Library/Containers/maccatalyst.<app_bundle_identifier>
There are 2 solution:
When running the app press CMD + SHIFT+ H (simulates a home button press), then you can remove it by long press like on the phone
Remove the appropriate app foler from ~/Library/Application Support/iPhone Simulator/<ios_version_that_you_use>

How to run iPhone emulator WITHOUT starting Xcode?

On my old Mac running Snow Leopard, I could type "ios" into spotlight and it would start up the iPhone/iPad emulator by itself.
I have since had to get a new machine running Lion. I have installed Xcode for Lion, I have installed the developer tool options from the preferences panel.
But the "ios" option is no longer there :( The only way now seems to be to run Xcode, create an empty project and then launch emulator with the run option.
I have searched and searched the intertubes and the facewebs, but nothing helps.
Does anyone know how to run only the emulator on Lion?
UPDATE:
THIS IS RESPONSE TO #ike_love thread below.
THAT answer is not assured to work on all Yosemite machines.
Assuming you have Xcode installed in /Applications, then you can do this from the command line to start the iPhone Simulator:
$ open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app
(Xcode 6+):
$ open /Applications/Xcode.app/Contents/Developer/Applications/iOS Simulator.app
You could create a symbolic-link from your Desktop to make this easier:
$ ln -s /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app ~/Desktop
(Xcode 6+):
$ ln -s /Applications/Xcode.app/Contents/Developer/Applications/iOS Simulator.app ~/Desktop
As pointed out by #JackHahoney, you could also add an alias to your ~/.bash_profile:
$ alias simulator='open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/De‌​veloper/Applications/iPhone\ Simulator.app'
(Xcode 6+):
$ alias simulator='open /Applications/Xcode.app/Contents/Developer/Applications/iOS\ Simulator.app'
(Xcode 7+):
$ alias simulator='open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app'
Which would mean you could start the iPhone Simulator from the command line with one easy-to-remember word:
$ simulator
The easiest way without fiddling with command line:
launch Xcode once.
run ios simulator
drag the ios simulator icon to dock it.
Next time you want to use it, just click on the ios simulator icon in the dock.
In XCode 7+ the location is now
/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app
Run it from the command line
$ open -a Simulator
From Terminal you have to run:
open -a Simulator
No need to do anything on the commandline.
Just use spotlight to run simulator.app
is it helpful to you see the image
Edit
Now with new Xcode if the icon of the Xcode is on dock you can just right click it and form the menu you can select Open Developer Tool and in the sub menu you can select the iOS Simulator to open the simulator without opening the Xcode.!
You can get it to launch via spotlight if you create an Automator launcher for it:
Open Automator.app
Choose type of Application
Select Actions > Library > Utilities > Launch Application
Open the dropdown of applications that can be launched and choose Other
You can't directly select the Simulator app because it's inside the Xcode.app package. So instead you'll have to navigate to it in a separate Finder window and drag it onto the file selector window. It will be at one of the following paths depending on your version of Xcode (oldest to newest):
/Applications/Xcode.app/Contents/Developer/iOS Simulator.app
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iOS Simulator.app
/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app
Finally, save this Automator app in your applications folder as iOS Simulator.app
To get a nice icon for the Automator app you just made, you can do the following:
Right click iOS Simulator.app and choose Get Info
Click the icon in the upper left corner and do Cmd-C to copy it
Right click your Automator app and choose Get Info
Click the icon in the upper left corner and do Cmd-V to paste
As the multitude of answers indicate, there are lots of different ways to address this issue. Not all of them address what is my number one issue, and what seems to be the asker's priority, as well: The ability to launch from Spotlight.
Here's the solution that works well for me, and should work with any OS X and XCode versions. I've tested it on OS X 10.11 and XCode 7.3.
Initial setup does require launching XCode, but after that, you won't need to just to get to the Simulator.
Setup
Launch XCode
From the XCode menu, select Open Developer Tool > Simulator
In the dock, control (or right) click on the Simulator icon
Select Options > Show in Finder
While holding down Command and Option, drag the Simulator icon to the applications directory. This creates an alias to it.
If desired, rename the alias from "Simulator" to "iOS Simulator". Whatever you name it is what it will show up as in Spotlight.
Note: There are other ways to get to the location of the Simulator app (steps 1-4), such as using Go to Folder… in the Finder, but those require knowing the location of the Simulator to begin with. Since that has changed from version to version of XCode, this way should work regardless of these changes.
Use
Launch Spotlight (command-space, etc.)
Type "simulator" or "ios" (if you renamed the alias).
If necessary, use the down arrow to scroll to the Simulator alias. Eventually, spotlight should learn and make the alias the top choice so you can skip this step.
Hit return
Try below instruction for launching iphone simulator:
Goto Application Folder-->Xcode app-->right click to Show Package Contents-->now show files in xcode contents-->Developer-->Platforms-->iPhoneSimulator.platform-->Developer-->Applications--> now show iOS Simulator app click to launch iphone simulator...!
With Xcode 6 the location of the simulator has changed to:
/Applications/Xcode.app/Contents/Developer/Applications/iOS Simulator.app
It can no longer be found here:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app
I hope this helps someone since I sometimes want to start the simulator from terminal.
The solutions above didn't work for me in ZSH. I needed to escape the dot in the iPhoneSimulator.platform. This works for me:
alias simulator="open /Applications/Xcode.app/Contents/Developer/Applications/iOS\ Simulator.app"
This could be even more resilient version:
alias simulator="open -a 'iOS Simulator'"
There's a far easier way:
Hit command + space, Spotlight Search will appear
Type in iOS Simulator and hit return
Done.
----- In follow up to #E. Maggini downvote---
Yes you can still easily access iOS Simulator using Spotlight.
In the terminal:
For Xcode 9.x and above
$ open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app
For Xcode-beta 9.x and above
$ open /Applications/Xcode-beta.app/Contents/Developer/Applications/Simulator.app
I know it is an old question, but this might help someone using Xcode11+ and macOS Catalina.
To see a list of available simulators via terminal, type:
$ xcrun simctl list
This will return a list of devices e.g., iPhone 11 Pro Max (6A7BEA2F-95E4-4A34-98C1-01C9906DCBDE) (Shutdown). The long string of characters is the device UUID.
To start the device via terminal, simply type:
$ xcrun simctl boot 6A7BEA2F-95E4-4A34-98C1-01C9906DCBDE
To shut it down, type:
$ xcrun simctl shutdown 6A7BEA2F-95E4-4A34-98C1-01C9906DCBDE
Alternatively, to launch a simulator:
open -a simulator
Source : How to Launch iOS Simulator and Android Emulator on Mac
The easiest way is to use Spotlight Search. Just click CMD+Space and type in search Simulator. Just like this:
And in few seconds emulated device will be loaded:
To switch to another device you can use menu under Hardware -> Device
There are few different cool instruments you can use under Hardware menu, such as orientation change, gestures, buttons, FaceID, keyboard or audio inputs.
Go into Finder.
On the sidebar, click applications.
Find Xcode in Applications.
Right click Xcode by whatever settings you have (usually two finger click [not tap]).
Click "Show Package Contents."
Go into the Contents folder.
Search simulator.
Wait 30 secs for it to load.
Scroll down and find iOS Simulator.
You may drag this onto the dock for easier access.
I hope this helps!
In case you were trying to open multiple distinct simulators at once:
Open the Simulator app, not Xcode.
Then File >> Open Device >> Select iOS version >> select device.
The location of the 'open device' has changed in different Xcode versions so it may be at a different place
I created an automator app based on #trojanfoe's answer so you can launch iOS Simulator directly from your Dock https://github.com/tsdexter/ios-simulator-expo-utilities/
From Terminal just run this command:
ios-sim start
Or,add this to your ~/.profile to save yourself a few keystrokes:
alias ios="ios-sim start"
Not sure which version of Max OS X and Xcode this command became available. I'm running 10.10.3 and 6.3 respectively.

No iphone simulator folder in home library > Application support

I installed the xcode_4.3.1_for_lion.dmg on my mac 10.7.3. I need an iphone simulator folder to install the iapps. No iphone simulator folder in Application support
~/Library/Application Support/?
Checking in home library only.. ~/Library/...
Is there any way to check this?
I think this is a duplicate of How to install iPhone application in iPhone Simulator. I don't see any method of flagging a question as duplicate, though.
See my answer at following post.You should clear your trash folder and reset it.For more detail click below link.
No iphone simulator folder in Application support

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...

Resources