Skip to content
Snippets Groups Projects
Commit c7f0c1cb authored by Sofiya Tepikin's avatar Sofiya Tepikin
Browse files

Merge branch 'ios-integration' into 'master'

Ios integration

See merge request bloodyhealth/drip!258
parents c7882eb6 1c785608
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,7 @@ DerivedData
*.ipa
*.xcuserstate
project.xcworkspace
ios/Index/DataStore
# Android/IntelliJ
#
......
......@@ -10,6 +10,6 @@ public class MainActivity extends ReactActivity {
*/
@Override
protected String getMainComponentName() {
return "home";
return "drip";
}
}
import { AppRegistry } from 'react-native'
import AppWrapper from './components/app-wrapper'
AppRegistry.registerComponent('home', () => AppWrapper)
\ No newline at end of file
AppRegistry.registerComponent('drip', () => AppWrapper)
\ No newline at end of file
This diff is collapsed.
......@@ -7,7 +7,7 @@
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (nonatomic, strong) UIWindow *window;
......
......@@ -5,12 +5,12 @@
* LICENSE file in the root directory of this source tree.
*/
#import "AppDelegate.h"
#import <AppDelegate.h>
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <React/RCTPushNotificationManager.h>
#import <RNCPushNotificationIOS.h>
@implementation AppDelegate
......@@ -18,7 +18,7 @@
{
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"RnDiffApp"
moduleName:@"drip"
initialProperties:nil];
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
......@@ -34,28 +34,28 @@
// Required to register for notifications
- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings
{
[RCTPushNotificationManager didRegisterUserNotificationSettings:notificationSettings];
[RNCPushNotificationIOS didRegisterUserNotificationSettings:notificationSettings];
}
// Required for the register event.
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
[RCTPushNotificationManager didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
[RNCPushNotificationIOS didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
}
// Required for the notification event. You must call the completion handler after handling the remote notification.
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
{
[RCTPushNotificationManager didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
[RNCPushNotificationIOS didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
}
// Required for the registrationError event.
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
{
[RCTPushNotificationManager didFailToRegisterForRemoteNotificationsWithError:error];
[RNCPushNotificationIOS didFailToRegisterForRemoteNotificationsWithError:error];
}
// Required for the localNotification event.
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
{
[RCTPushNotificationManager didReceiveLocalNotification:notification];
[RNCPushNotificationIOS didReceiveLocalNotification:notification];
}
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
......
......@@ -3812,6 +3812,14 @@
}
}
},
"@react-native-community/push-notification-ios": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/@react-native-community/push-notification-ios/-/push-notification-ios-1.0.5.tgz",
"integrity": "sha512-4JO5XjmzD4EoReHVxMOYni03Twwuq39oyAIk2U62oIjkIE23tTBblC2KC2IS/iadRyJTg7MQ0LtBat2zse9WQg==",
"requires": {
"invariant": "^2.2.4"
}
},
"@types/babel__core": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.3.tgz",
......@@ -13119,8 +13127,11 @@
}
},
"react-native-push-notification": {
"version": "github:jfr3000/react-native-push-notification#f9e83510d687116ea79ee30fde6b93ba5a07b019",
"from": "github:jfr3000/react-native-push-notification"
"version": "github:sdvig/react-native-push-notification#1340b365c15ed3aab79ef0521cb694af8fd5eedb",
"from": "github:sdvig/react-native-push-notification",
"requires": {
"@react-native-community/push-notification-ios": "^1.0.1"
}
},
"react-native-restart": {
"version": "0.0.9",
......
......@@ -20,7 +20,8 @@
"commit-release": "node ./tools/bin/commit-release.js",
"tag-release": "node ./tools/bin/tag-release.js",
"update-changelog": "node ./tools/bin/update-changelog.js",
"release": "node ./tools/release-wizard.js"
"release": "node ./tools/release-wizard.js",
"clear": ". scripts/Clear.sh"
},
"dependencies": {
"@ptomasroos/react-native-multi-slider": "^1.0.0",
......@@ -42,7 +43,7 @@
"react-native-fs": "^2.13.3",
"react-native-hyperlink": "0.0.14",
"react-native-modal-datetime-picker-nevo": "^4.11.0",
"react-native-push-notification": "github:jfr3000/react-native-push-notification",
"react-native-push-notification": "github:sdvig/react-native-push-notification",
"react-native-restart": "0.0.9",
"react-native-share": "^1.1.3",
"react-native-vector-icons": "^6.4.2",
......
#!/bin/bash
echo "rm -rf ios/build..."
rm -rf ios/build
echo "rm -rf android/app/build..."
rm -rf android/app/build
echo "Removed all Xcode derived data..."
rm -rf ~/Library/Developer/Xcode/DerivedData
echo "watchman watch-del-all..."
watchman watch-del-all
echo "rm -rf node_modules..."
rm -rf node_modules
echo "npm install..."
npm install
echo "rm -rf $TMPDIR/react-*..."
rm -rf $TMPDIR/react-*
echo "rm -rf $TMPDIR/haste-map-react-native-packager-*..."
rm -rf $TMPDIR/haste-map-react-native-packager-*
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment