Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 27    Views: 74

stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
11/10/13 04:09 PM (12 years ago)

Programming question

Don't now if this can be done directly through BT or if there's a plug-in or if I'll have to throw in some Javascript but here is my dilemma: A have an app that displays an html page with text and an image, allows through javascript for the user to input replacement text and then displays the revised html page on the screen with the image and new text. I'd like to email or text this page to the user. Right now, I'm taking a screen shot and then using a link to the native text screen or using Marks email an image plug in to send it as an email with the user adding this screenshot from their camera roll where it resides after the screen shot. This is not very elegant. I'd like to take the revised screen and enter it as it appears on screen into a text or email without doing the screen shot. Any way via what's already available in BT or can someone give me an idea where to begin if javascript is needed. Thanks. Steve
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/10/13 04:17 PM (12 years ago)
Not sure how to do it with Javascript. You might want to look into using email and sending the entire modified page as an attachment. Snoop around the BT_screen_htmlDoc plugin; there is code inside to send the sheet as an attachment via email… whatever you need will probably be in there somewhere… start off in an area called 'action sheet delegate methods'. Cheers! -- Smug
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
11/10/13 09:53 PM (12 years ago)
I would do as smug suggests, but wanted to quickly reply and say your solution, although not elegant, sounded pretty clever to me. Perhaps you could streamline it more? David https://buzztouchmods.com/market
 
stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
like
11/11/13 05:46 PM (12 years ago)
Don't know enough about the ios SDK, objective C, etc. to examine that BT_screen_htmlDoc plugin. That is, after all, while I chose BT to begin with. I do know some javascript which is where I was hoping I could start doing this job. However, if David or someone figures out a plugin that would do the trick, I'm in. Steve
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
11/11/13 06:16 PM (12 years ago)
Gotcha.. might need to keep diggin' David https://buzztouchmods.com/market
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/11/13 06:22 PM (12 years ago)
Well… if you can accomplish this with JavaScript, why not use an HTMLDoc plugin, and enable the 'email' function (In the Plugin Control Panel). Then just script your desires in the HTML Page, to be implemented within your BT Project. Would that do what you need? Cheers! -- Smug
 
stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
like
11/11/13 06:49 PM (12 years ago)
Smug, I clicked the option on the html doc plug in to allow emails and indeed the email icon appears at the bottom of my screen but two problems. 1) the email sends the original html file that's saved in BT_docs, not the amended html file now on display on the iPhone screen which has the user supplied text. 2) when I touch the lhtml link that appears in the sent email, the html file opens only showing text, not the background image, of course, that is on the screen. That is which I really need a screenshot. I suppose I can chandler the html to include a background image as opposed to it being in the BT screen but I tried that earlier without success. I can try again but thus still doesn't solve 1) above. BTW - this app is pending review in App Store. I should probably not be changing anything in the control panels while it's there, right? I think there's a way if playing with the app in BT without it updating live. Can someone explain how that works! Thanks. Steve
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/11/13 06:59 PM (12 years ago)
If you submitted the app with a 'Live Mode' configuration, as long as you don't publish, you're good; no one with a 'release' version of the app will notice any un published changes. If you left it in 'Design' mode, then you don't want to be making any changes until after the app approval. Cheers! -- Smug
 
stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
like
11/11/13 07:05 PM (12 years ago)
OK I'm a bit nervous here. The app was sent to Apple yesterday, in design mode. The status at the moment is waiting for review. An hour ago I made a change to the control panel. Then I reversed all the changes made so it now is back to the original. Will this screw up Apple's review when it starts?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/11/13 07:14 PM (12 years ago)
Nope. You should be ok, providing all of the changes were reverted to original. They 'may' get a dialog stating the app config has changed, do they want to reload, etc… But if your content is good, you'll be good. Sometimes I wonder if they even bother to refresh; My recent app was rejected, I fixed the issue in the control panel, and they rejected it again for the same reason. I resubmitted a 'fixed binary' and it was approved. Think about resubmitting a "Design" mode edition before they get to your app. I'm really not sure if you'll 'lose your place in line' or not. I'd be interested to know for sure, if anyone happens to know. Cheers! -- Smug
 
stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
like
11/11/13 07:26 PM (12 years ago)
If I resubmit a design mode edition, which is what the original was in the first place, do I just go to the apple site, delete my submission, and then submit the same archive that got approved in the first place, or do I have to re-archive and then submit? And if I'm going to go through the trouble of resubmitting, why not resubmit a live version? I really don't quite understand this stuff.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/11/13 07:29 PM (12 years ago)
Oops. That's my bad. I should have said "Live" mode resumission. You're correct in questioning that. You'll need to create a new binary that has the Live config embedded in it, and archive/resubmit. Cheers! -- Smug
 
stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
like
11/11/13 07:31 PM (12 years ago)
So, to summarize, I should go to Xcode, change the current mode to Live (I assume I need the capital), then archive, etc. and submit? I do have to delete the current one from the apple site too, right?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/11/13 07:42 PM (12 years ago)
Yes. 1) Make sure your app currently works as desired. 2) Go to your BT control panel, and choose the 'configuration data' tab ('json data' in self hosted) 3) By default it shows 'Design Mode'. Click on the link 'show Live Mode Data'. 4) Select the live mode data. All of it. Copy it to your clipboard. 5) Paste it into Jsonlint.com to make sure it's good data, as well as provide a more legible format. 5) Copy the formatted 'Live Mode' data and paste it over the existing BT_config.txt file, effectively replacing the old data with your new 'Live' mode data. 6) Rebuild and test your app one more time. Heck, two more times. 7) Delete the existing app in your Apple Control Panel. Prepare to re-submit the same way as you did the previous app. 8) Archive, Verify, and Upload your new version the same was as the other one. 9) That should be it. Hopefully none of the small details are missing, and if they are, they're self-explanatory. But let me know if not. Cheers! -- Smug
 
stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
like
11/11/13 07:46 PM (12 years ago)
The live mode data does not exist.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/11/13 07:47 PM (12 years ago)
Are you self hosted? And if so, are you running an earlier version? Something before 2.1.9? Cheers! -- Smug
 
stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
like
11/11/13 07:51 PM (12 years ago)
Not self hosted.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/11/13 07:55 PM (12 years ago)
Hmm… Don't know what to say. I just checked my BT host panel, and opened up my test app… There's Design mode data, and there's live mode data. It should look sort of like this above the display box: >Show Design Mode Data | Live Mode Data And that 'Live Mode Data' is a link to change the config file to a Live Mode file. You're not getting this? Or does it display 'no' data at all…? Cheers! -- Smug
 
stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
like
11/11/13 07:59 PM (12 years ago)
When I go to configuration data for the app, there are two choices, Show Design MOde Data and Live Mode Data. When I click on Live Mode Data, I get the message {"status":"live version of config file does not exist?"}
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/11/13 08:43 PM (12 years ago)
I'd talk to David. Thats odd. For the moment, leave it be and don't make any changes in the app you're having reviewed. You can update later if you have to. Cheers! -- Smug
 
stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
like
11/11/13 08:46 PM (12 years ago)
Ok. I'll post to the group in general to see what they think. Still not sure why I couldn't just go to Xcode, change mode to live there and the re- archive and resubmit. Don't see why I need to go back to BT.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/11/13 08:52 PM (12 years ago)
Well, the theory is you can… But if your app 'calls home' and requests new data that doesn't exist, your app will throw up an error dialog. Can't say if it will, can't say if it won't. But what if it does? How willing are you to take that chance? Cheers! -- Smug
 
stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
like
11/11/13 08:56 PM (12 years ago)
Oh well, I'll just leave things be and see what happens. Thanks for all the help.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/11/13 09:04 PM (12 years ago)
I just thought of something… If you've never published before, it may not have created any live data. Since your app is already in Design mode, it won't have any effect on your current submissions. Try going to the 'publish' tab in your BT control panel, and 'publish' your configuration. Then check to see if it created any new data in the 'configuration data' page… Just a thought. Cheers! -- Smug
 
stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
like
11/11/13 09:11 PM (12 years ago)
Won't hitting publish, since my app was submitted in design mode, push the two changes I made (the original change and then the undoing of the change) to the app that might be seen when Apple reviews it. In theory they will see the first change I made already since it's in design mode. Won't publishing show them the second one too? As you can see I have not quite wrapped my head around this yet.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/11/13 09:20 PM (12 years ago)
Publish only affects configurations in 'Live' mode. Since you don't *have* a live mode, it won't affect your submissions. However, it's possible that you won't *get* a live mode configuration, until the first publish. Don't make any changes to your configuration; just publish. The dot should be red. When you publish, it will turn green. Then go over to the configuration and see if it created a Live mode config from your 'published' data. The whole publishing thing started in 2.1.9 What it does is, provides two 'modes'. Live and Design. Design mode is used by default. Any change in your control panel will be seen in your app. This is the way it has behaved since the beginning. But now we have 'Live' mode. In order to allow developers to make small changes to their config, and test them without exposing the world to your attempts, you 'release' your app in Live Mode. And if you do not hit the 'publish' button, the users will live on using the last published version of your config. You can test and design all day and see your changes in an app that is using a 'design' mode configuration. As long as you don't press the 'publish' button, your changes will not be seen by the 'release' (Live) version users. the 'version number' field next to the publish button does NOTHING within buzztouch. it is merely a value that YOU can keep track of, for your own tracking purposes. You don't have to use it. And it has nothing to do with the version of your app. That is coded in the binary, and no amount of changing the config will make a difference. Cheers! -- Smug
 
stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
like
11/11/13 10:33 PM (12 years ago)
Thanks Smug, resubmitted and all went well. Am now in Live mode as far as Apple is concerned. Not going to do anything until they accept it. After that, if I understand correctly, I go to Xcode's config file and change Live to Design, go about all my changes to panel, hook up my own phone to test it on, and if I want to finally push out any changes, Hit publish and it's done. Correct?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/11/13 10:42 PM (12 years ago)
Yes, In your xcode project, change 'Live' to 'Design' while testing on your devices. All changes in the control panel will be realized on any device running a 'Design' configuration. When you're happy with the way things are, pressing 'Publish' will prepare a new 'Live' configuration, and the next time the user starts the app and it checks into the Server, it will know there is a new configuration available, and notify the user. The user will then press 'ok' to download the new configuration thus implementing your changes. 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.