amysus
Lost but trying
Profile
Posts: 90
Reg: Oct 28, 2011
traveling the w...
3,650
06/11/16 02:05 PM (8 years ago)

How to Organize Files

I know myself and am about to create a big mess of files ... I am seeking education and guidance on how to organize as well as how the iOS simulator and BT work together. For example, if I download my project for testing, launch it and drag things in (plugins, assets, etc) and also modify some code as instructed (for any particular plugin), and then I redownload the project ... what happens to all of that customization? Must I start all over again, editing files and dragging in assets? Is there a better way? Thank you. Amy
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
06/11/16 08:10 PM (8 years ago)
Its gone if you redownload the project. It doesnt sync your changes to the server. You can just save that file and copy and paste it in place of the more recently downloaded project. You can also make scripts and/or use git, svn, etc in xcode.
 
amysus
Lost but trying
Profile
Posts: 90
Reg: Oct 28, 2011
traveling the w...
3,650
like
06/11/16 09:35 PM (8 years ago)
Thanks CMCoffee. I need to figure out some system or I'm going to start getting really confused - too many versions.
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
06/12/16 02:33 AM (8 years ago)
Make a habit to write down each and every change you make, especially if you are changing core BT files. If you change a plugin (per instructions or on your own), you should "return them back" to the server. This makes sense only if you are on the self hosted BT server. By "returning them back" I mean changing the code of the plugin and uploading it to the BT server so that it can be downloaded correctly the next time. Whichever files you changed, you need to upload back to the proper place. In particular, the most often changed part of the plugin will be the .m files. You need to find out all the occurrences of the _appDelegate variable and turn it into BT_appDelegate. For instance, if your app is called fieldResearch, in most of the .m files you will find a variable called fieldResearch_appDelegate. Change them globally to BT_appDelegate, then upload the changed file to its place in the folder structure of the plugins. The best tool to do so is FileZilla, although you can use any other FTP file manager. If you have changed the .h files too, you need to upload them as well. Typically, they will not contain the _appDelegate variable, so no need to change it at all. If you want to include graphics (images, icons etc.) into the project, upload them to one of the plugins that you are sure your app will reference, use and consequently, download. If you prefer, you can hold them in the BT_images folder, as that will be always downloaded from the server. If you have, say, two images with the same name and try to pack them into two different folders on the server, only one of them will be found at run time, so watch out. You cannot change the core files from the BT_core folder, so you will have to -- change them manually and locally, or -- save changed files somewhere on the local disc and copy them into the project, or -- create a script that will do it for you. Creating scripts is the way to go, if you have more than a handful of apps. Recently, I have published a series of medical apps for Android, 53 of them so far. They all had to be downloaded from the BT server at first, but the very thought of changing a few lines here or there in a plugin or two, upload it to the server, download it all again etc. was daunting. I created a PHP script, running atop of XAMPP, which changed everything for all 53 local folders. Need to add a new plugin? No problem, copy its files to 53 folders, change AdMob codes for each of them, and that's it -- 53 apps again ready to be uploaded to Google Play. Not much of this will be available to you if you are not on a self hosted server, so installing it is the first step towards a liberating experience that we all have when using Buzztouch!
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
06/12/16 06:47 AM (8 years ago)
Keep in mind the 'Buzztouch mentality' when you start to modify those files. The only thing you're 'really' doing, is changing the BT configuration file. Everything else is typically 'generic'. The core files will remain pretty much the same. Only the addition (or removal) of plugins and the BT_config.txt file is really 'whats going on' when you download a new package. Sooo.... 1) the first thing I do when I download a project is 'clean it' of any deprecated code 'for the target'. (sometimes, if you're compiling for iOS7, things work great. If it's not broke, don't fix it). Get it free of warnings (or errors) before adding any other plugins. Not required; just something I do. 2) If I add or remove any plugins, I don't replace the entire project; I replace (or add) the required additional plugins. Sometimes from a new download. Having only 'one' working copy of the project allows me to delete un-needed files from other downloads, without fear that I've just deleted something important. 3) Now that you're a BT member (congrats!) you can 'create' plugins. Sometimes, I'm not actually 'creating' a plugin, but basically 'reworking' an existing plugin with different features. I use this solely for my own needs, and it allows me to have 'multiple' versions of a plugin in the same project. As you will find out eventually, a single 'class' (aka plugin) will be re-used if more than one screen uses that plugin. So if you modify one, you modify 'all'. Sometimes a good thing. Sometimes not. So I make versions. Just don't try and sell it if it's based on someone else's code. Or use 'git' or some other software 'versioning' tools. There are some built into Xcode if you want to learn. Good Luck with whatever method you end up with. It'll change over time; they all do. Cheers! -- Smug
 

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.