I have found many tutorials (such as this one) that mention being able to set the base SDK for a project's build settings to use, say, the iPhone Simulator. I am running the latest version of Xcode but the only SDKs that seem to be available are MacOS and iOS. Even after downloading some of the older simulators from Preferences>Downloads, I don't see any additional SDKs available.
I don't know if I broke something, or if I'm not even supposed to be able to select any of the simulator SDKs as the base SDK. I'm still too new to Xcode to really know. From questions such as this, I'd assume that I should be seeing at least an "iOS Simulator" as an option.
I previously was trying to experiment with compiling via makefiles and so was installing various command line tools, so I'm not sure if something just messed up my environment. I tried uninstalling xcode and developer tools entirely and reinstalling from the latest version on the app store, but it doesn't seem like it changed anything. I can't even seem to get an existing project to build for the simulator, when a while back it used to be able to, so it doesn't even seem to matter which project I have open.
Did I break something, or am I just missing something obvious?
You are missing something obvious. :)
The Base SDK has nothing to do with running on a device or the simulator. Leave the Base SDK as "Latest".
To run your app in the simulator, notice the dropdown menu in the toolbar just to the right of the Play and Stop icons. In the dropdown, choose the target to build and then the device or simulator you want to run with. Once chosen, go to the Product menu and choose Run (Cmd-R).
Related
I have the iOS 9.3 beta installed on a testing device as I'm running a few 9.3-compiled apps, but I also have an old app that is compiled in Xcode 7.2. I can run the app on any iOS 9.2 device with ease, but if I try to run it on the one iOS 9.3 beta device, I get the "could not find Developer Disk Image" error.
Xcode 7.3 includes some updates to Swift, so I'd have to change a great deal of my files, and I just want to test to see if it's working fine. Is there any way to do this without having to change a lot of Swift code? It's on the App Store compiled for 9.2 and I can run it on my 9.3 device, so I don't understand why it's so difficult.
If you want to avoid the beta version of Xcode from potentially altering your original project, just make a copy of the project and then just open it up in the beta version. If you have an app running in Swift 2.1.1 (Xcode 7.2), the differences to Swift 2.2 (Xcode 7.3) are pretty modest. And if you do this with a copy, you can be confident that your original project won't be altered.
If you don't want to do that for some reason you can install apps from a production version of Xcode on a device running a beta version of iOS:
First, you want to make sure you have the profiles installed on your beta iOS device. The easiest way to do this is to run some "Hello World" app on your beta device from the beta Xcode. If prompted to add a team/profile onto your device, you should go ahead and do so, like usual.
Quit the beta Xcode and start the production Xcode and open the project for the app you want to install. Select "Generic iOS Device" where you choose the active scheme in jump bar and then build the app. You should then see the .app file (not in red) in the Products folder in the "Project Navigator" tree in the left panel.
Install the app on the device by opening the devices window (shift+command+2) and selecting the device in question. In the right panel (or top right panel if you're showing the console, too), you'll find a "Installed Apps" section. Just drag the .app file from the Products folder into this installed apps section.
Clearly, if you have other apps you want to install, you can just repeat steps 2 and 3 as appropriate.
There are a bunch of different ways to install an app on a device, but I find this is the easiest for one-off installs with a device sitting in front of me. You won't be able to debug if you do it this way, but you can at least fire it up, run it through its paces, watch the device console for any debugging messages you may be NSLog'ing, etc.
I am wondering how to handle running two versions of xcode on a mac, or if it is even possible.
I currently have a number of production apps that I service with the release xcode7. I must have this available for uploading app versions to the app store.
I also have a ipod touch device I have the ios9.1 beta running, and want to test and write code for the new os.
However, xcode7 says I can't test ios 9.1 beta, that I have to install xcode beta. Also, I've read that you can't push apps to the app store with the beta. So how can you maintain current apps, as well as, build new functionality?
Maybe I have missed something? some setting that allows me to toggle between these xcodes? or will the mac allow me to have two different versions of XCode installed? I assumed it would just override the other.
I don't want to buy another mac, or to partition the one I have, or keep downloading and installing different versions on all the devices, if I don't have to.
Any information would be helpful, how does everyone else handle this?
You simply need to rename them in /Applications; for example:
Xcode 6.4: /Applications/Xcode6.app
Xcode 7.0: /Applications/Xcode7.app
Xcode 7.1 beta: /Application/Xcode-beta.app (the default anyway).
They will co-exist perfectly happily, however if you do command line builds, you'll want to use xcode-select to select the version you want to use when using xcodebuild or clang, etc.
The betas generally come with the name Xcode-beta.app (this is true for the iOS 9.1 beta), so you can just download it and copy it to the /Applications folder as usual.
In the rare cases where that's not true, you can just rename Xcode.
You can install both versions. They will happily co-exist in your /Applications folder. One will be called Xcode, the other will be called Xcode-Beta
So I just installed Xcode 6.4 to start some development on my new Mac, and after creating an empty iOS project, I see the message "No OS X or iOS Targets Found". I also see a message under my project folder: "base SDK missing. But I was under the impression a normal install of Xcode also installs all basic SDKs required for Mac and iOS development?
It seems there is absolutely no information on this message on the web. I think it is not an error per-se, more like I need to create or import some build targets, but can anyone explain what I need to do to get my project built and running?
I also need to use XCode with Cordova (or PhoneGap), but there does not seem to be any clear information on how to get XCode properly set up for that. Any pointers for this would be appreciated.
I haven't created an empty project in a long time so can't really comment on the empty project. But to make your life MUCH simpler, I would use one of the default templates and go from there. The simplest is probably the "Single View application".
Admittedly, this does not solve the issue, but it will get you going (which I assume is really what you want to do).
Go to the Project menu, then Edit Project Settings. Select the Build tab, and near the top, there is a Base SDK setting.
Choose the latest iOS.
You might need to clean the project or restart Xcode.
I know that I repeat this topic but I didn't find the solution. I don't have developer account, I just want to run the iOS simulator with my project. All the uptdates are instaled including iOS simulatores, Compiler for C/C++/Obj-C is set as Default compiler(Apple LLVM 6.1). Also I can't choose any device on the left side of "set the active scheme", there's only iOS Device. I have tried to change the versions of XCode and iOS to earlier and nothing happened. I found
I will be very gratefull for help!
In the Xcode options select Window>Devices and see if the simulators are created. If not, you would need to create simulators depending on which one you need.
My apologies if this question has been asked before. I can see there are a lot of questions that appear similar, however it seems they are mainly asking to do the reverse of what I am asking here.
I took a break from developing for a few months, because I had sold my macBook, and in the meantime upgraded my iPhone 4 to IOS 5.1 (over wifi)
Before selling the macbook, I made a carbon copy of my drive and made sure it could be booted and used to maintain things (on a borrowed mac).
Anyway I am now back on line with a second hand macbook classic, which came with a fresh Lion install, and whilst the workstation backup drive I made boots up fine, I discovered to my dismay that Xcode 4.2 no longer lets me build to my iPhone, so I had to go ahead and install XCode 4.3.3 Under Lion. 6GB of update downloads and installs later, all is well, however I am now left with a puzzling question.
If I make a new app, it appears to be an IOS 5.1 app, and the only simulator available is IOS 5.1 iPhone and IOS 5.1 iPad. and of course my iPhone device.
so... if I go ahead and submit this app to the app store, (ensuring I don't use any 5.1 specific features), does this mean users with versions of IOS lower than 5.x can still download and deploy the app? I can't test it as there are no simulators, and I only have access to 5.1 installed devices. I tried downloading additional simulators, but the default new project seems to preclude them from the menu system.
What is the best way to make one (1) app that everybody (including 5.x users) can download?
I would have stayed with Xcode 4.2 but this would mean having to trash my iPhone to do device testing.
Alternatively is there some way of going back to my original workstation (4.2) and configure it to allow me to do device testing on my 5.1 device?
In Xcode, select the project file in the project navigator, and then the target. In the first section of the "Summary" tab you have "iOS Application Target". There you can choose earlier iOS versions.
That's all.
In xcode go to preferences command + "," navigate to downloads. choose components tab, and you will find the ios simulators, download the one you wish from there