TableSearch sample and error: "There is no SDK with the name or path 'iphoneos4.0'" - iphone

I downloaded the latest sample code from the Apple developer site and even though I've set the Project settings, I can't build the project.
I have the XCode version 3.2.4 with iOS 4.1 and I get the error:
There is no SDK with the name or path
'iphoneos4.0'
I've changed the value of "Base SDK" to "iOS Device 4.1" found in the Build tab that you get to via "Project" :: "Edit Project Settings" page.
What else should I change to get this project to build? There are no #ifdefs defined to say it can only build on 4.0.

It turns out that I had to go to the Targets item from the Groups and Files pane and change the Base SDK there as well. I thought changing it one place would do it in XCode, but alas, not so.

Related

new to iOS - not able to download and run project

I downloaded the Flashlight project from this trusted site , in xcode i clicked on "open other" and choose this project. But when I run it it gives me the error:
the run destination my mac 64-bit is not valid for running the scheme 'Flashlight'
the scheme 'Flashlight' contains no buildables that can be built for the SDKs supported by the run destination my MAC 64-bit. Make sure your targets all specify SDKs that are supported by this version of Xcode.
I tried this: Autocreating schemes (Scheme > Manage schemes > Autocreate schemes)
I then closed and re-opened xCode. still got same error.
ok, the issue is not in the schemes, it is in the build settings of the project and its SDK missing.
1.click the project on the left side of the Xcode when your project is open.
2.then on the right side navigate to the build settings.
3.under the base SDK pane, click on the right side and open up the drop down menu.
4.then select the type of the SDK you want.
from there you can select to run the project on the mac or iOS.
now this project is missing some basic framework when its run on mac 10.8. so i suggest you run it in iOS.

Error in Build - Missing SDK

I downloaded some Application samples from a website.
It used to work but when I went back to Xcode (After a couple of months) I tried them and it gives me this error.
error: There is no SDK with the name
or path 'iphoneos2.0'
I tried looking for a file called "iphoneos2.0"
and tried looking for a highlighted code but nothing.
Could anyone help me please?
The Base SDK of your downloaded app's Target has set to iphoneos2.0. Change the Base SDK of the Target from iphoneos2.0 to a iOS version which is available.
To change the Build Settings in (Xcode 3.2) - Goto Project -> Edit Project Settings menu. Or, Double-click the project name in the project tree in Xcode.
To change the Build Settings in (Xcode 4) - Select the project name in the project tree. It will open the Project Settings in the document area of Xcode.
In the project settings, search for Base SDK.

error: There is no SDK with the name or path 'iphoneos'

I have downloaded a sample and when I try to run it I get that error, how can I fix it?
The XCode project file you're trying to open is referencing a version of the iOS SDK that you either don't have installed or don't have in the anticipated location. This should be easily fixed by updating the project file to reference a version of the SDK available on your local machine.
XCode 4
Open the XCode project
In the left hand navigation pane open the project file
For both your project and targets open the build settings tab
Look for the 'Base SDK' setting and set it to the desired version
Older Versions
Open the Edit menu
Open Project Settings
Same as XCode 4 instructions - set the 'Base SDK' to your desired version

Frameworks are 'red' in Xcode

I downloaded a project developed by Apple employees ( who taught course at Stanford on iPhone application development). Strangely , the frameworks are red.
http://img.skitch.com/20100730-kcjun96mp2pxnpg7w3x6njw57.jpg
I tried to locate coreGraphics.framework and UIKit.framework to add them again but i couldnt find them either.
Taimur
The red text indicates that the actual files are not at the path that the project has for them.
Get info on the framework and look under the General tab. The first section shows the name and path of the framework bundle itself. The most common cause of a problem with system supplied frameworks is that the path type has been changed to something that breaks the path. The default setting is Relative to Current SDK. Change the path until you get one that leads to the actual framework.
If you have the developer tools installed in a custom location, you are more likely to run into this problem. If you copy a project from someone with non-standard settings, you can encounter it as well.
Are you building for a Simulator or for Device?
Try building for Device.
Found a way to fix this automagically:
Right click your main Xcode project file (the blue one at the top ),
Get info,
'General' tab,
At the bottom, set 'Base SDK for All configurations' to your desired one.
Done!
Steps to fix this issue in M1 Macs:
Install "sudo gem install cocoapods-deintegrate cocoapods-clean" to install deintegrate if not installed.
Run "pod deintegrate" in terminal in your project folder to uninstall all pods.
Run "pod cache clean —all"
Run "pod install"
Go to Project Explorer Select "Pods" in blue
Select the each pods in the target section
Search for "Excluded Architecture" in Build Settings Tab under "All" sub category.
Add "Any iOS Simulator SDK" in both debug and release and set the value to "arm64"
Repeat this for each Pod with the error "Framework not found".
Clean Build the project.
#Taimur Hamza - Its happen (red color) following any one of reason,
Your downloaded project may be miss some required files
Before run the application at first time.
so, first you have to find that above reason is happen and try to solve via copy the framework from another running project and paste it your project.
I had faced this problem before. I got over it by copy the missing (in red) framework from my friend's Mac then copy it to the Framework folder.
This is the path of my framework folder:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks
You may need to change the path depend on your system or your sdk version.
Most likely you decided to remove some of the frameworks you don't need and you deleted them but selected "Move to Trash" instead of "Remove reference".
The problem is that this framework was not included in your project's folder. It sits in a System folder when it can be used by multiple projects. So not only did you cause the current project not to compile, but also all projects on your computer.
If you have any frameworks left, you can right-click on them and check "Show in Finder". Than you can find your deleted frameworks in the trash (if it's not wiped already), and put them back in the system's Frameworks folder.
If you can't find this folder, for me it was here:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library
Of course, when you go in Applications folder and select Xcode, you have to right-click on it and click "Show Package Contents".
If you deleted your frameworks even from the trash, than I guess you could re-install Xcode...

No "Distribution" setting in latest Xcode?

For some reason, a choice for "Distribution" configuration is not showing up for building an app in the latest Xcode 3.2.2 with iPhone SDK 3.2 when I'm trying to build an app for the iPad
Any one else seeing this? I can set it to "Debug" or "Release" but there isn't even an option for Distribution.
Double Click on the .xcodeproj icon in the left pane, I believe called Groups & Files. Then, In the Configuration Tab, duplicate the "Release" and rename it "Distribution".
You add it yourself. Duplicate the Release config.