Adam
Aspiring developer
Profile
Posts: 247
Reg: Oct 23, 2010
Southern Califo...
4,470
11/24/13 12:19 AM (10 years ago)

Scringo API Call

I want to learn how to make a Scringo API call. For Example, if a user taps the quiz button I want them to go to the Scringo Quiz. I know the code for that is: [Scringo openQuizWithNavigationController:nil withScringoNavControllerEnabled:YES]; How would I call this? Do I need to create some sort of plugin? Thanks, Adam
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
11/24/13 11:41 AM (10 years ago)
This might be a slightly complicated solution involving a custom plugin and the Custom URL technique. On the How-To page, I have a tutorial on using a custom URL to load any BT screen. Your Quiz Button would be programmed for that custom URL. Then your new plugin would be invoked by that custom URL. Then your custom plugin would invoke the Scringo Quiz. Does that make sense? By the way, my tutorial only applies to BT v2. I hope to provide an updated tutorial for BT v3 really soon. -- Niraj
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
11/24/13 02:23 PM (10 years ago)
your nearly there [Scringo openQuizWithNavigationController:nil withScringoNavControllerEnabled:YES]; will be [Scringo openQuizWithNavigationController:self.navigationController withScringoNavControllerEnabled:YES]; you would need to import into the header of the plugin you are adding #import <Scringo/ScringoApi.h> depending on which menu screen you are using you need to set a conditional statement. Follow this tutorial for using the menu button http://www.buzztouch.com/files/howtos/make-a-button-do-anything.pdf the code is a bit dated but explains what to do where it says YOURCODEHERE put [Scringo openQuizWithNavigationController:self.navigationController withScringoNavControllerEnabled:YES];
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
11/24/13 02:34 PM (10 years ago)
if you are using menu lists find the didselectrowatpath different for carousel but the code in it is the same find the part of the method that looks like this //load next screen if it's not nil if(screenObjectToLoad != nil){ [self handleTapToLoadScreen:screenObjectToLoad theMenuItemData:thisMenuItem]; }else{ //show message [BT_debugger showIt:self theMessage:[NSString stringWithFormat:@"%@",NSLocalizedString(@"menuTapError",@"The application doesn't know how to handle this click?")]]; } and change it to look like this //load next screen if it's not nil if(screenObjectToLoad != nil){ if([screenObjectToLoad.itemNickname isEqualToString:@"SCRINGO"]){ [Scringo openQuizWithNavigationController:self.navigationController withScringoNavControllerEnabled:YES]; return; }else{ [self handleTapToLoadScreen:screenObjectToLoad theMenuItemData:thisMenuItem]; } }else{ //show message [BT_debugger showIt:self theMessage:[NSString stringWithFormat:@"%@",NSLocalizedString(@"menuTapError",@"The application doesn't know how to handle this click?")]]; }
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
11/24/13 02:36 PM (10 years ago)
now hoping there are no typos you should be good to go. where it says scringo you would make a holder screen maybe a blank plugin called SCRINGO, it doesn't matter what type of screen as it will never be seen
 
shenry
Aspiring developer
Profile
Posts: 469
Reg: Jan 10, 2012
Orange County, ...
13,390
like
11/24/13 03:29 PM (10 years ago)
Thanks Kittsy, Would this also work if I have a tab icon that I want to use to open Scringo (what opens with a swipe now)?
 
Adam
Aspiring developer
Profile
Posts: 247
Reg: Oct 23, 2010
Southern Califo...
4,470
like
11/24/13 08:11 PM (10 years ago)
Thanks Kittsy, I will try this out once the new self hosting update comes out. Thanks for the response. It means a lot. Thanks, Adam
 
Adam
Aspiring developer
Profile
Posts: 247
Reg: Oct 23, 2010
Southern Califo...
4,470
like
11/24/13 08:13 PM (10 years ago)
Thanks for the solution as well, Niraj. Adam
 
feraco
Aspiring developer
Profile
Posts: 705
Reg: Jan 23, 2012
nyc
15,050
like
11/27/13 10:20 AM (10 years ago)
Hey all im trying to open a scringo chatroom from a button in the xib button menu. I need some help Here is the scringo chatroom api info http://docs.scringo.com/api/ios/Classes/ScringoChatRoom.html#//api/name/getChatRoomByTopicId:completion:. Im following kittsys tutorial and i cant find any code that says //launch screen -(void)launchScreen:(BT_item *)theMenuItem{ I think the xib is different. Whats an easy way to open a chatroom from a button?
 
RogueWave
Aspiring developer
Profile
Posts: 337
Reg: Jan 23, 2013
Park City
5,120
like
11/27/13 01:08 PM (10 years ago)
Scringo IOS latest version 2.5.5. fixes the swipe issue, everyone.
 

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.