phonegap

 

Replacing All References to PhoneGap to Reflect Your App's Name

Page history last edited by Bowman9991 1 mo ago

 

IGNORE THIS STEP AS LONG AS YOU ARE USING PHONEGAP VERSION 0.8.0 THIS VERSION OF PHONEGAP HAS RECENTLY BEEN ACCEPTED BY APPLE.

 

This article was lifted from this blog post: http://cssgallery.info/change-phonegap-project-to-reflect-your-app-name/

 

Introduction

Phonegap is a nice framework for web developers. 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 a “private api”. The single way to avoid this is to change any reference to PhoneGap inside the code. It is not simple, but it can save you few weeks of waiting.

 

Steps:

First consider that our app is 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. Right click on Myapp.xcodeproj ->Show Package Contents
  6. Open your_user.pbxuser with a text editor and do a search and replace for all PhoneGap to Myapp (no matter if is alone or inside a string)
  7. Open project.pbxproj with a text editor and do a search and replace for all PhoneGap to Myapp (no matter if is alone or inside a string)
  8. Open MainWindow.xib with a text editor and do a search and replace for all PhoneGap to Myapp (no matter if is alone or inside a string)
  9. Open Myapp.xcodeproj in Xcode
  10. In Xcode, use rightclick->rename all the files in the Classes folder that contains PhoneGap to Myapp (for example PhoneGapDelegate.h to MyappDelegate.h)
  11. File by file, in the folder Classes, replace inside any PhoneGap string with Myapp
  12. Rename PhoneGap.plist to Myapp.plist
  13. Do a Clean all
  14. Do a Build and Go (and pray :) )

Comments (6)

profile picture

rborn said

at 12:48 pm on Apr 16, 2009

profile picture

Scott Motte said

at 7:49 pm on Aug 17, 2009

I recommend doing this now instead: http://github.com/scottmotte/phoneungap/tree/master (there are more steps than the wiki mentions)

profile picture

Wuff said

at 8:14 pm on Oct 9, 2009

@Scott Motte - thank you for this, very elegant solution.

profile picture

Chris J said

at 11:19 am on Oct 13, 2009

Can somebody give me a dumbed down version on how to use this script please. Thank you

profile picture

Michael Nachbaur said

at 11:26 am on Oct 13, 2009

This script is no longer necessary, since PhoneGap has been officially accepted by Apple. See http://nachbaur.com/blog/phonegap-officially-permitted-on-the-app-store for more information.

You should still rename your xcodeproject project name, and should change your application (*.app) and target names. But all this can be done from the GUI.

profile picture

Wuff said

at 5:13 pm on Oct 13, 2009

Oh - wow, okay. Congrat's and thank-you for the update. :)
I've made sure to download the latest version and transferred my 'www' folder and 'Default.png' file to that.

(Maybe this page should be removed, or updated to reference your blog post?)

You don't have permission to comment on this page.