RogueWave
Aspiring developer
Profile
Posts: 337
Reg: Jan 23, 2013
Park City
5,120
11/27/13 02:15 PM (10 years ago)

Configuring Scringo for Push

IOS Scringo v. 2.5.5. .p12 uploaded to the Scringo control panel, now I need to copy and paste "push" code into the AppDelegate.m file...don't know where (What lines) to place it in that file in Xcode. I thought it was lines 1-14but it popped 9 errors. Sample: - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { [Scringo didRegisterForRemoteNotificationsWithDeviceToken:deviceToken]; } - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error { [Scringo didFailToRegisterForRemoteNotificationsWithError:error]; } - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { [Scringo didReceiveRemoteNotification:userInfo]; }
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/27/13 08:05 PM (10 years ago)
I don't mess with much of that… but I did play with it a bit once. My question would be are you 'pasting' that code in? Because your appDelegate 'should' already have those methods, just not the commands within. I see 'didRegisterForRemoteNotificationsWithDeviceToken' around line 719, With Error around line 795, and Remote Notification around line 802. If your appDelegate already has these (and it should) then you only need paste the code 'within' that method into the method that already exists… For instance, for the first sample, find the "didRegisterForRemoteNotificationsWithDeviceToken" method that is already in your appDelegate, and paste this: [Scringo didRegisterForRemoteNotificationsWithDeviceToken:deviceToken]; 'inside' of the method. Cheers! -- Smug
 
RogueWave
Aspiring developer
Profile
Posts: 337
Reg: Jan 23, 2013
Park City
5,120
like
11/28/13 11:10 AM (10 years ago)
Once again, thank you Smug! Happy Thanksgiving!
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/28/13 02:53 PM (10 years ago)
Happy Thanksgiving to you too! Have a great day! 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.