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.


5 Responses
Thanks for the heads up!
Would have never of thought of doing this, but thanks again hopefully my app goes through ok!
Very helpful for anyone who wants to get their app through to the App store.
Makes me wonder if devs who use PhoneGap to sell (or at least give away) their app in the store without any reference to the framework feel bad for not giving credit to the great guys over at PhoneGap.
@Tanner
What can I say, some of them make some buzz on the internet about PhoneGap, some of them bring their knowledge on the wiki and discussion group, some of them put a link somewhere to PhoneGap, and some of them don’t.
every time i follow these step, it cannot open xcode on step number 9 because of “Unable to Open Project
Project … cannot be opened because the project file cannot be parsed.”.
i’ve tried it twice (luckily i backed it up both times just in case).
anyone know whats wrong?
James, this post is outdated, Apple accepts now Phonegap projects without any kind of problems, so you can use what you get from Phonegap directly.