Xcode iOS Base SDK Missing - ios

I have an old iOS app that I never distributed and am now trying to work on the project again. It worked fine with an earlier version of Xcode but I was not ready to deploy it at that time. Now I am using the current version of Xcode but I have an error that there is a missing base SDK. I have explored every posting here with that error message and they did not work for me.
On investigation in Xcode. I can choose my app under "Project" pane. With the Info tab chosen, it has under Deployment Target as "Mac OS X Deployment Target" and Default in the drop list.
This is an iOS app and not a Mac OS X app. How do I change this?
I already have the base SDK as the Latest iOS.
Suggestions?

Try this:
Open Xcode and Press cmd + 1
In left panel choose your project -> Your target in center panel-> Build Settings in right panel
Find "Base SDK" and choose "Latest iOS". If you see a Release and Debug lines, then choose this for both Release and Debug.
Restart your Xcode

Usually when you see this, it's when you've got an old iOS project and you're using a version of Xcode that uses a newer base iOS. In those cases, you can click on the target on the top of the tree structure of the Project Navigator on the left, and you'll see the project settings. There's a button labelled "Validate Settings" and will show up near the lower center portion of the main panel. Click on it.
If that doesn't do it (e.g. it's from a really old version and Xcode can't figure out how to remedy it), it might be easier to recreate the project. Create a new iOS project and then copy your source code, its NIBs and resources into that project. Maybe that will be easier than trying to fix the old project you have.

Related

I lost all the iOS simulators in Appcelerator Studio? How do I get them back?

I haven't been able to build to my iPhone 6 so yesterday I was advised to add to Xcode (in Preferences > Accounts tab) the Apple ID of the leader of our informal team.
Still wasn't able to build to my iPhone, and today I realized that all my iOS simulators have disappeared from Appcelerator Studio.
What did I do to disappear them from this project? And how do I restore them? (I see that they're still there in another project.)
I had the same problem and found the answer here.
1.Go to Home(jacklee).
2.Go to Folder and find the titanium folder (.titanium).
3.find the files calling "config.json" and Edit the files.
4.change the ""selected": "3.5.1.GA"" to the Latest SDK (any GA Version should be fine).
5.Delete the RC(beta)SDK.
Problem might be with your deployment target selection in the tiapp.xml file, make sure you select 'iPhone' checkbox in the tiapp.xml editor of your project.

iOS project has changed to OS X project

The house of cards that is XCode has changed my project from iOS to OS X.
It doesn't appear to have anything to do with the Schema because I've deleted that. In the build settings, the architecture settings are drawing from "OS X Default".
How do I change it back?
I fixed one of my projects by restarting the machine. One is still incorrectly configured though.
Many answers elsewhere suggest overriding the settings inherited from "OS X Default", which you can see in the following screen shot. Ideally the base settings should be "iOS Default".
Check and set your base SDK to iOS. Go to Project (in upper left) -> Project (project name in submenu) -> Build Settings. In Architectures menu select Base SDK as one of the iOS SDK.
Also, you said you deleted your Xcode schemes. That may also cause this. Try this:
On the left top corner of Xcode click on the scheme.
Click edit scheme.
In the new window change "Executable" from non to the name of your
project scheme "target".

Xcode 6.4: OS X and iOS Targets, Cordova

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.

Xcode: how to test my app on older versions of iOS

I would like to test my app on older versions of iOS. By "older versions" I mean iOS 5.1 5.0 and 4.3. In order to do so, what should I do in Xcode? I've already downloaded (through Xcode) all the corresponding simulators, but I don't know how to build and run my app on a specific simulator. The only choice I have is to run my app on iPhone/iPad 6.0 simulator.
Thanks.
Both of these answers weren't clear enough, I'm adding this to stop people making incorrect assumptions.
The only way to test on a lower version of the iOS is to run it on a device with the lower version or on one of the lower version simulators.
The "Deployment Target", which both answers here incorrectly say runs the app on a lower version, just sets the minimum installed OS version that the app will run on. When you run it on the iOS 6 simulator - it is still running on the version 6, not to whatever your deployment target is set at.
But, without setting a lower deployment target, the option to use a different iOS Simulator isn't available.
Best practice is to build with the latest version and SDK available and set the deployment target to the lowest version that your app supports.
As for running the app on different versions of the simulator - have a look at the dropdown in the top left corner of Xcode - you can pick which of the installed simulators to run your app on from there.
I think your applications deployment target is set to iOS 6.0. Make it to the lowest version you want. I believe iOS 4.3 is the lowest that is possible right now.
To change deployment target,
Select project file in Project Navigation
Click your target
In the summary tab, choose your deployment target.
EDIT: After seeing #Abizern answer.
Well I answered to this part in the question.
The only choice I have is to run my app on iPhone/iPad 6.0 simulator.
OP was not getting older version of simulator to show up in the drop down menu. It was because his project base sdk target and deployment target was set to iOS 6.0. By setting deployment target to a lower version, other simulators started to show up.
But as #Abizern correctly pointed out, to run on a simulator of lower version you have to choose the correct simulator from dropdown menu to run. Well just to make it clear.
Open Xcode and in the menu at the top left, where you select what device to run on, click "More Simulators..."
The download section of Xcode preferences will open,
Click the "Components" tab.
You will see a list of simulators that can be installed, click install on version you need.
The simulator will need to restart to install.
To run the newly installed version of the simulator just select it from the run menu in Xcode.
At the sidebar left, click on the first element of the list(usually is the name of your project). A new menu will open, like my screenshot.
Just select the target that you want to simulate.

Xcode 4.4 turned my iOS project into a Mac OS X project! How can I fix this?

I've opened an iOS project - with Xcode 4.4.1 - that I hadn't opened for 2 months (ie with Xcode 4.3). First, Xcode was crashing constantly right after displaying the project navigator saying something like "Failed to associate working tree".
I tried to fix it by removing xcuserdata files and the project.xcworkspace directory as well.
Now, Xcode opens without crashing but in the scheme view, it is shown as a Mac OS X project whereas both the project and the target are correctly set to a "Latest iOS" base SDK.
How can I fix that without having to recreate a project and copy all my source files?
EDIT: i'm using Git with a GitHub remote.
make a new scheme for ios by clicking on the current scheme then "new scheme"
Roll back using version control. If you post which version control system you are using, somebody will be able to give you the specific command to use.
I had a similar problem with all my Xcode projects. Every iOS project got turned into an OS X project without me changing any settings. A reinstallation of Xcode fixed it for me.
Just set your Root SDK to iOS in your target's Build Settings
SDKROOT = iphoneos

Resources