Skip to content

Instantly share code, notes, and snippets.

@mlinderman
mlinderman / gist:aab4fde88dc5d6eb659ba83b51c20bd3
Created April 20, 2017 19:31
remote notification hooks for Epi
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
{
[[EPILocationMarketingServiceManager sharedInstance] handleRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
}
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)notification
{
[RCTPushNotificationManager didReceiveRemoteNotification:notification];
}
if (EPIConfig.swrveAppId > 0 && EPIConfig.swrveApiKey) {
SwrveConfig* swrveConfig = [[SwrveConfig alloc] init];
swrveConfig.pushEnabled = [EPIUserServiceManager getEditorialNotificationsEnabled];
swrveConfig.pushNotificationEvents = [[NSSet alloc] initWithArray:@[@"Swrve.push_notification_permission", @"push.permission.accepted"]];
[Swrve sharedInstanceWithAppID:EPIConfig.swrveAppId apiKey:EPIConfig.swrveApiKey config:swrveConfig launchOptions:launchOptions];
}
[Swrve sharedInstance].talk.customButtonCallback = ^(NSString* action){
NSURL *url = [NSURL URLWithString:action];
double delayInSeconds = 0.25;
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);
POSTed bookmark:
{
"type":"bookmarks",
"id":"261",
"links":{
"self":"https://ci-user-platform.conde.io/bookmarks/261"
},
"attributes":{
"amgUUID":"b62c708c-6572-4f5d-8587-06ac11549829",
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, target-densityDpi=device-dpi, user-scalable=0" />
<style>
/*font family*/
@font-face {
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, target-densityDpi=device-dpi, user-scalable=0" />
<style>
/*font family*/
@font-face {