Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save itajenglish/667791a5b97447f4c2ca2d5c10d54cd5 to your computer and use it in GitHub Desktop.
Save itajenglish/667791a5b97447f4c2ca2d5c10d54cd5 to your computer and use it in GitHub Desktop.
diff --git a/node_modules/config-plugin-react-native-intercom/build/withIntercomIOS.js b/node_modules/config-plugin-react-native-intercom/build/withIntercomIOS.js
index ac076f8..e3cb331 100644
--- a/node_modules/config-plugin-react-native-intercom/build/withIntercomIOS.js
+++ b/node_modules/config-plugin-react-native-intercom/build/withIntercomIOS.js
@@ -56,15 +56,7 @@ function modifyObjcAppDelegate({ contents, apiKey, appId, pushNotifications, })
contents = contents.replace(/#import "AppDelegate.h"/g, `#import "AppDelegate.h"\n#import <IntercomModule.h>\n#import <UserNotifications/UserNotifications.h>`);
}
const initMethodInvocationBlock = `[IntercomModule initialize:`;
- const registerIntercomPushCode = `
- // START INTERCOM PUSH
- UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
- [center requestAuthorizationWithOptions:(UNAuthorizationOptionAlert + UNAuthorizationOptionSound)
- completionHandler:^(BOOL granted, NSError *_Nullable error) {
- }];
- [[UIApplication sharedApplication] registerForRemoteNotifications];
- // END INTERCOM PUSH
- `;
+ const registerIntercomPushCode = ``;
const registerPushLine = `[IntercomModule setDeviceToken:deviceToken];`;
const registerPushAnchor = `return [super application:application didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];`;
// Add invocation
diff --git a/node_modules/config-plugin-react-native-intercom/src/withIntercomIOS.ts b/node_modules/config-plugin-react-native-intercom/src/withIntercomIOS.ts
index ba9bdfe..7bf2cc7 100644
--- a/node_modules/config-plugin-react-native-intercom/src/withIntercomIOS.ts
+++ b/node_modules/config-plugin-react-native-intercom/src/withIntercomIOS.ts
@@ -91,15 +91,7 @@ function modifyObjcAppDelegate({
);
}
const initMethodInvocationBlock = `[IntercomModule initialize:`;
- const registerIntercomPushCode = `
- // START INTERCOM PUSH
- UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
- [center requestAuthorizationWithOptions:(UNAuthorizationOptionAlert + UNAuthorizationOptionSound)
- completionHandler:^(BOOL granted, NSError *_Nullable error) {
- }];
- [[UIApplication sharedApplication] registerForRemoteNotifications];
- // END INTERCOM PUSH
- `;
+ const registerIntercomPushCode = ``;
const registerPushLine = `[IntercomModule setDeviceToken:deviceToken];`;
const registerPushAnchor = `return [super application:application didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment