Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 8    Views: 131

lady_di
Aspiring developer
Profile
Posts: 31
Reg: Feb 06, 2013
Geelong, VIC
310
02/25/14 04:00 PM (10 years ago)

Best way to add Notepad Feature plugin to Xcode

Hi, I have decided to add the notepad feature to a project that I have been working on in Xcode. The plugin has been downloaded to Buzztouch but not to Xcode. What is the best way to add the BT_plugin files for the notepad feature to Xcode?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/25/14 04:12 PM (10 years ago)
Usually 'dragging' the plugin into my project with the rest of them is the 'suggested' method. If you mean that you've already downloaded a project and 'now' wish to add an additional plugin, there a couple of ways… 1) redownload your project, ensuring the 'notepad' plugin is checked… and drag it in with the rest of the plugins during project preparation. 2) manually adding the plugin, and taking only the iOS files and adding them to your project, and editing the code (changing your appDelegate references). You can get a copy of only the plugin by going to your *BT* control panel, select the 'installed plugins' menu, and downloading a 'self hosted copy'. This will bring a copy to your local computer, and you can unzip and go from there. Cheers! -- Smug
 
lady_di
Aspiring developer
Profile
Posts: 31
Reg: Feb 06, 2013
Geelong, VIC
310
like
02/25/14 06:00 PM (10 years ago)
Thanks Smug. I have downloaded the project again and dragged the notepad folder to bt_plugins in Xcode using finder. When I run a clean and build its now showing errors? Have I missed a step?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/25/14 06:11 PM (10 years ago)
Well, possibly ;) It depends on the errors. What are they? If they have to do with 'appDelegate' remember that when you download a 'complete' package from BT, *all* of the plugins have been slightly 'amended' to work with your project. What happens is, a 'standard' plugin will use 'BT_appDelegate' as the appDelegate alias. When a package is prepared for download, the BT Machine will parse through *all* the code, and replace 'BT_appDelegate' with <yourAppName>_appDelegate. So, if you add a plugin 'after' the download, there are still some edits to be made, usually. If you're getting errors, and it's due to some 'appDelegate' issue, you probably need to replace "BT" with your app name. For instance, if your app is named 'MyCoolApp', then you need to search/replace "BT_appDelegate" with "MyCoolApp_appDelegate". You can look at a couple of other plugins and see how they're doing it if you want to see a 'real' example... Let me know how things go… Cheers! -- Smug When you say 'dragged them in using finder', do you mean a normal finder copy/move? What should be happening is you have Xcode running, with your project open. you would 'click and drag' the directory or files into 'the running Xcode project', typically in the plugins directory. Xcode would then put up a dialog box asking you if you wanted to add the files to your project, and checkboxes for copying the files, and a couple of other things… You would 'check' the box so that it *would* copy the files into your project, and press the 'ok' button to accept the new files. without doing a *lot* of edits in other xcode files, this is the easiest (and most recommended) way of adding new files (typically plugins, but it also applies to images, documents, and everything else 'not' included with your project). And apologies if this is the way you do it. But I had to ask. :)
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
02/26/14 03:10 AM (10 years ago)
Hi @lady_di It sounds like something is going wrong in the way you are adding the plugin files to your project. The last version of Buzztouch used to include a file instructions.pdf in the download to help us remember the manual steps, it seems to have gone missing following latest update. I've put a copy of the old one here - it isn't up to date, but the changes are minor. https://dl.dropboxusercontent.com/u/44302941/instructions.pdf I can't promise it will stay here forever but it's worth looking at. What I immediately after downloading the project is to load it up in xcode and drag the whole BT_Plugins folder and BT_Images folder into the xcode project (the others that this instructions.pdf suggests are no longer copied). Let us know how you get on, Alan
 
lady_di
Aspiring developer
Profile
Posts: 31
Reg: Feb 06, 2013
Geelong, VIC
310
like
02/26/14 08:00 PM (10 years ago)
Thanks The error it is displaying is /Users/user/Downloads/winemapz_iOS/BT_Plugins/notepad_feature/Notepad_feature.m:70:19: Property 'rootDevice' not found on object of type 'winemapz_appDelegate *' Any ideas?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/28/14 08:38 PM (10 years ago)
Oh. Root Device. They syntax has changed a bit… 'depending' on the exact call… it could be something like 'appDelegate.rootDevice.deviceLatitude' anything that contains 'rootApp' will probably need some editing… take 'rootApp' out of the equation, and search for a similar call to obtain the correct syntax… or give a yell on the forums. Cheers! -- Smug
 
lady_di
Aspiring developer
Profile
Posts: 31
Reg: Feb 06, 2013
Geelong, VIC
310
like
03/03/14 03:07 PM (10 years ago)
Oh dear. Code and I don't seem to be a good mix. I found adding rootApp to the the following ([appDelegate.rootApp.DeviceisIPad]) removed the errors however they starting poping up throughout the project not just in the note pad feature. Now I have inserted rootApp to all the errors that came up, the errors relating to root device have now gone but the project now has one error. linker command failed with exit code 1 (use -v to see invocation) Worried I have made messed with the code a little too much.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
03/03/14 03:53 PM (10 years ago)
Hi I don't know enough about codeto help here I'm afraid. All I can say is that I have used the notepad plugin with none of the complications or fixes you are going through. I can't help thinking there is something more fundamental going on; you shouldn't need to mess with code to get this going.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.