Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 20    Views: 83

Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
07/02/12 07:53 AM (13 years ago)

Create Duplicate BT App from an Existing BT Project

Hi I know this question has been asked many times, but I just cannot find any of the previous post added in the forum, so I'm afraid I have to ask the question again. What is the best way to duplicate a project without having to go through the whole process of creating an app from scratch? Are there any advantages or disadvantages to doing so?
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
07/02/12 08:13 AM (13 years ago)
you can copy/paste the BT_config.txt from one project to another. This will duplicate the entire "structure" of the app. But it wont allow you to control anything from the control panel. You'd have to make any modifications to your app manually within that same BT_config.txt. Completely do-able if you know what you're doing. But just as easy to mess up if you don't :)
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
07/02/12 09:35 AM (13 years ago)
Ok Stobe, make sense, would I need to remove the data url to BT? and would I simply just duplicate my app project open up in xcode for example and past the config data into the config file? If I'm making any sense.
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
07/02/12 09:39 AM (13 years ago)
Yes. you can actually skip the first couple of sections in the BT_Config.txt if you want, and start with the BT_Items. But you're right, make sure you remove any connection via the dataURL, or else it will be looking to overwrite your existing config with BT's version.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
07/02/12 09:43 AM (13 years ago)
Depends on what you mean by duplicate. Create app. Leave app online (Don't remove repotToCloud URL) Download source code. Louie's pizza Duplicate source code. Artie's pizza Duplicate source code. Artie's pizza (perhaps in Italian) Use different resources for each app. Publish three apps. 1. Louie's Pizza 2. Artie's Pizza 3. Pizza di Artie App structure is identical but content is different. Any changes in the control panel will be displayed in the three versions. There are many ways to play with this. Third party online Config file. Online vs. Offline Config file. Fred
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
07/02/12 10:03 AM (13 years ago)
I like this, I'm looking to do the same, since I havent gone around with the localization issue. How would you suggest Fred, if one would wont to publish two apps structure identical but contec diferent, in my case, just a diferent language? Thanks.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
07/02/12 10:14 AM (13 years ago)
That's certainly one way to do it. Only downside is each app has it's own stats. By localizing the one app will show more downloads. Fred
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
07/02/12 10:19 AM (13 years ago)
Hi Fred what you have stated is exactly how I want to do it. In regards to the number of downloads, if you remove the BT data url, would this remove that issue?
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
07/02/12 10:30 AM (13 years ago)
That's true. But from what I've understood from what I read for localization, it seems a lot of hard work o localize an app. I'd have to make changes for every single screen. I mean, the app is configured to open a certain URL for a file. I'd have to have it open a different URL dependeding on the language. Having to add all this via Xcode, or so I understood.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
07/02/12 10:49 AM (13 years ago)
To have it open a different URL, you would need to modify the Config file as Strobe suggested. Fred
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
07/02/12 10:52 AM (13 years ago)
To avoid having to modify the Config file you could place URL in a html doc and use the Custom HTML doc screen. Just place different HTML docs using the same file name in the appropriate source code files. Fred
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
07/02/12 10:57 AM (13 years ago)
Having two apps identical in structure, but differing in content is fairly easy. What I do is: -Create the first app in BT's control panel and download the source. -Create all the content for the first app (html docs, header images, buttons, media, etc). -Add content to xCode (this would work for android as well, I suppose). -Compile - Done with first app. -Create the second (blank) app in BT's control panel. -Before downloading the source, delete the dataURL and report-to URL from the core properties. -Download second app's source. -Copy all the BT_items JSON from the first app's BT_Config.txt -Paste it into the second app's BT_Config.txt in xCode. -Create new content for the second app, and name everything the same as the first app's content. -Add content to xCode -Compile - Done with second app. Hopefully I didn't miss any steps. They all work in my head :) I have another secret method that I use often, but it might open a wormhole in the forums and suck me in (answering support questions about it). So stick with this method instead. -Stobe
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
07/02/12 01:12 PM (13 years ago)
would it not be easier to just duplicate the first app project and then do the above or have missed something here? What would the point be to create an empty BT project and download source code; I assume by adding the first app project config data into the second app project will not make all the screens app in the BT control panel for the 2nd app. Or am I wrong? I hope you are still with me, felt like I lost myself then!
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
07/02/12 01:16 PM (13 years ago)
The difference is that almost every source file in the xCode project references the app delegate by name. I prefer to keep these separate, although I'm not sure if its necessary or not. Another reason is, if you create the new app (or re-purpose an existing app in your control panel), and upload the icon before downloading, this saves a step of using an icon resizer to create all your app icons.
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
07/27/12 05:36 AM (13 years ago)
Hi Stobe another question in regards to your duplication, with the second project (duplicate) when you copied and past the config file to the second app, did you remove the data and report URLs from it?
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
07/27/12 06:24 AM (13 years ago)
I'm guessing you shouldn't have two different apps pointing to the same data URL (since its looking at a particular set of instructions in the control panel). So you'd either want to point them to different configs elsewhere (dropbox, etc). or "Hard Code" the configs in the project builds (xcode, eclipse) and make them "offline"
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
07/27/12 07:29 AM (13 years ago)
Hi Stobe successfully duplicated my app with no issues following your advice, by creating an empty BT shell. Great stuff! Bit confused about how I can change the HTML 5 pages I have within the framework, but that's a minor. Thanks again, good advice!
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
07/27/12 08:08 AM (13 years ago)
Bit confused about how I can change the HTML 5 pages I suppose you're referring to the BT HTML Custom Text screen. If so, that'll be a bit of a problem. Could be done several ways. Fred
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
07/27/12 08:19 AM (13 years ago)
If they are "html custom text" screens, then my suggestion is : REPLACE THEM! With "HTML Doc" screens. (or URLs, if they need to be more dynamic.) My 2 cents.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
07/27/12 09:01 AM (13 years ago)
IMO, that would be the preferred method, just be sure to use same name for embedded html doc. In app #1 embedded doc name would be Sam.html In app #2 embedded doc name would be Sam.html One could replace the links in the Config file. (Not recommended simply because it could be a lot of work.) (HTML Docs would be easier.) For Online HTML Docs here's my suggestion. Create HTML Doc screen using embedded HTML Doc. Name of doc is unimportant, but each app will havean HTML doc using the same name. Let's call it "Bob. html" Place Bob.html doc in BT_Assets folder. Place Bob.html doc version #2 in app #2. You customize Bob.html for each app.
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
07/27/12 10:55 AM (13 years ago)
Hi guys thanks again for the feedback. I decided to make the HTML screens CUSTOM URL screens instead, saves me a load of headache. Duplication works like a charm, depending on the screens BT users select for their apps.
 

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.