Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 25    Views: 121

SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
08/30/14 08:22 AM (9 years ago)

New Plugin: SmugEula Splash Screen for BTv3 iOS/Android

For iOS and Android, the SmugEula is a simple Eula that displays on startup, and requires a user to acknowledge acceptance to continue. Failure to do so will ultimately result in the user 'backing out' of the app. User can email Eula via device email. https://www.buzztouch.com/plugins/plugin.php?pid=4A1FE7BE43DF0F060E36B00 Cheers! -- Smug PS, I didn't bother with BTv2 for anything, so it's BTv3 only...
 
RogueWave
Aspiring developer
Profile
Posts: 337
Reg: Jan 23, 2013
Park City
5,120
like
08/30/14 09:11 AM (9 years ago)
Thanks Smug! Appreciate your work. -G
 
Ed Goodall
Fusion Technology
Profile
Posts: 422
Reg: Oct 01, 2011
Wiltshire, UK
12,320
like
08/30/14 09:21 AM (9 years ago)
Awesome! Ed
 
maverick96
Lost but trying
Profile
Posts: 174
Reg: Jan 22, 2014
Orlando
3,390
like
10/08/14 01:19 PM (9 years ago)
I'm trying this plugin out and have been getting a "Use of a undeclared indentifier appDelegate" . Any hints on this Smug?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
10/08/14 04:27 PM (9 years ago)
Oh, I may have left my project name in there, or didn't declare an app delegate. I'll take a look. Thanks for finding it! :) Cheers! -- Smug
 
maverick96
Lost but trying
Profile
Posts: 174
Reg: Jan 22, 2014
Orlando
3,390
like
10/08/14 04:49 PM (9 years ago)
No problem. Thanks for the help!
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
10/08/14 05:08 PM (9 years ago)
Do a search for 'oog_appDelegate' and replace it with your projects appDelegate name. For instance, if your app is called 'myApp', find and replace with 'myApp_appDelegate' and that should fix you up. Apologies for the goof; an updated version is being uploaded. Cheers! -- Smug
 
maverick96
Lost but trying
Profile
Posts: 174
Reg: Jan 22, 2014
Orlando
3,390
like
10/08/14 05:53 PM (9 years ago)
I'm still getting an "expected expression" error. Sure I have issues in the typing. pathologyformassagetherapists_appDelegate *appDelegate = (appDelegate *)[[[UIApplication sharedApplication] delegate]];
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
10/09/14 12:26 AM (9 years ago)
Sorry for the delay; I've updated the plugin in the market; maybe you can try downloading a new project if you haven't done much core modification... otherwise, give me another yell, and we can figure it out. Cheers! -- Smug
 
maverick96
Lost but trying
Profile
Posts: 174
Reg: Jan 22, 2014
Orlando
3,390
like
10/09/14 05:55 AM (9 years ago)
Thank you. I updated and it seems to be working. :) will let you know if I have any issues. Thanks again!
 
maverick96
Lost but trying
Profile
Posts: 174
Reg: Jan 22, 2014
Orlando
3,390
like
10/09/14 06:30 AM (9 years ago)
Ok. Maybe its an issue with xcode6 but I got everything to work when I first downloaded the new project and did a build. Then when I went to try another build for a different device it says plugin missing. Its doing that on all of them now so not sure what's happening. All plugins are downloaded and added.
 
maverick96
Lost but trying
Profile
Posts: 174
Reg: Jan 22, 2014
Orlando
3,390
like
10/09/14 01:12 PM (9 years ago)
Ok. Reinstalled Xcode fresh. Downloaded new copy of project setting Smug EULA as splash screen. Still getting plugin missing when I try to run device simulator. Any suggestions? UPDATE: Plugin will work for 5s IOS 7.1 and bypasses plugin in 7.0.3 to main page. The rest keep saying missing plugin.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
10/09/14 02:39 PM (9 years ago)
That's quite odd... Usually things either work, or they don't. I'm not certain what to do about a 'works here, but not there' situation. However, it seems to indicate Xcode, or something. However, it maybe that you need to clean your project. Go to the project menu and select 'clean', to clear out any cached data it may be trying to erroneously use. This will force it into using fresh copies of source material. "typically" when it says no plugin, there is usually either no plugin, or the config file/plugin class name has a slight difference. If cleaning the project doesn't work, check the name of the plugin in the config.txt file, and compare it to the plugin class name. Cheers! -- Smug
 
maverick96
Lost but trying
Profile
Posts: 174
Reg: Jan 22, 2014
Orlando
3,390
like
10/09/14 02:58 PM (9 years ago)
Yeah, its got me puzzled too. I did a clean of the project and still getting the error so I will check the config.txt later. Thanks again!
 
maverick96
Lost but trying
Profile
Posts: 174
Reg: Jan 22, 2014
Orlando
3,390
like
10/10/14 05:46 AM (9 years ago)
So I think this is what is happening. When I used the other EULA, it was set as my HomeScreen. After they agreed it sent them to my Menu Button plugin screen. Now that I'm trying to use your EULA, I tried to change my Menu Button screen to my HomeScreen (updated on Buzztouch control panel). For some reason I don't think Buzztouch/Xcode is getting this correct which is why I think I'm getting the missing plugin error. I don't know how to check this to make sure its using the correct screen as HomeScreen. Where in Xcode can I see what page is being used?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
10/10/14 07:03 AM (9 years ago)
That would be in the 'BT_Config.txt' file, found in the 'config' directory of your xcode. It's usually kind of hard to read; I usually run my config through jsonlint.com to format it in a more readable fashion. The area you'll be concerned with is BT_themes. It should be similar to this: "BT_themes": [ { "itemId": "C8408A5399F266D0381B4EE", "itemType": "BT_theme", "itemNickname": "Default Theme", "splashScreenItemId": "E13133BCA5DEBFCCD8FC8FF", "navBarStyle": "solid", "statusBarStyle": "default", "backgroundColor": "#FFFFFF" } ] The 'splashScreenItemId' should match the unique itemId that is assigned to the Eula plugin, to be found in the 'screens' section of your config file and should look similar to this: { "itemId": "E13133BCA5DEBFCCD8FC8FF", "itemType": "SW_SmugEula", "itemNickname": "splash", "navBarTitleText": "splash", "backgroundImageNameSmallDevice": "sw_eulabackground.png", "backgroundImageNameLargeDevice": "sw_eulabackground.png", "localFileName": "sw_defaulteula.html", "eulaPersistance": "1", "buttonText": "I accept the terms of the license" } Hope this helps, let me know if you have any questions or issues! Cheers! -- Smug
 
maverick96
Lost but trying
Profile
Posts: 174
Reg: Jan 22, 2014
Orlando
3,390
like
10/10/14 08:28 AM (9 years ago)
Yeah, its showing up in both buzztouch control/xcode but still saying the missing plugin: view controller for this plugin not compiled. Everything has been copied over to Xcode. Could it possibly have to do with the menu button plugin and the: 'BT_viewController *const __strong' to parameter of incompatible type 'id<NSFileManagerDelegate>' error?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
10/10/14 09:01 AM (9 years ago)
Well.... no, probably not. The way it basically works is, initially the app will parse the BT_config.txt file to basically 'fill in the blanks'. But it does so in a particular order, and that's basically top to bottom. So, your 'home' screen will be the first screen under the 'screens' json, unless you're using a tabbed layout. In which case the 'tabs' section (which comes before screens) will be populated with the corresponding information for which screens go where. And before any of that happens, the 'theme' will be loaded, and if there is a startup screen listed, it will load that first, and then load the 'real' screens behind it, so that when you 'dismiss' your startup screen, the home screen (or first tabbed screen) is visible. So, once the code has determined that *this* is the config it's going to use (by calling home for updates, etc) it will load the theme, the tabs (if any) and screens. Since the theme comes first, the startup screen 'should' load before anything else. It knows it by 'itemId' as shown in my examples above. So make sure that the splash screen exists, and that the 'splashScreenItemId' in the theme section matches the itemId of the splash screen. That being said, does anything else work? Try removing the plugin from the control panel, copying a new config into your project, and making sure other screens work ok. It may be a problem with my plugin (in which case I'm happy to work through it with you) or it may be an issue with the app (in which case, I'll still be happy to work through it with you). Let us know what turns out. Cheers! -- Smug
 
maverick96
Lost but trying
Profile
Posts: 174
Reg: Jan 22, 2014
Orlando
3,390
like
10/11/14 10:22 AM (9 years ago)
Ok, so I tried creating different home screens, using eula splash and no splash, and still having the error. So I decided to add the older EULA plugin(not yours) just to see if its the issue. And yep, its working now. So even though I got rid of the plugin in the project and deleted EULA screen in my control panel when I redownload the project its trying to use the old EULA plugin. Any ideas on checking on this?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
10/11/14 03:18 PM (9 years ago)
Have you cleaned your project? Cheers! -- Smug
 
maverick96
Lost but trying
Profile
Posts: 174
Reg: Jan 22, 2014
Orlando
3,390
like
10/11/14 03:29 PM (9 years ago)
Ok, finally figured it out. It was a simulator issue. Each time I changed device types I had to do a "Reset contents and settings" for each one. I never had to do this on xcode 5 so it threw me off. So I now have your EULA and all seems good.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
10/11/14 03:42 PM (9 years ago)
Sweet! Glad it's all working now! Onward and Upward! :) Cheers! -- Smug
 
maverick96
Lost but trying
Profile
Posts: 174
Reg: Jan 22, 2014
Orlando
3,390
like
10/11/14 05:43 PM (9 years ago)
Thanks so much for your help Smug! Much appreciated!
 
maverick96
Lost but trying
Profile
Posts: 174
Reg: Jan 22, 2014
Orlando
3,390
like
03/12/15 01:45 PM (9 years ago)
Hey Smug. Sorry to bug you again. Started working on an Android version of the app. Still not real familiar with Android Studio so apologies if this is repetitive. When opening the project in AS, I get the following errors for the EULA: Error:(132, 25) error: cannot find symbol method setPluginsEnabled(boolean) Error:(492, 71) error: cannot find symbol variable bt_screen_splash_effect_falldown This was highlighted under SmugEula.java: smugView.getSettings().setPluginsEnabled(true); If I bring up the light bulb to the left it gives me these choices: Introduce local variable Add method contract to 'getSettings' Annotate method 'getSettings' as @Deprecated Annotate method 'getSettings' as @NotNull Annotate method 'getSettings' as @Nullable Thanks in advance!
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
03/12/15 03:35 PM (9 years ago)
Honestly, I haven't started with Android studio, so I'm at a loss as to what it might be. Could you 'substitute' another splash screen and test to see if it's my issue? I'll be moving to Android in a week or so to finish up a project, and will have time to look at it (and other issues I need to address). Sorry for throwing it on you like this, but I won't be moving that way for a few days... Cheers! -- Smug
 
maverick96
Lost but trying
Profile
Posts: 174
Reg: Jan 22, 2014
Orlando
3,390
like
03/12/15 06:17 PM (9 years ago)
No worries. thank you for your help! I'll give it a swing with a different splash. Thanks!
 

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.