Antonio V
Aspiring developer
Profile
Posts: 41
Reg: May 06, 2013
Tucson, AZ
2,160
05/31/13 01:34 PM (12 years ago)

Trying to get Scringo on my app

Hi guys, I've been trying to get scringo to work but no luck yet. Here's what I've done so far: Copy the scringo folder into the BT core folder in Xcode copy and paste #import <Scringo/ScringoAgent.h> into line 51 copy and paste //init Scringo agent... [ScringoAgent startSession:@"Your_Scringo_App_ID" locationManager:nil]; into line 532, But it tells me that I'm missing a bracket at the start of the message even though the bracket is there. Any suggestions,comments , help? thank you very much!!!
 
BandO
I hate code!
Profile
Posts: 153
Reg: Jan 23, 2012
Manhattan
1,530
like
05/31/13 02:21 PM (12 years ago)
https://dev.scringo.com/resources.php?resource=Getting%20Started Register your app The first thing you should do is to register your app and get Scringo App ID. Download Download the latest Scringo SDK. The zip contains a sample project and the Scringo framework directory (Scringo) that you should add to your xcode project. Add Scringo framework to your project Add the entire Scringo directory from the downloaded zip file to your xcode project. Add required frameworks to your project Open your project's Build Phases and add the following frameworks (in the Link Binary with Binaries section): SystemConfiguration.framework MessageUI.framework CoreLocation.framework MapKit.framework UIKit.framework CoreGraphics.framework QuartzCore.framework Foundation.framework Accounts.framework Twitter.framework CoreText.framework AddressBook.framework AdSupport.framework Activate Scringo in your code In your appDelegate.m file add the following: // In the import section #import <Scringo/ScringoAgent.h> // Inside this method, add a call to ScringAgent -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Your application code [ScringoAgent startSession:@"YOUR_SCRINGO_APP_ID" locationManager:nil]; return YES; } Adding ScringoActivationButton Your users can see Scringo's sidebar by swiping to the right (you can also configure it to be opened by swiping to the left). In addition, you may want to add a button that will open Scringo's sidebar when clicked. You can either create a UIButton by calling [ScringoAgent scringoActivationButtonOpensToLeft:YES]; Or by creating a UIBarButtonItem by calling: [ScringoAgent scringoActivationBarItem];
 
BandO
I hate code!
Profile
Posts: 153
Reg: Jan 23, 2012
Manhattan
1,530
like
05/31/13 02:21 PM (12 years ago)
Connect to Facebook If your app is already connected to Facebook app, just change your appDelegate's handleOpenUrl method as follow: // Inside this method, add a call to ScringAgent -(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation{ // Assuming someVC holds your facebook instance // Scringo will take care of calling the underlying Facebook instance return [ScringoAgent handleOpenURL:url withFacebook:someVC.facebook]; } If your app is not connected to Facebook App - Just follow these steps to add Facebook to your app: 1. First register your ios app at Facebook here. Note your appId. 2. In your application's plist file, you should add the following hierarchy like the one marked below (make sure to put your Facebook App Id after the fb prefix): You can read more about it in http://developers.facebook.com/docs/mobile/ios/build/#register (you don't need to follow all the steps, just the "Registrating your iOS App with Facebook" and "Modify the app property list file". 3. In your app delegate's class, make sure to implement these methods as follow: -(BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url { return [ScringoAgent handleOpenURL:url]; } -(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation{ return [ScringoAgent handleOpenURL:url]; } Connect to Twitter Scringo is automatically integrated in devices running ios 5 or above. Note: A user will have the option to login with Twitter only if he signed in to Twitter in his device's setting.
 
Antonio V
Aspiring developer
Profile
Posts: 41
Reg: May 06, 2013
Tucson, AZ
2,160
like
05/31/13 02:34 PM (12 years ago)
Where should I add Add Scringo framework to ? Do I copy the whole scringo folder to the BT core folder including the scringo framework? sorry I'm kind of confused with this. Thanks!
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
05/31/13 02:57 PM (12 years ago)
 
BandO
I hate code!
Profile
Posts: 153
Reg: Jan 23, 2012
Manhattan
1,530
like
05/31/13 03:00 PM (12 years ago)
Ian rocks!
 
Antonio V
Aspiring developer
Profile
Posts: 41
Reg: May 06, 2013
Tucson, AZ
2,160
like
05/31/13 03:52 PM (12 years ago)
Thank you guys for your help! when I paste the code on my appdelagate file I get an error :"use of undeclared 'application' do you guys know what could be wrong?
 
Antonio V
Aspiring developer
Profile
Posts: 41
Reg: May 06, 2013
Tucson, AZ
2,160
like
05/31/13 05:15 PM (12 years ago)
OK I got it working,now I'm working on connecting it to Facebook. but instead of logging me in with Facebook it just takes me to the Facebook app. any ideas? thanks!!
 
Antonio V
Aspiring developer
Profile
Posts: 41
Reg: May 06, 2013
Tucson, AZ
2,160
like
05/31/13 05:31 PM (12 years ago)
It works! I followed Ian's Tutorial and works great now thx!
 
Antonio V
Aspiring developer
Profile
Posts: 41
Reg: May 06, 2013
Tucson, AZ
2,160
like
05/31/13 06:51 PM (12 years ago)
Actually I have another issue when I press the activity button I get this error on Xcode: int retVal= UIApplicationMain(argc,argv,@"UIApplication",@"uphillpictures_appDelegate"); next to the line it says thread 1: signal SIGABRT Any ideas? thanks you!
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
05/31/13 09:13 PM (12 years ago)
Hi Antonio, What are the errors that u are getting in the console? You could send me your project if u like Ian@buzztouch
 
Antonio V
Aspiring developer
Profile
Posts: 41
Reg: May 06, 2013
Tucson, AZ
2,160
like
05/31/13 09:58 PM (12 years ago)
Hi Ian, I'm sending you my project through a we transfer file. the app shuts down when I press the activity button, Hopefully you can help me out, thanks a lot!!! Antonio
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
05/31/13 10:34 PM (12 years ago)
Hi Antonio, I loaded your project and Scringo seems to be working fine in the Simulator. In Xcode in the top menu tap "Product" then "Clean" then Run ur project again. If that doesn't work try restarting Xcode. let me know!
 
Antonio V
Aspiring developer
Profile
Posts: 41
Reg: May 06, 2013
Tucson, AZ
2,160
like
06/01/13 08:47 AM (12 years ago)
It works fine now, thanks Ian!
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
06/01/13 09:08 AM (12 years ago)
sweet!
 

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.