react-native-xg-push android 导入成功

This commit is contained in:
mx1700 2019-06-23 18:06:34 +08:00
parent 1e676e3da2
commit 26acb2d3e7
7 changed files with 135 additions and 59 deletions

View file

@ -103,13 +103,26 @@ android {
}
defaultConfig {
applicationId "com.timepill"
applicationId "com.timepill.diary"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
missingDimensionStrategy "RNN.reactNativeVersion", "reactNative57_5"
missingDimensionStrategy "RNN.reactNativeVersion", "~"
versionCode 1
versionName "1.0"
vectorDrawables.useSupportLibrary = true
ndk {
// cpu类型的.so库
abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a'
// 'x86', 'x86_64', 'mips', 'mips64'
}
manifestPlaceholders = [
XG_ACCESS_ID: '2100038490',
XG_ACCESS_KEY: 'A2NUN1219LNE',
HW_APPID: '',
PACKAGE_NAME: "com.timepill.diary"
]
}
splits {
abi {
@ -142,6 +155,7 @@ android {
dependencies {
implementation project(':react-native-smart-xgpush')
implementation project(':rn-fetch-blob')
implementation project(':react-native-image-crop-picker')
implementation project(':react-native-image-resizer')
@ -154,6 +168,17 @@ dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'com.tencent.xinge:xinge:4.3.2-release'
//jg包
implementation'com.tencent.jg:jg:1.1'
//wup包
implementation 'com.tencent.wup:wup:1.0.0.E-Release'
//mid包minSdkVersion 14
implementation 'com.tencent.mid:mid:4.0.7-Release'
compile 'com.tencent.xinge:xghw:2.5.2.300-release'
compile 'com.tencent.xinge:mipush:3.2.2-release'
compile 'com.tencent.xinge:xgmz:3.2.2-release'
}
// Run this once to be able to run the application with BUCK

View file

@ -15,7 +15,7 @@
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:allowBackup="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"

View file

@ -3,6 +3,7 @@ package com.timepill;
import android.app.Application;
import com.facebook.react.ReactApplication;
import com.rain.day.XGPushPackage;
import com.RNFetchBlob.RNFetchBlobPackage;
import com.reactnative.ivpusic.imagepicker.PickerPackage;
import fr.bamlab.rnimageresizer.ImageResizerPackage;
@ -48,7 +49,8 @@ public class MainApplication extends NavigationApplication {
//new RNDeviceInfo(),
new VectorIconsPackage(),
new AsyncStoragePackage(),
new PickerPackage()
new PickerPackage(),
new XGPushPackage()
);
}
@ -58,5 +60,4 @@ public class MainApplication extends NavigationApplication {
}
}

View file

@ -1,17 +1,24 @@
rootProject.name = 'Timepill'
include ':app'
include ':react-native-smart-xgpush'
project(':react-native-smart-xgpush').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-smart-xgpush/android')
include ':rn-fetch-blob'
project(':rn-fetch-blob').projectDir = new File(rootProject.projectDir, '../node_modules/rn-fetch-blob/android')
include ':react-native-image-crop-picker'
project(':react-native-image-crop-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-crop-picker/android')
include ':react-native-image-resizer'
project(':react-native-image-resizer').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-resizer/android')
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
include ':@react-native-community_async-storage'
project(':@react-native-community_async-storage').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/async-storage/android')
include ':app'
include ':react-native-navigation'
project(':react-native-navigation').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-navigation/lib/android/app/')

View file

@ -5,7 +5,6 @@
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; };
00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; };
@ -64,6 +63,7 @@
ED297163215061F000B7C4FE /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED297162215061F000B7C4FE /* JavaScriptCore.framework */; };
ED2971652150620600B7C4FE /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED2971642150620600B7C4FE /* JavaScriptCore.framework */; };
F343A722A8DB46C79081F2A0 /* Entypo.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 81F0243DD71F467A964CAD89 /* Entypo.ttf */; };
85CC1DC101F845E7A6C77B00 /* libRCTXGPushModule.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E259EF5D4BD4D388D1C513C /* libRCTXGPushModule.a */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@ -477,6 +477,8 @@
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
FE0D7FAFEDE44E168687B4B2 /* RNCAsyncStorage.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNCAsyncStorage.xcodeproj; path = "../node_modules/@react-native-community/async-storage/ios/RNCAsyncStorage.xcodeproj"; sourceTree = "<group>"; };
4C4A99AB1DC742A48D0A1515 /* RCTXGPushModule.xcodeproj */ = {isa = PBXFileReference; name = "RCTXGPushModule.xcodeproj"; path = "../node_modules/react-native-smart-xgpush/ios/RCTXGPushModule.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
3E259EF5D4BD4D388D1C513C /* libRCTXGPushModule.a */ = {isa = PBXFileReference; name = "libRCTXGPushModule.a"; path = "libRCTXGPushModule.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -514,6 +516,7 @@
9678DE108DEC4C5A9D92EA1D /* libimageCropPicker.a in Frameworks */,
4156314F2297CFBE009EB583 /* QBImagePicker.framework in Frameworks */,
35DCFF50947D4FCBBF5A8921 /* libRNFetchBlob.a in Frameworks */,
85CC1DC101F845E7A6C77B00 /* libRCTXGPushModule.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -785,6 +788,7 @@
DE970E03BCC84CE8A281A103 /* RCTImageResizer.xcodeproj */,
BDBA91D5680B4ACA83A7844B /* imageCropPicker.xcodeproj */,
99151F1A82BD48E0B5416458 /* RNFetchBlob.xcodeproj */,
4C4A99AB1DC742A48D0A1515 /* RCTXGPushModule.xcodeproj */,
);
name = Libraries;
sourceTree = "<group>";
@ -1534,6 +1538,7 @@
"$(SRCROOT)/../node_modules/react-native-image-resizer/ios/RCTImageResizer",
"$(SRCROOT)/../node_modules/react-native-image-crop-picker/ios/**",
"$(SRCROOT)/../node_modules/rn-fetch-blob/ios/**",
"$(SRCROOT)/../node_modules/react-native-smart-xgpush/ios/RCTXGPushModule",
);
INFOPLIST_FILE = TimepillTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
@ -1548,6 +1553,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
OTHER_LDFLAGS = (
"-ObjC",
@ -1572,6 +1578,7 @@
"$(SRCROOT)/../node_modules/react-native-image-resizer/ios/RCTImageResizer",
"$(SRCROOT)/../node_modules/react-native-image-crop-picker/ios/**",
"$(SRCROOT)/../node_modules/rn-fetch-blob/ios/**",
"$(SRCROOT)/../node_modules/react-native-smart-xgpush/ios/RCTXGPushModule",
);
INFOPLIST_FILE = TimepillTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
@ -1586,6 +1593,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
OTHER_LDFLAGS = (
"-ObjC",
@ -1611,6 +1619,7 @@
"$(SRCROOT)/../node_modules/react-native-image-resizer/ios/RCTImageResizer",
"$(SRCROOT)/../node_modules/react-native-image-crop-picker/ios/**",
"$(SRCROOT)/../node_modules/rn-fetch-blob/ios/**",
"$(SRCROOT)/../node_modules/react-native-smart-xgpush/ios/RCTXGPushModule",
);
INFOPLIST_FILE = Timepill/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
@ -1638,6 +1647,7 @@
"$(SRCROOT)/../node_modules/react-native-image-resizer/ios/RCTImageResizer",
"$(SRCROOT)/../node_modules/react-native-image-crop-picker/ios/**",
"$(SRCROOT)/../node_modules/rn-fetch-blob/ios/**",
"$(SRCROOT)/../node_modules/react-native-smart-xgpush/ios/RCTXGPushModule",
);
INFOPLIST_FILE = Timepill/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
@ -1672,6 +1682,7 @@
"$(SRCROOT)/../node_modules/react-native-image-resizer/ios/RCTImageResizer",
"$(SRCROOT)/../node_modules/react-native-image-crop-picker/ios/**",
"$(SRCROOT)/../node_modules/rn-fetch-blob/ios/**",
"$(SRCROOT)/../node_modules/react-native-smart-xgpush/ios/RCTXGPushModule",
);
INFOPLIST_FILE = "Timepill-tvOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
@ -1685,6 +1696,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
OTHER_LDFLAGS = (
"-ObjC",
@ -1718,6 +1730,7 @@
"$(SRCROOT)/../node_modules/react-native-image-resizer/ios/RCTImageResizer",
"$(SRCROOT)/../node_modules/react-native-image-crop-picker/ios/**",
"$(SRCROOT)/../node_modules/rn-fetch-blob/ios/**",
"$(SRCROOT)/../node_modules/react-native-smart-xgpush/ios/RCTXGPushModule",
);
INFOPLIST_FILE = "Timepill-tvOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
@ -1731,6 +1744,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
OTHER_LDFLAGS = (
"-ObjC",
@ -1763,6 +1777,7 @@
"$(SRCROOT)/../node_modules/react-native-image-resizer/ios/RCTImageResizer",
"$(SRCROOT)/../node_modules/react-native-image-crop-picker/ios/**",
"$(SRCROOT)/../node_modules/rn-fetch-blob/ios/**",
"$(SRCROOT)/../node_modules/react-native-smart-xgpush/ios/RCTXGPushModule",
);
INFOPLIST_FILE = "Timepill-tvOSTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
@ -1776,6 +1791,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
OTHER_LDFLAGS = (
"-ObjC",
@ -1808,6 +1824,7 @@
"$(SRCROOT)/../node_modules/react-native-image-resizer/ios/RCTImageResizer",
"$(SRCROOT)/../node_modules/react-native-image-crop-picker/ios/**",
"$(SRCROOT)/../node_modules/rn-fetch-blob/ios/**",
"$(SRCROOT)/../node_modules/react-native-smart-xgpush/ios/RCTXGPushModule",
);
INFOPLIST_FILE = "Timepill-tvOSTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
@ -1821,6 +1838,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
OTHER_LDFLAGS = (
"-ObjC",

58
package-lock.json generated
View file

@ -5015,7 +5015,8 @@
},
"ansi-regex": {
"version": "2.1.1",
"bundled": true
"bundled": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
@ -5033,11 +5034,13 @@
},
"balanced-match": {
"version": "1.0.0",
"bundled": true
"bundled": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@ -5050,15 +5053,18 @@
},
"code-point-at": {
"version": "1.1.0",
"bundled": true
"bundled": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true
"bundled": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true
"bundled": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
@ -5161,7 +5167,8 @@
},
"inherits": {
"version": "2.0.3",
"bundled": true
"bundled": true,
"optional": true
},
"ini": {
"version": "1.3.5",
@ -5171,6 +5178,7 @@
"is-fullwidth-code-point": {
"version": "1.0.0",
"bundled": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@ -5183,17 +5191,20 @@
"minimatch": {
"version": "3.0.4",
"bundled": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "0.0.8",
"bundled": true
"bundled": true,
"optional": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@ -5210,6 +5221,7 @@
"mkdirp": {
"version": "0.5.1",
"bundled": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@ -5282,7 +5294,8 @@
},
"number-is-nan": {
"version": "1.0.1",
"bundled": true
"bundled": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
@ -5292,6 +5305,7 @@
"once": {
"version": "1.4.0",
"bundled": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@ -5367,7 +5381,8 @@
},
"safe-buffer": {
"version": "5.1.2",
"bundled": true
"bundled": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
@ -5397,6 +5412,7 @@
"string-width": {
"version": "1.0.2",
"bundled": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@ -5414,6 +5430,7 @@
"strip-ansi": {
"version": "3.0.1",
"bundled": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@ -5452,11 +5469,13 @@
},
"wrappy": {
"version": "1.0.2",
"bundled": true
"bundled": true,
"optional": true
},
"yallist": {
"version": "3.0.3",
"bundled": true
"bundled": true,
"optional": true
}
}
},
@ -10830,9 +10849,9 @@
}
},
"react-native-device-info": {
"version": "1.6.1",
"resolved": "https://registry.npm.taobao.org/react-native-device-info/download/react-native-device-info-1.6.1.tgz",
"integrity": "sha1-cXFx2a0c44NY6Pkq3iHUGnBH/AI="
"version": "1.8.0",
"resolved": "https://registry.npm.taobao.org/react-native-device-info/download/react-native-device-info-1.8.0.tgz",
"integrity": "sha1-mKfjrbTj03fuupx1G9oDstf52jU="
},
"react-native-elements": {
"version": "0.19.0",
@ -10846,9 +10865,9 @@
}
},
"react-native-image-crop-picker": {
"version": "0.24.0",
"resolved": "https://registry.npm.taobao.org/react-native-image-crop-picker/download/react-native-image-crop-picker-0.24.0.tgz",
"integrity": "sha1-3xAVSPcpUb9m5WCIevc7EfMovdA="
"version": "0.24.1",
"resolved": "https://registry.npm.taobao.org/react-native-image-crop-picker/download/react-native-image-crop-picker-0.24.1.tgz",
"integrity": "sha1-RAjiuyDjwILAGR4KzwyMeh6YBOo="
},
"react-native-image-pan-zoom": {
"version": "2.1.11",
@ -10908,6 +10927,11 @@
"react-native-root-siblings": "^3.0.0"
}
},
"react-native-smart-xgpush": {
"version": "0.0.6",
"resolved": "https://registry.npm.taobao.org/react-native-smart-xgpush/download/react-native-smart-xgpush-0.0.6.tgz",
"integrity": "sha1-pG4VqfBgG6nhlAfZYj/63UnH96I="
},
"react-native-tab-view": {
"version": "1.3.0",
"resolved": "https://registry.npm.taobao.org/react-native-tab-view/download/react-native-tab-view-1.3.0.tgz",

View file

@ -14,9 +14,9 @@
"react-native": "0.59.5",
"react-native-actionsheet-api": "^1.0.4",
"react-native-datepicker": "^1.7.2",
"react-native-device-info": "^1.6.1",
"react-native-device-info": "^1.8.0",
"react-native-elements": "^0.19.0",
"react-native-image-crop-picker": "^0.24.0",
"react-native-image-crop-picker": "^0.24.1",
"react-native-image-pan-zoom": "^2.1.11",
"react-native-image-progress": "^1.1.1",
"react-native-image-resizer": "^1.0.0",
@ -24,6 +24,7 @@
"react-native-keyboard-spacer": "^0.4.1",
"react-native-navigation": "^2.18.5",
"react-native-root-toast": "^3.0.0",
"react-native-smart-xgpush": "0.0.6",
"react-native-tab-view": "^1.3.0",
"react-native-vector-icons": "^4.5.0",
"rn-fetch-blob": "^0.10.15"