Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 16    Views: 136

AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
05/20/15 12:42 PM (9 years ago)

Looking to build a plugin

i found some code on GitHub that I would like to integrate into a Buzztouch iOS app. My programming skills are limited, Not sure where to start. Does anyone have any tips to get me going?
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
05/20/15 03:32 PM (9 years ago)
This is a must: Connecting your Plugin Control Panel to your BT Plugin Code https://www.buzztouch.com/files/howtos/CP2Project.pdf When you get more ambitious: Control Panel Child Items https://www.buzztouch.com/files/howtos/Child%20Items.pdf Read about app life cycle, for instance, here: http://stackoverflow.com/questions/6519847/what-is-the-life-cycle-of-an-iphone-application If this is your first time, learn about Xcode, then about Objective C, then about... Good luck!
 
MacApple
Apple Fan
Profile
Posts: 4674
Reg: Oct 25, 2010
USA
61,140
like
05/20/15 04:51 PM (9 years ago)
AlanMac - You've been around long enough, you can nail this. When you do all the Waldorf salad in the world shall be yours. #failedrhymingslang
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
05/20/15 05:45 PM (9 years ago)
When you create a BT Plugin, the 'plugin creator' (or whatever the name is called) just creates an empty 'BT_viewController', which is just a viewController for most intents and purposes. I usually migrate code from the github project into my BT_viewController. Some code will be unnecessary, some will be vital, and it will take a little work and play to get it going, but it's not too hard, it's mostly a matter of putting the right stuff in the right place. And that's where the fooling around with it comes in. Once you have it working, refer to the docs dusko recommends, for getting things working in a 'BT' way, and you should be ok. It sounds a lot easier than it is, but it's actually a lot easier than you would think. And the forum is your oyster. If you have problems, we're here to help. Cheers! -- Smug I cleaned out my dropbox recently; I'll replace the 'customSectionOne.html' as soon as I can.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
05/20/15 09:47 PM (9 years ago)
A lot of epiphanies and fireworks are in your near future. Look at a few of the existing plugin's to understand how things get done. Go back to Warren's video in Sept / Oct of 2012 where I asked David to customize the header image of the Menu plugin. That moment of teaching was an eye-opener for many of us on how to do ios coding and how to customize existing Plugins. Once you understand the "modify", then you will be able to "newly create" in rapid fashion. Adapting GitHub code into a Buzztouch plugin is an eye-opener. You are trying to discern the developers thoughts as to why they did things in certain ways. I did that just today on a 5-hour flight, slowly adapting a GitHub project into a new Cubbyholes capability. I kept having "aha!" Moments in how nicely the developer had anticipated gotchas. Don't worry about the Control Panel side of the house. Simply use your own handwritten JSON while you perfect the mobile code. Control Panel usually comes dead last for me in the timeline. -- Niraj
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
05/21/15 04:42 AM (9 years ago)
You can do it my friend! Make sure you give credit where credit is due! @Niraj: You have a link to that video? LA
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
05/21/15 06:14 AM (9 years ago)
Try these videos that Warren Evans had published back in 2012. They are very informative, I will have to watch some of them again! 1. Build a Plugin https://youtube.com/watch?v=OJrMVTn8z0s 2. Understanding JSON in your plugin https://youtube.com/watch?v=YrKcb4wa2EY 3. Connecting Apps to a Database https://youtube.com/watch?v=7ZkY6PTGhsA -- Niraj
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
05/21/15 06:16 AM (9 years ago)
By the way, here is a complete list of all of Warren's videos, including his car racing ones. Tap on the Videos button to see all of them. Then I sorted it from oldest to newest to get to the BuzzTouch videos. https://youtube.com/channel/UCsRTFb6OGuxePvOX3_bTukw -- Niraj
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
05/21/15 08:15 AM (9 years ago)
Thanks! LA
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
05/21/15 10:08 AM (9 years ago)
Thanks everyone for your help and guidance. A lot to take in and trawl through. I think Smug summed it up "It sounds a lot easier than it is, but it's actually a lot easier than you would think" I'm hoping! I managed to move the code into the blank screen plugin. It compiles, but now I need to find out how run it! I'll keep you posted. Cheers, Alan PS - MacApple, the nearest I've been to a Waldorf salad is Fawlty Towers.
 
MacApple
Apple Fan
Profile
Posts: 4674
Reg: Oct 25, 2010
USA
61,140
like
05/21/15 10:51 AM (9 years ago)
You win the prize AlanMac! That was the reference. Looking forward to seeing what you put together.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
05/23/15 07:47 AM (9 years ago)
Just a quick update to say I've gone through the video's (might have to do that again). I decided to try and pare the job back to basics. I have a working example of a non BT app. The functionality that it offers allows you to record video, switch from back camera to front camera and save one video at the end in a simple and straightforward manner. Could be a great plugin for the market (although I would worry about maintenance), but my first requirement is to shoehorn it into a BT app I am working on. I have created a basic 'hello world' BT app with just the BT_screen_blank plugin (as per one of David's video's. To start with, I thought have no control panel for it. Copy all the .m and .h code into my BT_screen_blank folder and reference the appropriate .h headers in the two bt_screen_blank plugin files. So far so good. Then I thought I could copy across code as needed into the BT_screen_blank.m. building it up into something that works. But everything I do results in compiler errors. In a nutshell, I don't know what I should be taking from the working app and where I should be putting it in BT_screen_blank.m. The video's are great for worked examples when David talks and he inspires confidence. But there is a big gap from there to the notion of taking code from a non BT app and knowing where to put it into Buzztouch. In recent video, David said that is how many of he plugins have come to be, but I am unaware of a worked example. If anyone has anything they can sugggest on that, as Frasier would say, I'm listening...
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
05/23/15 08:20 AM (9 years ago)
What is the Github project? -- Niraj
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
05/23/15 08:49 AM (9 years ago)
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
05/23/15 09:58 AM (9 years ago)
Mulling over the code a little (very little; I'm on vacation and having a great time, lol!) I'd do this: 1) Don't worry about the example appDelegate.m and .h files 2) Import the PBJ class files into your project plugin directory, just as you would any BT Plugin (drag the files into your blank plugin directory while xcode is running. Make sure the targets and copy options are correctly selected) 3) from there, use the code in the 'read me' in your BT_pluginBlank.m file, and create a companion xib file (or via code) to create a few buttons and such to initiate some of the methods. It may not be 'exactly' on the mark, but it's what I would do as a start, and from there you can find out what works better than others... Let us know how you faire. Cheers! -- Smug
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
05/23/15 10:07 AM (9 years ago)
Will do. Thanks again for all the tips, I'll keep plugging/plug-in away (could not resist that) Alan
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
07/23/15 05:40 AM (9 years ago)
A long road but I finally made it. https://www.buzztouch.com/forum/thread.php?fid=FF0196AAA37550406BB22B9&tid=FF0196AAA37550406BB22B9 Thanks everybody for your help and support.
 

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.