I've got my deployment target set to iOS 4.0 and yet when it's all compile the value is 3.1. WTF?
Anyone know what's going on here?
Settings like this can be set in multiple places. Check that your target setting is correct: it'll override the project setting.
Application settings can be set on the project (typically the blue icon at the top of your Xcode drawer) but also can be overridden in individual application Targets (the little red bullseye icon). Settings applied to the project are kind of like global settings. You can change the global settings in different targets though. So check that you're not setting 3.1 in a target thus overriding your Project settings which you have set to 4.0.
Related
Now I have a Xcode project which is built for iOS 5, but now i have to install it on an iPhone 3GS, which has a older iOS. I came to know that this is because I am using ARC in this project and it is not available in iOS 3.2. How can I remove ARC from my current project?
If you want it disabled for the whole project, you need to go to the target's build settings and set it to No
very simple first go to targets in that go "buldphases"-->compileSource--> here "yourfile.m" --> set value
-fno-objc-arc(only particular files )
if u want remove ARC in entire project go to targets in that go "buldsettings" ---> objective-c automaticrefcount :NO
In XCode, there is a global compiler flag called -fobjc-arc. If you disable this (-fno-objc-arc), ARC will be disabled in your whole project. If only a few files don't support ARC, use the -fno-objc-arc flag on those files only. The last flag "wins", see http://clang.llvm.org/docs/AutomaticReferenceCounting.html#general.
However, make sure that you know what you're doing! If the project was designed around ARC, there may not be any deallocation-code in there, including dealloc methods. Also, your properties might be unsupported (strong, weak etc.). You'll most likely end up in a complete mess.
Your best bet would be to just upgrade your 3GS.
Go
Build Settings
make sure "all" option is selected
search for automatic you will find Objective-c Automatic Reference counting set NO
I have two targets set up for my app (a lite version and a pro version) and I want to integrate some subtle differences in the code for each of them (e.g. the pro version will not show any iAd banners).
I have been looking around and I see the easiest way to do this is through the use of preprocessor macros. The issue I'm facing is how to set them up in Xcode 4. I want to set up a macro called 'PRO_VERSION' in one target & 'LITE_VERSION' in the other.
Below is an example of how I intend to use them:
#ifdef PRO_VERSION
// Hide ad banners
#else
// Show ad banners
#endif
The build setting you need to change is called 'Preprocessor Macros' and it can be found in the 'Build Settings' tab of the Project Settings pane (use the search box to find it). Select each target in turn in the left-hand side of the Project Settings pane then modify the Preprocessor Macros setting.
The setting is specified as a space-separated list of preprocessor macros in the form 'foo' or 'foo=bar'.
I'm not on my mac at the moment, so I can't give full step-by-step directions, but I believe this should be accurate, if not as detailed as I would otherwise be. Create a new build target. Go to the configuration screen for this new target. There should be a tab along the lines of compilation options. In this tab there should be a row for other compiler flags. In there, put -DPRO_VERSION.
I am recently trying to connect my cocos2d game with open feint, but I can't accomplish it as there seem to be some settings missing in my build settings of any project that I create.
For example, I have to check "Call c++ Default ctors/Dtors in objective c", but there isn't such an option in my build settings. What's wrong with that?
Here is a picture:
http://img413.imageshack.us/img413/3425/bildschirmfoto20101023u.png
My project is the one on the left, I downloaded the right one. I need to my build settings to like like the ones on the right. Is that somehow possible?
In the image, you have the build settings windows set to show "settings defined at this level". Since you haven't yet changed the other linker flags setting, naturally it doesn't show up. If you show all settings, you should see it.
This has been annoying me for a while in several XCode projects. I really don't like to have compiler warnings when I build. When I build my current project, I get the following warning from a bunch of XIB files:
/.../CaseInformationView.xib:3:0 UIScrollView's 'Bounce Zoom' option will be ignored on iPhone OS versions prior to 2.1.
Since I'm building for 3.0, I don't care if it will be ignored. If I want to use the Bounce Zoom option in my XIB file, how can I not see this warning?
In IB, select "Document Info" from the Window menu and set your Deployment target to 3.0.
EDIT: In more current versions of Xcode
Choose the xib
Go to the File Inspector
In the Interface Builder Document section, set Deployment and Development
Also, set Deployment Target on Project's Summary page (choose main project, then Summary tab)
Is it possible to have an Xcode project file which contains both the Cocoa (MacOSX) and CocoaTouch (iPhone) versions of a component?
I thought I was getting close until I realized that you need to set "Base SDK for All Configurations" in the Project Settings in order for the cross-compiler to be called (and for any CocoaTouch frameworks to be found and properly handled by Xcode).
Since that is a project-wide setting, I don't know how I can have both MacOSX and iPhoneOS targets in the same project file.
Specifying:
SDKROOT = iphoneos3.0
in an xcconfig file (used by iPhone-only targets) did not seem to work.
Yes, you can, but there are some glitches.
Okay first off, you can override any Base SDK in several ways. One is that you can on the gear at the bottom of the inspector and "Add Build Setting Condition" which lets you conditionalize any build settings based on things like the target architecture, etc.
Second, even if you have a project wide setting, it can been overriden per target. So if you have seperate targets you can just add an SDKROOT to the to the various targets with their SDKROOT.
Third, the SDK selected in the popup in your Xcode window overrides evertyhing else. So if you have something besides "Base SDK" in that popup it will get used. Also, if you do switch that (lets say from "Base SDK" to "iPhone Simulator") and then you switch targets to a target that does not support the currently selected SDK it will appear to deselect, but it doesn't actually correctly autorevert the Base SDK, you need to reselect it in the pop up.
I still can't consistently get multiple archs building together properly as part of an aggregate (for instance, having an OS X target that preprocesses some resource built so that it can be used as a build phase in a later target building an iPhone app).