Renaming a Plugin in Xcode

In this example we are going to change the name of an existing plugin, from "Template" to "PayPal? Store". You can of course use your own name.

We use three variations on this name: PayPalStorePlugin?, PayPalStore?, PayPal? Store,

So, for example you may be building a database plugin, so you might use: MySQLPlugin, MySQL, MySQL.

Follow the steps outlined below to convert an existing plugin to use a custom name.

1. Before opening the project file change the filename: (Do this in the Finder)

from: Template.xcodeproj to: PayPalStore?.xcodeproj

2. Change the name of the TemplatePlugin?.h file (Do this inside Xcode)

from: TemplatePlugin?.h to: PayPalStorePlugin?.h

3. Make the following changes in the TemplatePlugin?.h file.

from: @interface TemplatePlugin? : RWAbstractPlugin to: @interface PayPalStorePlugin? : RWAbstractPlugin

4. Change the name of the TemplatePlugin?.m file (Do this inside Xcode)

from: TemplatePlugin?.m to: PayPalStorePlugin?.m

5. Make the following changes in the TemplatePlugin?.m file.

from: #import "TemplatePlugin?.h" to: #import "PayPalStorePlugin?.h"

from: @implementation TemplatePlugin? to: @implementation PayPalStorePlugin?

from: [NSBundle loadNibNamed:@"Template" owner:self]; fo: [NSBundle loadNibNamed:@"PayPalStore" owner:self];

from: if (plugin = [[TemplatePlugin? alloc] init]){ to: if (plugin = [[PayPalStorePlugin? alloc] init]){

6. Change the name of the Nib file (Do this inside Xcode)

from: Template.nib to: PayPalStore?.nib

7. Make the following changes in theLocalizable.strings file.

from: "PluginName" = "Template"; to: "PluginName" = "PayPal? Store";

from: "PluginDescription" = "RapidWeaver Plugin Template"; to: "PluginDescription" = "The easy way to create a PayPal? Store";

from: "AuthorName" = "Realmac Software"; to: "AuthorName" = "Insert your name or you company name here";

8. Make the following changes in the Info.plist file.

from: <key>CFBundleName</key>

<string>Template</string>

to: <key>CFBundleName</key>

<string>PayPal? Store</string>

7. Get Info on the Template Target. (Press command-i on the the Template plugin, under Targets)

Click on the General tab and make the following changes:

from: Name: Template to Name: PayPal? Store

Click on the Build tab and make the following changes:

from: Product Name = Template to: Product Name = PayPal? Store

Click on the Properties tab and make the following changes:

from: Executable: Template to: Executable: PayPal? Store

from: Principle Class: TemplatePlugin? to: Principle Class: PayPalStorePlugin?

8. That's it.

Build the project and you should now have a fully working plugin installed at the following location: Library/Application/RapidWeaver