Deep linking by SDK
SDK provide default deep linking functionality for push notification categories buy
, view_cart
and promotion
by configuring deep linking URLs at the time of SDK initialization in AppDelegate
.
Developer can override this behavior by implementing BlueShifPushDelegate
methods inside AppDelegate
,
@interface AppDelegate : UIResponder <UIApplicationDelegate,BlueShiftPushDelegate>
- (void) buyPushActionWithDetails:(NSDictionary *)details;
Override buy
button deep linking behavior of buy
category push notifications.
- (void) viewPushActionWithDetails:(NSDictionary *)details;
Override view
button deep linking behavior of buy
category push notifications.
- (void) openCartPushActionWithDetails:(NSDictionary *)details;
Override open cart
button deep linking behavior of view_cart
category push notifications.
- (void) buyCategoryPushClickedWithDetails:(NSDictionary *)details;
Override deep linking behavior while clicking on push notification(category buy
).
- (void) cartViewCategoryPushClickedWithDetails:(NSDictionary *)details;
Override deep linking behavior while clicking on push notification(category view_cart
).
- (void) promotionCategoryPushClickedWithDetails:(NSDictionary *)details;
Override deep linking behavior while clicking on push notification(category promotion
).
If you pass deep linking url along with notification payload for categories 'buy', 'view_cart' and 'promotion' it will take this url for all kind of deep linking for that category by sdk by default , definitely you can override this default way by above delegate methods.
SDK provides deep linking for other custom categories also, just need to pass deep linking url along with push notification payload, SDK will parse and do deep linking by default. Developer can do override this behavior by implementing following delegate
- (void) handleCustomCategory:(NSString *)categroyName clickedWithDetails:(NSDictionary *)details;
Override deep linking behavior while clicking on push notification(any custom category).
If developer want deep linking for action button of any custom category need to implement following delegate in AppDelegate
- (void) handlePushActionForIdentifier:(NSString *)identifier withDetails:(NSDictionary *)details;
If developer want to get push notification data payload inside the view controller after deep linking, need to implement BlueShiftPushParamDelegate
method inside your view controller
@interface YourViewController : UIViewController<BlueShiftPushParamDelegate>
- (void)handlePushDictionary:(NSDictionary *)pushDictionary;
If developer need to set up deep linking for each image in the carousel push notification, need to do following set ups
- Developer need to update both development and production provisioning profile with app group added
- For adding App Group , Go to you apple developer portal select Certificate,Identifiers and Profile
- Select App Groups from Identifiers section and add a new App Group ID
- Select App ids from identifiers section and pick you app identifier from it.
- Select Edit button, tick App Groups, press Edit button and add select app group id you previously created.
- Select Notification content extension identifier from app ids list and do the same thing which is done for app id.(step 4)
- In XCode under project Targets select you app schema.
- Select Capabilities tab then enable App Groups and add you app group id there and select it
- Select notification content extension schema under Targets and do the step 7
- Pass this app group id during SDK initialization
[config setAppGroupID:@"App Group ID here"];
for objective C ,config.appGroupID = "App Group ID here"
for swift - Pass same group id for notification content extension also, inside
viewDidLoad
inNotificationViewController
self.appGroupID = @"App Group ID here";
Objective C
- (void)viewDidLoad {
[super viewDidLoad];
// Do any required interface initialization here.
self.appGroupID = @"App Group ID here";
}
Swift
override func viewDidLoad() {
super.viewDidLoad()
// Do any required interface initialization here.
self.appGroupID = "App Group ID here"
}
SDK will do default deep linking for each image if developer need to override it implement the following delegate inside AppDelegate
- (void) handleCarouselPushForCategory:(NSString *)categoryName clickedWithIndex:(NSInteger)index withDetails:(NSDictionary *)details;
Comments
0 comments
Please sign in to leave a comment.