Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 4    Views: 59

PaddyO
Lost but trying
Profile
Posts: 189
Reg: Sep 11, 2013
Geelong
5,190
03/31/14 09:19 PM (10 years ago)

Importance of development sequence when customising?

Hi all, I think I just learned something (the hard way) - is this right? 1. If I customise my views inside Xcode with code mods, I should do that as the absolute last step in development of my app, because... 2. If I need to subsequently re-arrange BT Control Panel things (eg changing screen relationships, adding a new plugin etc), then when I download the 'new' re-published app package with those changes made, any custom code changes I made in Xcode won't be in my 'new' package. Furthermore, I can't just reserve those modded files and replace the 'new' ones with the old ones I changed, because there's other stuff that's going on in some of those files that means I need the 'new' versions. And then I have to re-mod the code if I want my old mods back again. I really hope I'm wrong... but feel free to hit me with the bad news. :) Cheers Paddy. (Is it beer o'clock yet?)
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
03/31/14 10:45 PM (10 years ago)
beer thirty? (checks watch) It is somewhere. I suspect everyone has their own work flow. And I'm a big proponent of 'whatever works best for you'. But when I do make modifications in code I'm usually not putting them within the 'standard' methods… meaning, I won't put code in my viewWillAppear, but what I will do is create my own method, and call that method from viewWillAppear. so I'll do something like create a method: -(void)customizeMyWhatever { // all my custom iOS goodness inside } and in my viewWillAppear (or whatever method) I will insert: -(void)appropriateMethod { //stuff before if there was... customizeMyWindow; // stuff after if there is… } So if I do download a new edition I don't have to do as much hunting when/if I need to make a transfer. It also makes it easy to 'turn on or off' your code (by commenting out the call) to troubleshoot or see various changes implemented. another thing I do is I use an 'online editor' like Text Wrangler (mac) or Notepad++ (win) to edit my plugin files. Online. This way, I can save them on my self hosted server, and any modifications or updates I've customized are in each new download as well. That's a big time saver. I'm not perfect, and it's all a big learning process for me too. I'd be interested to hear how others do 'project management' before and during the app cycle. Cheers! -- Smug Edit: Now that BT is in v3 I hardly ever 'redownload' a package once I have it. Any new plugins I add will be manually edited to fit the appDelegate calls (which is usually the case). I also regularly change my 'BT_config.txt' file for a new copy. A lot, actually. This keeps the 'initial' load fresh. However, if you don't feel comfortable making manual edits, download a new copy of the package, and only change out the plugins. The core code rarely changes. This is pertinent if you make NavBar and other 'global' appearance alterations. I usually make these changes when Xcode is not running, and clean my project regularly.
 
PaddyO
Lost but trying
Profile
Posts: 189
Reg: Sep 11, 2013
Geelong
5,190
like
04/01/14 12:12 AM (10 years ago)
Some great suggestions in there Smug, thanks! Making new methods as their own files and referencing them that way is brilliant. I think I'm only half as worried now as I was - you've saved me a heap of time. (Again.) Cheers Paddy.
 
NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
like
04/01/14 07:38 PM (10 years ago)
When you have to make your changes in-line in the code and can't call a new method like Smug suggested (which is a great idea)- you could also resort to an old school commenting method that makes it easier to find all of your edits. When ever you add new lines, use comments that start with a standard string like: "//Paddy ". or if changes are in a line put it at the end //Paddy. Really helps find your code changes in a current file or Project quickly ;)
 
PaddyO
Lost but trying
Profile
Posts: 189
Reg: Sep 11, 2013
Geelong
5,190
like
04/01/14 07:57 PM (10 years ago)
NCbuzz awesome! Luckily I didn't ditch the old stuff before copying it over into a million txt files so I have a little cache of nuggets that I can bring in again. Definitely commenting as you suggested, thanks. Cheers Paddy.
 

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.