To completely uninstall XCode and all IPhone Developer Platforms just write this command in a Terminal Shell.
sudo /Developer/Library/uninstall-devtools –mode=all
After the command as ended just do a restart to your machine.
To completely uninstall XCode and all IPhone Developer Platforms just write this command in a Terminal Shell.
sudo /Developer/Library/uninstall-devtools –mode=all
After the command as ended just do a restart to your machine.
An interesting project that gives a framework for an AR project using the GPS and the Compass
http://www.iphonear.org/
Found this great post about compiling OpenCV on the IPhone.
Recently we had a small project for the IPhone where we need to retrieve data from a web service.
Our first aproach was to see if in the Apple SDK for the IPhone was something like the WSMakeStubs tool in Mac OSx.
We didn’t found anything similar and we are almost implementing the requests and xml parsing manually until our colleague Barrenho found these nice tools:
Thanks Barrenho.
After some time developing iphone applications I was starting to have a huge codebase that was shared between several projects. In order to avoid to mantain the same classes files to all the projects I started to look for a way to create a shared library. After some “google” around I found some techniques, but the one more accepted by the community and recommended by Apple was the use of static libraries.
How to create and use them? Just follow these instructions:
Create a new project in the XCode using the template static library. In this example we will create a project called MyLibrary. Make sure you store the project in a permanent place because Xcode will need to reference the files every time you compile your project.
Add to this project all the files that you want to use in your custom library. After you have completed just build the project to check if you have no errors in you library.
After you have you library ready you will want to use in other projects for that locate in Finder the “MyLibrary.xcodeproj” file under your project folder. Drag “MyLibrary.xcodeproj” and drop it onto the root of your Xcode project’s “Groups and Files” sidebar. A dialog will appear — make sure “Copy items” is unchecked and “Reference Type” is “Relative to Project” before clicking “Add”.
Now you need to link the your new static library to your project. Click the “MyLibrary.xcodeproj” item that has just been added to the sidebar. Under the “Details” table, you will see a single item: libMyLibrary.a. Check the checkbox on the far right of libMyLibrary.a.
Now you need to add your library as a dependency of your project, so Xcode compiles it whenever you compile your project. Expand the “Targets” section of the sidebar and double-click your application’s target. Under the “General” tab you will see a “Direct Dependencies” section. Click the “+” button, select “MyLibrary”, and click “Add Target”.
Finally, we need to tell your project where to find your library headers. Open your “Project Settings” and go to the “Build” tab. Look for “Header Search Paths” and double-click it. Add the relative path from your project’s directory to the “MyLibrary/src” directory.
While you are in Project Settings, go to “Other Linker Flags” under the “Linker” section, and add “-ObjC” and “-all_load” to the list of flags.
You’re ready to go. Just #import files from you library anywhere you want to use MyLibrary classes in your project.
References:
One of the problems that I stumble upon was when doing long network operations on the IPhone, like downloading a big file, the operation never ended with success.
The download always failed with an IO problem, after some investigation I found out that the problem was the battery saver of the IPhone.
The thing is that when you don’t interact with an aplication after some minutes the IPhone will enter in a battery save mode, first it will dim the screen and after some time it will turn off the screen and disable any wi-fi or 3g connections.
To avoid this you must disable the idle timer on the application when doing long network operations. There is a simple property on the UIApplication class called IdleTimerDisabled. Just do this on your code:
[UIApplication sharedApplication].idleTimerDisabled = YES; // do long network operation [UIApplication sharedApplication].idleTimerDisabled = NO;
Sometimes you start a project with a name in mind for your application. Then you discover that the name is already taken by other app or you want to change it.
If you only want to change the name that appears bellow the application icon just go to your info.plist file and change the CGBundleDisplayName value.
But if you want to clean all references to the old name for the new name you will need to do the following:
To know how much free disk you have available on your iPhone/iTouch just execute this simple code:
NSDictionary * fsAttributes = [ [NSFileManager defaultManager]
fileSystemAttributesAtPath:NSTemporaryDirectory()];
NSNumber * freeSize = [fsAttributes objectForKey:NSFileSystemFreeSize];
You can also use the same dictionary to know the total disk size by reading the NSFileSystemSize key.
One of the security features of the iPhone is the Auto-Lock feature, this feature basically locks your phone if you don’t use it for a configured time ( normally one minute). The problem of this feature is that it turns off WIFI or 3G connectivity. This can be hassle when you need to run a long network background process.
In order to avoid this in you application you just need to use the property idleTimerDisabled in the UIApplication class. Here is a example:
[UIApplication sharedApplication].idleTimerDisabled = NO;
Don’t forget to turn it on after your process is done, or else, you can drain the device battery very fast because the device will never idle when running your application.
After you subscribe and pay for the IPhone Developer Program, you will have access to the “Program Portal”. In this page you have a step by step guide for configure your XCode for device compilation.
Unfortunately Apple forgot some of the instructions, here are the missing steps:
You can find more detailed info here .
Update: Apple finally updated their documentation with this information.
See you soon.