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)
Related
I am using XCode 4.3 and I am creating a tab bar application following an example in my book (likely used for XCode version < 4.3) but when I add a new tab and turn on check-mark to generate XIB file while adding a new file of Cocoa Touch, the GUI doesn't appear but display instead its generated XML file content. Do you know how to fix this ?
I find each time there is a new version of XCode, the Gui and defined functions seem to change a lot, doesn't this annoy for low programmers like me ? (By low, I mean newbies and those who can't keep up with such rapid changes). Thank you.
You can view my shot here
http://imageshack.us/photo/my-images/685/appleimg.png/
Right-click on the .xib file and choose Open as...
There will be a list of options. Currently you are using "Source Code", which displays as XML. Use Interface Builder - iOS instead.
This will be remembered between sessions. I don't know how it got set to this in the first place.
Alternatively, you may be in the Version editor instead of the Standard editor - this will show xibs as XML in order to correctly display changes.
I am having a quite strange problem in loading a sprite that was previously correctly loaded. I get this error depicted in the XCode console:
CCTexture2D. Can't create Texture. UIImage is nil
Couldn't add image:test.png in CCTextureCache
I can not see what is changed any advice?
Do you see test.png in the project navigator ? If yes, click on it, and make certain it is included in the target (show Utilities, at the top right, above the word 'view', the right button of that group of 3 buttons). Make certain that in the pane 'Target membership', your build target is selected. If not, well... you know what to do.
Also, as a 'personal rule', before trying anything when this sort of thing occurs, i tend to clean the target (including the project derived data), then a build and test again. Xcode can have its moments with respect to keeping track of files and stuff.
Make sure the file is named "test.png" and not "Test.png" because the iOS devices use a case-sensitive filesystem. The file also needs to be added to your Xcode project to the correct target.
I upgraded an Xcode 3 project having three targets to Xcode 4. My targets' bundles no longer have any NIB files -- only XIB files. A new Xcode 4 project has both (at least in the simulator). I don't see any difference between the old and the new Xcode projects' settings to account for this difference.
How do I get Xcode 4 to compile the XIB files and put NIBs in my bundle?
Solution: Select all of the XIB files, change the file type to something outlandish ("Objective-C Preprocessed Source" is handy), and then set the file type BACK to the Default type (IB CocoaTouch XIB). De-select all of the files (Xcode might spin on that for a while), clean the project, delete the prior version(s) from the simulator(s), and now the build should contain only NIBs, no XIBs.
Man Always Wins In The End. (With help from BaldEagle.)
I found another solution:
Go into the 'Build Settings' or your project target, look for 'Other Interface Builder Compiler Flags' and add the flag '-all'.
That's it.
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.
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).