Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 5 commits
  • 11 files changed
  • 0 commit comments
  • 1 contributor
View
6 Documentation/sphinx/source/changelog.rst
@@ -4,6 +4,12 @@
Changelog
=============================================
+v1.7.4
+------
+[feature] Add launch-time notification handling info to documentation [ ]
+
+[bug] Direct-URL smartalerts are crashing [ ]
+
v1.7.3
------
[bug] Cancelling auth does not work from post comment [ ui ]
View
2  Documentation/sphinx/source/conf.py.in
@@ -84,6 +84,8 @@ exclude_patterns = []
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
+highlight_language = 'objective-c'
+
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
View
2  Documentation/sphinx/source/push_notifications.rst
@@ -119,6 +119,7 @@ Handle Notifications
.. literalinclude:: snippets/configure_notifications.m
:start-after: begin-handle-snippet
:end-before: end-handle-snippet
+ :emphasize-lines: 0-10,18-27
.. note::
@@ -137,6 +138,7 @@ Copy the lines below to add an entity loader
.. literalinclude:: snippets/configure_notifications.m
:start-after: begin-entity-loader-snippet
:end-before: end-entity-loader-snippet
+ :emphasize-lines: 18-22
.. image:: images/entity_loader.png
View
51 Documentation/sphinx/source/snippets/configure_notifications.m
@@ -41,18 +41,49 @@ - (void)application:(UIApplication*)application didFailToRegisterForRemoteNotifi
// end-register-fail-snippet
+@end
+
+@implementation ConfigureNotifications (HandleNotifications)
+
// begin-handle-snippet
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
+
+ // Handle Socialize notification at foreground
if ([Socialize handleNotification:userInfo]) {
+ NSLog(@"Socialize handled the notification on foreground");
return;
}
- // Nonsocialize notification handling goes here
+
+ NSLog(@"Socialize did not handle the notification on foreground");
+}
+
+- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
+
+ // ...
+
+ // Register for Apple Push Notification Service
+ [application registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound)];
+
+ // Handle Socialize notification at launch
+ NSDictionary *userInfo = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
+ if (userInfo != nil) {
+ if ([Socialize handleNotification:userInfo]) {
+ NSLog(@"Socialize handled the notification on app launch.");
+ } else {
+ NSLog(@"Socialize did not handle the notification on app launch.");
+ }
+ }
+
+ //your application specific code
+
+ return YES;
}
-@end
// end-handle-snippet
+@end
+
@implementation ConfigureNotifications (EntityLoader)
@@ -62,6 +93,20 @@ - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(N
// ...
+ // Register for Apple Push Notification Service
+ [application registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound)];
+
+ // Handle Socialize notification at launch
+ NSDictionary *userInfo = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
+ if (userInfo != nil) {
+ if ([Socialize handleNotification:userInfo]) {
+ NSLog(@"Socialize handled the notification on app launch.");
+ } else {
+ NSLog(@"Socialize did not handle the notification on app launch.");
+ }
+ }
+
+ // Specify a Socialize entity loader block
[Socialize setEntityLoaderBlock:^(UINavigationController *navigationController, id<SocializeEntity>entity) {
SampleEntityLoader *entityLoader = [[[SampleEntityLoader alloc] initWithEntity:entity] autorelease];
[navigationController pushViewController:entityLoader animated:YES];
@@ -92,3 +137,5 @@ - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(N
// end-can-load-entity-snippet
@end
+
+
View
2  SampleSdkApp/TestListController.m
@@ -310,7 +310,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
NSString *testURL = [self getValueWithPrompt:@"Enter a URL" defaultValue:@"http://www.npr.org/"];
if ([testURL length] > 0) {
NSDictionary *socializeInfo = [NSDictionary dictionaryWithObjectsAndKeys:
- [NSArray arrayWithObject:testURL], @"url",
+ testURL, @"url",
@"developer_direct_url", @"notification_type",
nil];
NSDictionary *userInfo = [NSDictionary dictionaryWithObject:socializeInfo forKey:@"socialize"];
View
1  SampleSdkApp/Tests/KIF/KIFTestScenario+SampleSdkAppAdditions.h
@@ -16,6 +16,7 @@
+ (id)scenarioToTestActionBar;
+ (id)scenarioToTestViewOtherProfile;
+ (id)scenarioToTestLikeButton;
++ (id)scenarioToTestDirectURLNotification;
//+ (id)scenarioToTestFacebook;
View
19 SampleSdkApp/Tests/KIF/KIFTestScenario+SampleSdkAppAdditions.m
@@ -169,6 +169,25 @@ + (id)scenarioToTestLikeButton {
return scenario;
}
++ (id)scenarioToTestDirectURLNotification {
+ KIFTestScenario *scenario = [KIFTestScenario scenarioWithDescription:@"Test the like button"];
+
+ NSMutableArray *steps = [NSMutableArray array];
+
+ [steps addObjectsFromArray:[KIFTestStep stepsToReturnToList]];
+ NSIndexPath *path = [NSIndexPath indexPathForRow:16 inSection:0];
+ [steps addObject:[KIFTestStep stepToScrollAndTapRowInTableViewWithAccessibilityLabel:@"tableView" atIndexPath:path]];
+ [steps addObject:[KIFTestStep stepToWaitForTappableViewWithAccessibilityLabel:@"Input Field"]];
+ [steps addObject:[KIFTestStep stepToEnterText:@"http://www.google.com" intoViewWithAccessibilityLabel:@"Input Field"]];
+ [steps addObject:[KIFTestStep stepToTapViewWithAccessibilityLabel:@"Enter"]];
+
+ [steps addObject:[KIFTestStep stepToWaitForTappableViewWithAccessibilityLabel:@"Done"]];
+ [steps addObject:[KIFTestStep stepToTapViewWithAccessibilityLabel:@"Done"]];
+
+ [scenario addStepsFromArray:steps];
+
+ return scenario;
+}
@end
View
1  SampleSdkApp/Tests/KIF/SampleSdkAppKIFTestController.m
@@ -54,6 +54,7 @@ - (void)initializeScenarios;
[self addScenario:[KIFTestScenario scenarioToTestUserProfile]];
[self addScenario:[KIFTestScenario scenarioToTestActionBar]];
[self addScenario:[KIFTestScenario scenarioToTestLikeButton]];
+ [self addScenario:[KIFTestScenario scenarioToTestDirectURLNotification]];
// [self addScenario:[KIFTestScenario scenarioToTestFacebook]];
}
View
4 Socialize/Classes/SocializeRichPushNotificationViewController.m
@@ -23,10 +23,6 @@ - (void)dealloc {
- (void)viewDidLoad {
[super viewDidLoad];
- if ([self.title length] == 0) {
- self.title = @"Hey You!";
- }
-
self.navigationItem.rightBarButtonItem = self.doneButton;
self.webView.didFinishLoadBlock = ^{
View
4 SocializeSDK.xcodeproj/project.pbxproj
@@ -1221,6 +1221,8 @@
AA7F0A5D153CAD7B00EC6DD7 /* SocializeLikeButton.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7F0A5A153CAD7B00EC6DD7 /* SocializeLikeButton.h */; settings = {ATTRIBUTES = (Public, ); }; };
AA7F0A5E153CAD7B00EC6DD7 /* SocializeLikeButton.m in Sources */ = {isa = PBXBuildFile; fileRef = AA7F0A5B153CAD7B00EC6DD7 /* SocializeLikeButton.m */; };
AA7F0A5F153CAD7B00EC6DD7 /* SocializeLikeButton.m in Sources */ = {isa = PBXBuildFile; fileRef = AA7F0A5B153CAD7B00EC6DD7 /* SocializeLikeButton.m */; };
+ AA7F8C27155B0EFB000ADA70 /* UIWebView+BlocksKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 16C3658A14518F1600DD5421 /* UIWebView+BlocksKit.m */; };
+ AA7F8C28155B0EFC000ADA70 /* UIWebView+BlocksKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 16C3658A14518F1600DD5421 /* UIWebView+BlocksKit.m */; };
AA7FB8B51491415600B018DE /* socialize-iphone-notification-button-highlighted.png in Resources */ = {isa = PBXBuildFile; fileRef = AA7FB8931491415600B018DE /* socialize-iphone-notification-button-highlighted.png */; };
AA7FB8B61491415600B018DE /* socialize-iphone-notification-button-highlighted.png in Resources */ = {isa = PBXBuildFile; fileRef = AA7FB8931491415600B018DE /* socialize-iphone-notification-button-highlighted.png */; };
AA7FB8B71491415600B018DE /* socialize-iphone-notification-button-highlighted.png in Resources */ = {isa = PBXBuildFile; fileRef = AA7FB8931491415600B018DE /* socialize-iphone-notification-button-highlighted.png */; };
@@ -7156,6 +7158,7 @@
AA7F0A5E153CAD7B00EC6DD7 /* SocializeLikeButton.m in Sources */,
AAF60EB915461AD000245867 /* SampleEntityLoader.m in Sources */,
AADD17F9154B1E0900ECB1D0 /* SZNavigationController.m in Sources */,
+ AA7F8C27155B0EFB000ADA70 /* UIWebView+BlocksKit.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -7559,6 +7562,7 @@
AA7F0A5F153CAD7B00EC6DD7 /* SocializeLikeButton.m in Sources */,
AAF60EBA15461AD000245867 /* SampleEntityLoader.m in Sources */,
AADD17FA154B1E0900ECB1D0 /* SZNavigationController.m in Sources */,
+ AA7F8C28155B0EFC000ADA70 /* UIWebView+BlocksKit.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
2  version
@@ -1 +1 @@
-1.7.3
+1.7.4

No commit comments for this range

Something went wrong with that request. Please try again.