Browse Source

[Bug修复](2.0.0): 修复ios报错

Closes:
zhangzy 5 years ago
parent
commit
3cbe4646bc
2 changed files with 45 additions and 14 deletions
  1. 1 1
      index.js
  2. 44 13
      package.json

+ 1 - 1
index.js

@@ -7,12 +7,12 @@
 import {
     NativeModules,
     Platform,
-    PushNotificationIOS,
     NativeEventEmitter,
     PermissionsAndroid,
 } from 'react-native';
 
 const MIPushModule = NativeModules.MIPushModule;
+import PushNotificationIOS from '@react-native-community/push-notification-ios'
 
 /**
  * 获取app的版本名称\版本号和渠道名

+ 44 - 13
package.json

@@ -1,23 +1,54 @@
 {
-  "name": "react-native-xmpush",
-  "version": "2.0.0",
-  "description": "集成小米推送",
-  "main": "index.js",
-  "scripts": {
-    "test": "echo \"Error: no test specified\" && exit 1"
+  "_from": "react-native-xmpush@2.0.0",
+  "_id": "react-native-xmpush@2.0.0",
+  "_inBundle": false,
+  "_integrity": "sha512-IjhmAgVg5P/ucQR4AeSdSNx74ovV5+ipvfWDA/IVMPopGy8ec/yZCS2soMfyeZCi/jxu/i3YX7TmZtUbPe9ADg==",
+  "_location": "/react-native-xmpush",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "version",
+    "registry": true,
+    "raw": "react-native-xmpush@2.0.0",
+    "name": "react-native-xmpush",
+    "escapedName": "react-native-xmpush",
+    "rawSpec": "2.0.0",
+    "saveSpec": null,
+    "fetchSpec": "2.0.0"
   },
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/a289459798/react-native-mipush.git"
+  "_requiredBy": [
+    "#USER",
+    "/"
+  ],
+  "_resolved": "https://registry.npmjs.org/react-native-xmpush/-/react-native-xmpush-2.0.0.tgz",
+  "_shasum": "cfddae80eddc111aa74294b5b4c3b0df5b6247ee",
+  "_spec": "react-native-xmpush@2.0.0",
+  "_where": "/Users/zhangzy/workspace/android/5ichong/academy",
+  "author": {
+    "name": "zzy"
+  },
+  "bugs": {
+    "url": "https://github.com/a289459798/react-native-mipush/issues"
   },
+  "bundleDependencies": false,
+  "peerDependencies": {
+    "@react-native-community/push-notification-ios": "^1.0.3"
+  },
+  "deprecated": false,
+  "description": "集成小米推送",
+  "homepage": "https://github.com/a289459798/react-native-mipush#readme",
   "keywords": [
     "react-native",
     "mipush"
   ],
-  "author": "zzy",
   "license": "ISC",
-  "bugs": {
-    "url": "https://github.com/a289459798/react-native-mipush/issues"
+  "main": "index.js",
+  "name": "react-native-xmpush",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/a289459798/react-native-mipush.git"
+  },
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1"
   },
-  "homepage": "https://github.com/a289459798/react-native-mipush#readme"
+  "version": "2.0.0"
 }