xcode

PyObjC + Python 3.0 Questions

By default, a Cocoa-Python application uses the default Python runtime which is version 2.5. How can I configure my Xcode project so that it would use the newer Python 3.0 runtime? I tried replacing the Python.framework included in the project with the newer version but it did not work. And another thing, are PyObjc modules compatible w...

#include <lib.h> gives symbol not found, why?

I have this code: #include <iostream> #include <mp4.h> int main (int argc, char * const argv[]) { // insert code here... std::cout << "Hello, World!\n"; MP4Read("filename", MP4_DETAILS_ALL ); return 0; } And i've added -I/opt/local/include and -L/opt/local/lib to the path (where the mp4 library resides after install...

How to specify which GDB I can use in XCode on MacOS

Hi, How to specify which GDB (with the full path) I can use in XCode on MacOS? Thank you. ...

Adding Qt to Xcode project?

I have a fairly complex Xcode project and I want to add Qt to it. I know that I can create a new project using qmake -spec macx-xcode project.pro but I don't want to have to hand configure my old project over the auto generated Qt project. Is there another option? [edited in a more general question below] It seems like it would be easi...

Can I have multiple XCode versions installed?

Is it possible to have more than one version of XCode installed at the same time? If so, please post any tip, tricks, or potential issues to watch out for. EDIT: The reason I want to install multiple versions is to try out the new sdk beta, but if the new XCode is buggy I want to be able to use the older version for my existing proje...

How should I structure my Qt based project so as to have a clean qmake generated xcode project?

If I add sources and headers in my .pro file that arn't in the same directory, the resulting xcode project groups the files by it's default Sources, Headers, etc. but then puts the files in a subdir of those folders indicating the subdirectory where the files are. This make non-flat projects look exceedingly ugly when generated for xcode...

Beginner questions regarding to "building a library", in Xcode on iPhone specifically.

Hi, I have never been clearly understand all these linking/building/dependency business. Now, I am trying to build the FreeType library (which is in C++), into the *.a library file for the iPhone (because another library I am trying to use, openFrameworks, would depend on FreeType). I know that to compile C++ with iPhone I simply need ...

A Guide for Creating your own Library for Cocoa(touch) development

I'm currently using a lot of the same subclassed objects with custom methods. It would be more convenient to create my own library which I can use for several projects. The goal is to have my own classes being available in the same way classes like UIView, CGRect etc are, including convenient methods like CGRectMake, both with classes ...

How do I create in Xcode an iPhone project specifying at project creation time the SDK version I want to use?

With the latest Xcode and SDK 3.0 beta when you create a new iPhone project, Xcode creates an SDK 3.0 project. If I want to revert to SDK 2.2.1 after the project has been created, I need to change something in the generated source code files since some of the APIs have changed. Is there a simple way to specify at project creation time th...

How to remove error messages in XCode?

I pressed Build before I was done coding my class, and XCode is showing me a bunch of red errors, which are obviously because I'm not done. How do I get rid of the errors so they are not showing up in my coding window? ...

XCode trick: What's the shortcut for the context info?

I don't know the word for that. But there was a keyboard shortcut when you had the cursor on a method or variable, it showed an info box with all available variables/methods for that variable. ...

Xcode, Cocoa: Filtering/Sanitizing User Input. Best Approach

To clarify, I want to check for valid characters. For first name, last name I want to check for [A-Za-z]. For Email I want to check for chars valid for email. What algorithm would I use to CHECK user input? Specifically, I'd like to CHECK the user's first name, last name and email address for valid characters before I add to database. ...

is it possible to go rootViewController page from any page in objective c?

Hi! i am trying to build an iphone app. I am trying to build it at View based application. suppose i have gone to y.xib file from x.xib nib file. and x.xib nib file has been come from root.xib file. i would like to go root.xib file from y.xib, How? ...

Is there an iPhone equivalent of MAC_OS_X_VERSION_MIN_REQUIRED?

I would like to conditionally include code for an iPhone app depending on which version of the SDK I'm compiling against. On Mac OS X, there is the MAC_OS_X_VERSION_MIN_REQUIRED preprocessor macro which gets set to the value of the MACOSX_DEPLOYMENT_TARGET build setting by the compiler. Is there an equivalent on the iPhone? Update: I...

Cleaning up the iPhone simulator

Is there a straightforward way to clean up the directory where xcode deploys an app when building for the iPhone simulator? I have a sqlite database that gets copied into the Documents folder on startup if necessary. The problem is that I might change my schema, but the new database won't get copied, because one already exists. Ideally...

How to parse nested JSON objects with JSON framework and Objective-C/iPhone/Xcode?

I'm writing an iPhone native app using the JSON framework. My app is accessing web services using JSON. The JSON data we send has nested objects, below is an example of the data served up: {"model":{"JSONRESPONSE":{"authenticationFlag":true,"sessionId":"3C4AA754D77BFBE33E0D66EBE306B8CA","statusMessage":"Successful Login.","locId":1,"us...

Debugging "terminating Uncaught exceptions" in XCode

So my app is crashing, and I'm kind of at a loss on how to use XCode to debug. I found a forum on macforums about putting a breakpoint at "objc_exception_throw"... although I'm not really sure where to go from there. Any general guidelines for debugging in XCode? ...

XCode: What do I have to type into the Terminal, in order to change the copyright notice in code templates?

When I create an XCode project, there is a copyright notice commented out. I know that there is an special terminal command for editing this. Anyone knows it? ...

How to reference property on library

I'm referencing another project's target static library. I successfully followed instructions from this site: http://tinyurl.com/cleuhw. Below is the project using a class named FileIO from the library. I create a FileIO object (fileObj) and assign a string to its name property. Then I get a __TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION__ ...

Creating a library that contains instance members

In regards to my a little to late discovery that static libraries (obviously) can't have instance members, http://stackoverflow.com/questions/708155/how-to-reference-property-on-library/708263#708263, is there a way to create a shared library that contains both instance and static members? On way that probably works is to create a class...