Last active
February 1, 2017 23:48
Revisions
-
Jordi Moraleda revised this gist
Feb 1, 2017 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -70,6 +70,7 @@ Select your project name Scheme then click on the minus sign ― in the bottom l Twins scheme > Build > - Uncheck "Parallelize Builds" - Add "React" and put it first - Uncheck Analyze in Twins and React # https://twitter.com/skellock/status/818813810781908992 -
Jordi Moraleda revised this gist
Feb 1, 2017 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -67,6 +67,12 @@ Select your project Capabilities and enable Keychan Sharing and Background Modes In Xcode menu bar, select Product > Scheme > Manage schemes. Select your project name Scheme then click on the minus sign ― in the bottom left corner, then click on the plus sign + and rebuild your project scheme. Twins scheme > Build > - Uncheck "Parallelize Builds" - Add "React" and put it first # https://twitter.com/skellock/status/818813810781908992 ---- - Inside your project in the Firebase console, select the gear icon, select Project Settings, and then select the Cloud Messaging tab. -
Jordi Moraleda revised this gist
Feb 1, 2017 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -60,11 +60,12 @@ AppDelegats.m (update) } ---- XCode Select your project Capabilities and enable Keychan Sharing and Background Modes > Remote notifications. In Xcode menu bar, select Product > Scheme > Manage schemes. Select your project name Scheme then click on the minus sign ― in the bottom left corner, then click on the plus sign + and rebuild your project scheme. ---- -
Jordi Moraleda revised this gist
Feb 1, 2017 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -71,3 +71,7 @@ In Xcode menu bar, select Product > Scheme > Manage schemes. Select your project - Inside your project in the Firebase console, select the gear icon, select Project Settings, and then select the Cloud Messaging tab. - Select the Upload Certificate button for your development certificate, your production certificate, or both. At least one is required. - For each certificate, select the .p12 file, and provide the password, if any. Make sure the bundle ID for this certificate matches the bundle ID of your app. Select Save. ---- -
Jordi Moraleda revised this gist
Feb 1, 2017 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -65,3 +65,9 @@ Select your project Capabilities and enable Keychan Sharing and Background Modes In Xcode menu bar, select Product > Scheme > Manage schemes. Select your project name Scheme then click on the minus sign ― in the bottom left corner, then click on the plus sign + and rebuild your project scheme. ---- - Inside your project in the Firebase console, select the gear icon, select Project Settings, and then select the Cloud Messaging tab. - Select the Upload Certificate button for your development certificate, your production certificate, or both. At least one is required. - For each certificate, select the .p12 file, and provide the password, if any. Make sure the bundle ID for this certificate matches the bundle ID of your app. Select Save. -
Jordi Moraleda revised this gist
Feb 1, 2017 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,6 @@ # Extra info: # https://firebase.google.com/docs/ios/setup react-native init Twins cd Twins -
Jordi Moraleda renamed this gist
Feb 1, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Jordi Moraleda created this gist
Feb 1, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,64 @@ react-native init Twins cd Twins react-native run-ios yarn add react-native-fcm react-native link react-native-fcm cd ios pod init Add the following line inside the Podfile >> pod 'Firebase/Messaging' pod install open ios/Twins.xcworkspace Build Settings > Header search path > add: >> '$(SRCROOT)/../node_modules/react-native-fcm/ios' AppDelegate.h (update) @import UserNotifications; @interface AppDelegate : UIResponder <UIApplicationDelegate,UNUserNotificationCenterDelegate> AppDelegats.m (update) #import "RNFIRMessaging.h" - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { //... [FIRApp configure]; [[UNUserNotificationCenter currentNotificationCenter] setDelegate:self]; // ... } - (void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler { [RNFIRMessaging willPresentNotification:notification withCompletionHandler:completionHandler]; } - (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)())completionHandler { [RNFIRMessaging didReceiveNotificationResponse:response withCompletionHandler:completionHandler]; } //You can skip this method if you don't want to use local notification -(void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification { [RNFIRMessaging didReceiveLocalNotification:notification]; } - (void)application:(UIApplication *)application didReceiveRemoteNotification:(nonnull NSDictionary *)userInfo fetchCompletionHandler:(nonnull void (^)(UIBackgroundFetchResult))completionHandler{ [RNFIRMessaging didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler]; } ---- Select your project Capabilities and enable Keychan Sharing and Background Modes > Remote notifications. In Xcode menu bar, select Product > Scheme > Manage schemes. Select your project name Scheme then click on the minus sign ― in the bottom left corner, then click on the plus sign + and rebuild your project scheme.