Skip to content

Commit

Permalink
Adding support for push notifications in iOS for React Native 0.60+ (a…
Browse files Browse the repository at this point in the history
…ws-amplify#4478)

* Adding support for push notifications in iOS for React Native 0.60+(aws-amplify#4215) (aws-amplify#4401)
  • Loading branch information
Ashish-Nanda authored Nov 28, 2019
1 parent 86597db commit da4f07c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 30 deletions.
5 changes: 3 additions & 2 deletions packages/pushnotification/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"webpack": "^3.5.5"
},
"dependencies": {
"@aws-amplify/core": "^2.1.0"
"@aws-amplify/core": "^2.1.0",
"@react-native-community/push-notification-ios": "^1.0.2"
},
"peerdependencies": {
"react-native": "^0.55.0"
Expand All @@ -71,4 +72,4 @@
"/node_modules/"
]
}
}
}
2 changes: 1 addition & 1 deletion packages/pushnotification/src/PushNotification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import {
NativeModules,
DeviceEventEmitter,
AsyncStorage,
PushNotificationIOS,
Platform,
AppState,
} from 'react-native';
import PushNotificationIOS from '@react-native-community/push-notification-ios';
import Amplify, { ConsoleLogger as Logger } from '@aws-amplify/core';

const logger = new Logger('Notification');
Expand Down
45 changes: 18 additions & 27 deletions packages/pushnotification/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,20 @@
//WARNING: If you are manually specifying files to compile then the tsconfig.json is completely ignored, you must use command line flags
{
"compilerOptions": {
"outDir": "./lib/",
"target": "es5",
"noImplicitAny": false,
"lib": [
"es5",
"es2015",
"dom",
"esnext.asynciterable",
"es2017.object"
],
"sourceMap": true,
"module": "commonjs",
"moduleResolution": "node",
"allowJs": false,
"declaration": true,
"typeRoots": [
"./node_modules/@types",
"../../node_modules/@types"
],
// temporary fix
"types": ["node", "lodash"]
},
"include": [
"src/**/*"
]
}
"compilerOptions": {
"outDir": "./lib/",
"target": "es5",
"noImplicitAny": false,
"lib": ["es5", "es2015", "dom", "esnext.asynciterable", "es2017.object"],
"sourceMap": true,
"module": "commonjs",
"moduleResolution": "node",
"allowJs": false,
"declaration": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"typeRoots": ["./node_modules/@types", "../../node_modules/@types"],
// temporary fix
"types": ["node", "lodash"]
},
"include": ["src/**/*"]
}

0 comments on commit da4f07c

Please sign in to comment.