Showing posts with label iPhone. Show all posts
Showing posts with label iPhone. Show all posts

May 5, 2009

How to add a third-party framework in your iphone project

I was working on an iPhone project, which needs some other third-party frameworks which is developed in c++. Since I am new to XCode, it really took me a while to get it straight.

1. Hard copy the third-party's src code fold into your iPhone project.
2. In your iPhone project, create a new taget
3. Unfold your target, right click(or control click) on the new target, choose "add existing files", then find the src you just copied. Do NOT check "Copy items into destination group's folder", because you've already copied it.
4. Compile your new target, if every thing goes well you should be able to get the .a file.
5. Drag the .a file to your project target -> link binary with libraries folder.
6. This step is optional, it depends on what type the third party src is. If it is c++ src, you have to rename your file which make directly calls to the third-party from .m to .mm.

I am hoping this could save you sometime to get your iPhone project up and running.

Apr 30, 2009

iPhone - provision and cert

Just a quick note if you have the same issues like I had.

After you finished debugging in your simulator, it is time for you to deploy on your device. You must have a developer ID and cert before you can do that. More details please read the official document. But even you followed every steps in the guide, you might be encounting some errors. I solved that by manually open the Info.plist with vim, then modify key "CFBundleIdentifier" to what is in your provision file. Save it, launch XCode. Then you should be good.

Another issue I had was if you get someone's Xcode project, and the owner happened deployed it to his/her devices, you will failed to deploy it to your device. To fix this, you have to do it in a terminal, open the project_home/project.xcodeproj/project.pbxproj. Search for "PROVISIONING_PROFILE...", then replace it with your profile identifier in the Organizer.

Apr 24, 2009

Developing Apps on iPhone

In the past two weeks I was extremely busy - I am diving into iPhone program development! I have a shopping list. I even bought a brand new iPhone 3G (Without the AT&T contract) from Apple local store.

So, let's go programing, baby!