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.
Related
I am having a strange issue with a xamarin IOS project. On one machine when you go to the ios project -> properties. It shows the options like this:
IOS Project Properties Wrong
In the other machine's project the properties look like this:
IOS Project Properties Correct:
You will notice that the IOS Application tab is visible in this project and the iOS Build section has a General and Advanced tab. Why doesn't the other project have this. On both machines I just created a Cross platform PCL template project. Both machines have the latest xamarin installs. What am I doing wrong here?
I figured this one out. The issue here is that with visual studio 4.5 they changed the way that the projects worked. For me personally I cannot deploy xamarin ios. Because of the ITMS-90096 error. Even when I set the images in the info.plist file I still get errors. I will instead revert back to release 4.4 until I can properly deploy to the app store.
Xamarin Release Notes
I'm running into compatibility issues for some external frameworks I'm using in my project. Is there a way to change the Base SDK on Xcode 8? Currently in the project settings only show me the Latest SDK.
I've tried copying the older SDK from another version of Xcode to here but it didn't work:
/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
Starting with Xcode 7.3, in addition to copying in the SDK, you must also edit a certain Info.plist file, as described here for macOS in the post by agx. It looks like there is a similar file for iOS, at
Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Info.plist
Try changing the value of MinimumSDKVersion in there from 10.0 to whatever SDK version you want.
I've not tried this with iOS, but, using this workaround, I was just able to build a macOS target with macOS 10.6 using Xcode 8.0 (8A218a) (the "GM").
UPDATE
The hack described above stopped working for me in Xcode 9. If you want to use Xcode 9+, see my more recent answer dated Nov 22, 2017.
My original answer, although it worked with Xcode 8, for some strange reason which is not worth explaining, no longer works with Xcode 9 on a particular client's old project. So I've been using an alternative workflow which is really not too bad.
To work on this project, I open it in both the older Xcode, which can build it with the required SDK, and in a recent Xcode. I put the old Xcode window in the background and do my work in the recent Xcode. When I am ready to test changes, I do a File > Save All (⌥⌘S), then switch to the old Xcode and Build (⌘B). When the build is done, I switch back to the recent Xcode and Product > Perform Action > Run without Building (⌃⌘R). Because the dSYM file format has not changed, breakpoints work as expected.
The advantages are that no hacking of Xcode is required, and the only thing I need to remember about the old Xcode (Xcode 3 in my case) is, mercifully: ⌘B.
One little warning: In this particular project's Target, in Build Settings, it has a custom Build Products Path. This is typical of the way Mac apps were built years ago. To ensure that both of your Xcodes are working with the same product, if your old and recent Xcodes straddle the version which changed the default Build Products Path, you may need to set Build Products Path.
The workflow could probably be made even easier by scripting the xcodebuild and xcode-select command line tools, but this is good enough. With Apple's announcement at this year's WWDC about support for 32-bit Mac apps going away during the next two years, my client has some tough decisions ahead in any case.
You just have to change the "Deployment Target" settings. You basically use the latest available SDK as base SDK but select a target OS X version.
Of course it depends on why you want to use an older SDK?
I've an old project to start work on it. Client told that it was completed in 2012, and may be with v.4.3 or some older version of Xcode. It was only targeted for iOS v.6 and previous versions. Now client wants to make some upgrades and make it compatible for all iOS devices having iOS v.7 and/or above.
I'm running Xcode v.6.3 with iOS v.8
When I firstly open up the project and run – I got too many error (actually those should be come as warnings and not errors) from GPUImage framework. I solved it one-by-one. After solved those errors, when I run it again, I failed-up with few more error of SDKs not found. I can confirm that all SDKs are added properly. And its never changed, after the project was created. However its giving me errors.
Is there something that we've to setup when we run an old project (in latest Xcode and current iOS target)? Do we need to change architectures? Header search paths?
Note, all SDKs and app source code was on Github and added as submodules to the app. I have successfully cloned it in my Mac.
Please ask me if you want more information on this.
The following steps could solve your problem. I am not 100% sure but it worked for me once. Worth a shot.
1) Go to Build Phases and remove the FacebookSDK.framework
2) Clean
3) Link back the FacebookSDK.framework to your project
4) Clean and Run
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).
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.