Change Phonegap project to reflect your app name

Phonegap is a nice framework for webdevelopers. It helps to build a native iPhone (and other devices) app using what you already know.

But the submission to Appstore  can be a pain due to some app reviewers that consider PhoneGap as “private api”.

The single way to avoid this is to change any reference to PhoneGap inside the code. It’s not simple but can save you a few weeks of waiting.

Steps to changing the app name:

( considering our app named “Myapp“)

1. copy the phonegap project to another folder – Myapp.

2. change PhoneGap_Prefix.pch file name to Myapp_Prefix.pch

3. Change PhoneGap.xcodeproj file name to Myapp.xcodeproj

4. Delete the build folder

5. Rightclick on Myapp.xcodeproj ->Show Package Contents

6. Open your_user.pbxuser with a texteditor(textmate ?) and do a search replace for all  PhoneGap to Myapp ( no matter if is alone or inside a string).

7. Open project.pbxproj with a texteditor and do a search replace for all PhoneGap to Myapp ( no matter if is alone or inside a string).

8. Open MainWindow.xib with a texteditor and do a search replace for all PhoneGap to Myapp ( no matter if is alone or inside a string).

9. Open Myapp.xcodeproj in Xcode.

10. Rename here, in Xcode using rightclick-> rename all the files in Classes folder that contains PhoneGap in name with Myapp ( for example PhoneGapDelegate.h to MyappDelegate.h )

11. File by file, in folder Classes, replace inside any PhoneGap string with Myapp

12. Do a Clean all.

13. Do a Build and Go ( and pray :) )

 

This should be all.