Xcode conditionals list, where do I find them? - iphone

I am trying to learn about all possible conditionals that can be used on Xcode regarding the iPhone and iPad.
I have found the file "TargetConditionals.h" on
Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk/usr/include/
but this file do not shows all possible conditionals, just a small set.
I don't see, for example, __IPHONE_3_1
and others.
As Apple docs as vague as hell, I as you guys where can I find a complete list with ALL conditionals?
thanks

Check out Availability.h. I don't know if there's a list that compiles everything across all files, but this one has the iPhone/Mac OS X version conditionals.

Related

What happened to Windows Based Application in Xcode 4.2? [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Cannot find window-based application on XCode
I am pretty new to IOS development and have started reading books to help me out. I only started recently and the books all start you on a windows based application and I see that this does not exist in xcode 4.2. I have read and found that the way to go is to create an empty project but this does not create a .xib file and I have no idea what I'm doing so it might not seem like a big deal to an experienced IOS developer but this was a huge curve ball for me. Also there is a bunch more code in the .h and .m file that wasn't there before. Can someone tell me why this was taken out and maybe sort of guide me to what I should do or what I should start reading. I know that this may seem like a question that could be solved with a bit more research but the problem is not as much that the windows based app is not there anymore but why is it not there. Maybe I shouldn't even try and create one anymore? I have even read posts where they say how to add the .xib file but that didn't really help because when i built my app, it was a blank screen. Anyways, that's a different problem.
There are new editions of many beginner books out there, such as the Apress series
There is a walkthrough of hooking up a XIB to the empty app which should make it fairly easy to go through the book you already have. If you're having problems with this though, then I really do recommend the book. I've gone through the last version of it and I found it very easy to follow and understand.
As for why Apple changed it, as per usual they haven't said anything about what motivates them. We developers are just left to assume that they must have it in for us.
How to make window-based app in 4.2: http://www.makebetterthings.com/iphone/where-is-mainwindow-xib-in-xcode-4-2/
Make sure you didn't miss "select MainWindow as the Main Interface" part.
Windows Based application are not there in Xcode 4.2. But You can go with option "Empty Applicaion" and manually add Xibs and classes.
For more details please follow this question "Cannot find window-based application on XCode" where you will find your answer in a more clear way.

Core Location Simulator on Xcode 4.2 Not Working -Any Clues?

I checked all the other variants of this, and don't see the answer here. It seems a lot of folks are thinking of Xcode 4.1, and the issues therein.
First of all, I am very happy with Xcode 4.2. It fixes the huge plethora of problems I was having, and, once again, makes the simulator a useful tool. I am very glad for this, because it is a MUCH faster workflow than using the devices.
Now, 4.2 introduces something in their Edit Scheme dialog (Go to the "Run" page, then "Options"). This is called "Core Location [checkbox] Allow Location Simulation". It allows you to pick from a list of pre-defined locations.
This seems to obviate the horrendous hack that I had introduced when I first encountered the issue in Lion.
However, it no workee. I'd like to find out what I am doing wrong. Has anyone gotten this working?
Remember: THIS BEGINS IN 4.2, WHICH JUST CAME OUT YESTERDAY. So the rules from 4.0 and 4.1 don't apply. It is a new capability.
Thanks!
First, I created the GPX file as mentioned in this question.
In addition to updating the Run Scheme to select the Allow Location Simulation option and specifying the Default Location as you mentioned, you also need to make sure that your Scheme is set to iPhone 5.0 Simulator. This made the trick for me, when I debug my project, the app asks me if I want to allow it to use my current location, and I can see the Debug -> Location menu in the iPhone Simulator.
There's a thread on this bug in the Apple developer forums. One suggestion is to reset the simulator.

Check for new SDK calls?

iOS development is now done using only the latest SDK.
Is there any way to search my code base for calls not present in older SDKs, generate warnings when compiling code that requires newer SDKs, or some other way to find where the code will fail on older iOS versions?
A workaround that broke compiling entirely would also be acceptable. This is not something I want to ship with, just something I want to do to verify that I've handled everything properly. The application seems to run on devices running earlier versions of iOS, but I'd like to be able to prove this.
No, I don't believe that there is a good way to find new calls not available in older SDK's. It's something I've wanted for a while.
The best thing I know of is to test your app thoroughly on a device running the oldest version of the OS that you plan to support.
It looks like this will do it...
Add this to your prefix:
#define __IPHONE_OS_VERSION_MAX_ALLOWED __IPHONE_3_1
Do not ship without removing this, though. In fact, you'll probably have to disable huge chunks of code to get your app to build this way. And even so, the coverage is nowhere near complete. But it's better than nothing.

iPhone Or Mac Header File?

Just a small question...
How is it that you tell the difference between an iPhone header file which you can use in conjunction with iPhone development, or a mac specific header file.
Many thanks,
Stu
Many are the same, but not all are included in both. It all depends on which SDK you are building against as to which you have available to you. Please see the iPhone Reference Guide and the Mac OS X Reference Guide.
One quick way is to try and pull up something the header references in the XCode documentation, if you check the document sets the docs are looking at and un-check "MacOS" leaving the iPhone stuff, it will not find anything the iPhone cannot use.

UITableView: Check rows in edit mode

I'm new to iPhone SDK 3.0.
I've seen table view edit mode where you can check multiple row items and then delete them or move them.
The picture here (http://twitpic.com/khmog) illustrates what I mean. I've also seen this in several other apps, such as "Groceries".
Could anyone tell me how to do this? Can this be done using 3.0 APIs? Thanks.
It seems that Apple uploaded "TableMultiSelect" as sample codes on iOS Developer Program since 2011-10-12.
It explains only multiple deletion, but I suppose you can change it for moving.
Though it can be used only from iOS5..
http://developer.apple.com/library/ios/#samplecode/TableMultiSelect/Introduction/Intro.html
I've found a solution here:
http://iphonedevelopment.blogspot.com/2008/10/table-view-multi-row-edit-mode.html
There was a demonstration of this on the CS193P course (available on iTunes U). I'm pretty sure it was the Loren Britcher session.