merged with master

This commit is contained in:
u-e 2018-12-03 15:47:31 +03:00
commit 2d74f4af2a
19 changed files with 1694 additions and 1434 deletions

View File

@ -2,10 +2,10 @@
# platform :ios, '9.0' # platform :ios, '9.0'
target 'eSteem' do target 'eSteem' do
pod 'AppCenter/Push' pod 'AppCenter/Push', '~> 1.11.0'
pod 'AppCenter/Crashes' pod 'AppCenter/Crashes', '~> 1.11.0'
pod 'AppCenter/Analytics' pod 'AppCenter/Analytics', '~> 1.11.0'
pod 'AppCenterReactNativeShared' pod 'AppCenterReactNativeShared', '~> 1.10.0'
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks! # use_frameworks!

View File

@ -24,28 +24,21 @@ PODS:
- yoga (0.57.7.React) - yoga (0.57.7.React)
DEPENDENCIES: DEPENDENCIES:
- AppCenter/Analytics - AppCenter/Analytics (~> 1.11.0)
- AppCenter/Crashes - AppCenter/Crashes (~> 1.11.0)
- AppCenter/Push - AppCenter/Push (~> 1.11.0)
- AppCenterReactNativeShared - AppCenterReactNativeShared (~> 1.10.0)
- React/RCTImage (from `../node_modules/react-native`) - React/RCTImage (from `../node_modules/react-native`)
- RNImageCropPicker (from `../node_modules/react-native-image-crop-picker`) - RNImageCropPicker (from `../node_modules/react-native-image-crop-picker`)
- yoga (from `../node_modules/react-native/ReactCommon/yoga`) - yoga (from `../node_modules/react-native/ReactCommon/yoga`)
SPEC REPOS:
https://github.com/cocoapods/specs.git:
- AppCenter
- AppCenterReactNativeShared
- QBImagePickerController
- RSKImageCropper
EXTERNAL SOURCES: EXTERNAL SOURCES:
React: React:
:path: "../node_modules/react-native" :path: ../node_modules/react-native
RNImageCropPicker: RNImageCropPicker:
:path: "../node_modules/react-native-image-crop-picker" :path: ../node_modules/react-native-image-crop-picker
yoga: yoga:
:path: "../node_modules/react-native/ReactCommon/yoga" :path: ../node_modules/react-native/ReactCommon/yoga
SPEC CHECKSUMS: SPEC CHECKSUMS:
AppCenter: 3bccf8d733e337d0db574dd4cb0e33ab9637b7f2 AppCenter: 3bccf8d733e337d0db574dd4cb0e33ab9637b7f2
@ -56,6 +49,6 @@ SPEC CHECKSUMS:
RSKImageCropper: 98296ad26b41753f796b6898d015509598f13d97 RSKImageCropper: 98296ad26b41753f796b6898d015509598f13d97
yoga: b1ce48b6cf950b98deae82838f5173ea7cf89e85 yoga: b1ce48b6cf950b98deae82838f5173ea7cf89e85
PODFILE CHECKSUM: 5da63220b873970ec42a57faf59896ecb522cb08 PODFILE CHECKSUM: ec86702456a70648c23972c332c8648d93335b88
COCOAPODS: 1.5.3 COCOAPODS: 1.5.3

23
ios/Pods/Manifest.lock generated
View File

@ -24,28 +24,21 @@ PODS:
- yoga (0.57.7.React) - yoga (0.57.7.React)
DEPENDENCIES: DEPENDENCIES:
- AppCenter/Analytics - AppCenter/Analytics (~> 1.11.0)
- AppCenter/Crashes - AppCenter/Crashes (~> 1.11.0)
- AppCenter/Push - AppCenter/Push (~> 1.11.0)
- AppCenterReactNativeShared - AppCenterReactNativeShared (~> 1.10.0)
- React/RCTImage (from `../node_modules/react-native`) - React/RCTImage (from `../node_modules/react-native`)
- RNImageCropPicker (from `../node_modules/react-native-image-crop-picker`) - RNImageCropPicker (from `../node_modules/react-native-image-crop-picker`)
- yoga (from `../node_modules/react-native/ReactCommon/yoga`) - yoga (from `../node_modules/react-native/ReactCommon/yoga`)
SPEC REPOS:
https://github.com/cocoapods/specs.git:
- AppCenter
- AppCenterReactNativeShared
- QBImagePickerController
- RSKImageCropper
EXTERNAL SOURCES: EXTERNAL SOURCES:
React: React:
:path: "../node_modules/react-native" :path: ../node_modules/react-native
RNImageCropPicker: RNImageCropPicker:
:path: "../node_modules/react-native-image-crop-picker" :path: ../node_modules/react-native-image-crop-picker
yoga: yoga:
:path: "../node_modules/react-native/ReactCommon/yoga" :path: ../node_modules/react-native/ReactCommon/yoga
SPEC CHECKSUMS: SPEC CHECKSUMS:
AppCenter: 3bccf8d733e337d0db574dd4cb0e33ab9637b7f2 AppCenter: 3bccf8d733e337d0db574dd4cb0e33ab9637b7f2
@ -56,6 +49,6 @@ SPEC CHECKSUMS:
RSKImageCropper: 98296ad26b41753f796b6898d015509598f13d97 RSKImageCropper: 98296ad26b41753f796b6898d015509598f13d97
yoga: b1ce48b6cf950b98deae82838f5173ea7cf89e85 yoga: b1ce48b6cf950b98deae82838f5173ea7cf89e85
PODFILE CHECKSUM: 5da63220b873970ec42a57faf59896ecb522cb08 PODFILE CHECKSUM: ec86702456a70648c23972c332c8648d93335b88
COCOAPODS: 1.5.3 COCOAPODS: 1.5.3

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/QBImagePickerController CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/QBImagePickerController
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/QBImagePickerController" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/QBImagePickerController" HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/QBImagePickerController" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AppCenter" "${PODS_ROOT}/Headers/Public/AppCenterReactNativeShared" "${PODS_ROOT}/Headers/Public/QBImagePickerController" "${PODS_ROOT}/Headers/Public/RNImageCropPicker" "${PODS_ROOT}/Headers/Public/RSKImageCropper" "${PODS_ROOT}/Headers/Public/React" "${PODS_ROOT}/Headers/Public/yoga"
OTHER_LDFLAGS = -framework "Photos" OTHER_LDFLAGS = -framework "Photos"
PODS_BUILD_DIR = ${BUILD_DIR} PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)

View File

@ -1,6 +1,6 @@
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/RNImageCropPicker" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/QBImagePickerController" "${PODS_ROOT}/Headers/Public/RNImageCropPicker" "${PODS_ROOT}/Headers/Public/RSKImageCropper" "${PODS_ROOT}/Headers/Public/React" "${PODS_ROOT}/Headers/Public/yoga" HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/RNImageCropPicker" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AppCenter" "${PODS_ROOT}/Headers/Public/AppCenterReactNativeShared" "${PODS_ROOT}/Headers/Public/QBImagePickerController" "${PODS_ROOT}/Headers/Public/RNImageCropPicker" "${PODS_ROOT}/Headers/Public/RSKImageCropper" "${PODS_ROOT}/Headers/Public/React" "${PODS_ROOT}/Headers/Public/yoga"
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/QBImagePickerController" "${PODS_CONFIGURATION_BUILD_DIR}/RSKImageCropper" "${PODS_CONFIGURATION_BUILD_DIR}/React" "${PODS_CONFIGURATION_BUILD_DIR}/yoga" LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/QBImagePickerController" "${PODS_CONFIGURATION_BUILD_DIR}/RSKImageCropper" "${PODS_CONFIGURATION_BUILD_DIR}/React" "${PODS_CONFIGURATION_BUILD_DIR}/yoga"
PODS_BUILD_DIR = ${BUILD_DIR} PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)

View File

@ -1,6 +1,6 @@
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/RSKImageCropper CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/RSKImageCropper
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/RSKImageCropper" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/RSKImageCropper" HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/RSKImageCropper" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AppCenter" "${PODS_ROOT}/Headers/Public/AppCenterReactNativeShared" "${PODS_ROOT}/Headers/Public/QBImagePickerController" "${PODS_ROOT}/Headers/Public/RNImageCropPicker" "${PODS_ROOT}/Headers/Public/RSKImageCropper" "${PODS_ROOT}/Headers/Public/React" "${PODS_ROOT}/Headers/Public/yoga"
OTHER_LDFLAGS = -framework "QuartzCore" -framework "UIKit" OTHER_LDFLAGS = -framework "QuartzCore" -framework "UIKit"
PODS_BUILD_DIR = ${BUILD_DIR} PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)

View File

@ -1,7 +1,7 @@
CLANG_CXX_LANGUAGE_STANDARD = c++14 CLANG_CXX_LANGUAGE_STANDARD = c++14
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/React CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/React
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/React" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/React" "${PODS_ROOT}/Headers/Public/yoga" "$(PODS_TARGET_SRCROOT)/ReactCommon" HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/React" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AppCenter" "${PODS_ROOT}/Headers/Public/AppCenterReactNativeShared" "${PODS_ROOT}/Headers/Public/QBImagePickerController" "${PODS_ROOT}/Headers/Public/RNImageCropPicker" "${PODS_ROOT}/Headers/Public/RSKImageCropper" "${PODS_ROOT}/Headers/Public/React" "${PODS_ROOT}/Headers/Public/yoga" "$(PODS_TARGET_SRCROOT)/ReactCommon"
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/yoga" LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/yoga"
OTHER_LDFLAGS = -l"stdc++" -framework "JavaScriptCore" OTHER_LDFLAGS = -l"stdc++" -framework "JavaScriptCore"
PODS_BUILD_DIR = ${BUILD_DIR} PODS_BUILD_DIR = ${BUILD_DIR}

View File

@ -1,6 +1,6 @@
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/yoga CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/yoga
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/yoga" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/yoga" HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/yoga" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AppCenter" "${PODS_ROOT}/Headers/Public/AppCenterReactNativeShared" "${PODS_ROOT}/Headers/Public/QBImagePickerController" "${PODS_ROOT}/Headers/Public/RNImageCropPicker" "${PODS_ROOT}/Headers/Public/RSKImageCropper" "${PODS_ROOT}/Headers/Public/React" "${PODS_ROOT}/Headers/Public/yoga"
PODS_BUILD_DIR = ${BUILD_DIR} PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT} PODS_ROOT = ${SRCROOT}

View File

@ -5,7 +5,6 @@
}; };
objectVersion = 46; objectVersion = 46;
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; };
00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; };
@ -417,6 +416,27 @@
remoteGlobalIDString = 2D2A28201D9B03D100D4039D; remoteGlobalIDString = 2D2A28201D9B03D100D4039D;
remoteInfo = "RCTAnimation-tvOS"; remoteInfo = "RCTAnimation-tvOS";
}; };
6F6DFB3D21B3E6FA00E0A36D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1E5BA5C385A94A9996A8961A /* AppCenterReactNativePush.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = BA189FAA1EEE74F100CAD13F;
remoteInfo = AppCenterReactNativePush;
};
6F6DFB4521B3E6FA00E0A36D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 134814201AA4EA6300B7C361;
remoteInfo = RCTAnimation;
};
6F6DFB4721B3E6FA00E0A36D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 2D2A28201D9B03D100D4039D;
remoteInfo = "RCTAnimation-tvOS";
};
78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy; isa = PBXContainerItemProxy;
containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
@ -509,6 +529,7 @@
60FC401F76F74AB5BCE41DD2 /* Sansation_Bold.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Sansation_Bold.ttf; path = ../src/assets/Fonts/Sansation_Bold.ttf; sourceTree = "<group>"; }; 60FC401F76F74AB5BCE41DD2 /* Sansation_Bold.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Sansation_Bold.ttf; path = ../src/assets/Fonts/Sansation_Bold.ttf; sourceTree = "<group>"; };
617E4B90481842DBB13C3A11 /* AppCenter-Config.plist */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = text.plist.xml; name = "AppCenter-Config.plist"; path = "eSteem/AppCenter-Config.plist"; sourceTree = "<group>"; }; 617E4B90481842DBB13C3A11 /* AppCenter-Config.plist */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = text.plist.xml; name = "AppCenter-Config.plist"; path = "eSteem/AppCenter-Config.plist"; sourceTree = "<group>"; };
6D37F7E2845F42099DED229F /* Octicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Octicons.ttf; path = ../src/assets/Fonts/Octicons.ttf; sourceTree = "<group>"; }; 6D37F7E2845F42099DED229F /* Octicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Octicons.ttf; path = ../src/assets/Fonts/Octicons.ttf; sourceTree = "<group>"; };
6F6DFC3C21B3EC6E00E0A36D /* eSteem.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = eSteem.entitlements; path = eSteem/eSteem.entitlements; sourceTree = "<group>"; };
70B117F9F2927459CA5BDA3C /* libPods-eSteem.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-eSteem.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 70B117F9F2927459CA5BDA3C /* libPods-eSteem.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-eSteem.a"; sourceTree = BUILT_PRODUCTS_DIR; };
7609259AA619FAA7DA1B0779 /* libPods-eSteem-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-eSteem-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 7609259AA619FAA7DA1B0779 /* libPods-eSteem-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-eSteem-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; }; 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
@ -808,7 +829,7 @@
13B07FAE1A68108700A75B9A /* eSteem */ = { 13B07FAE1A68108700A75B9A /* eSteem */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
0C51B07921B45A3500E7A2D1 /* eSteem.entitlements */, 6F6DFC3C21B3EC6E00E0A36D /* eSteem.entitlements */,
008F07F21AC5B25A0029DE68 /* main.jsbundle */, 008F07F21AC5B25A0029DE68 /* main.jsbundle */,
13B07FAF1A68108700A75B9A /* AppDelegate.h */, 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
13B07FB01A68108700A75B9A /* AppDelegate.m */, 13B07FB01A68108700A75B9A /* AppDelegate.m */,
@ -860,8 +881,16 @@
5E91572E1DD0AC6500FF2AA8 /* Products */ = { 5E91572E1DD0AC6500FF2AA8 /* Products */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
94D7D3CD21B3E7F100476275 /* libRCTAnimation.a */, 6F6DFB4621B3E6FA00E0A36D /* libRCTAnimation.a */,
94D7D3CF21B3E7F100476275 /* libRCTAnimation.a */, 6F6DFB4821B3E6FA00E0A36D /* libRCTAnimation.a */,
);
name = Products;
sourceTree = "<group>";
};
6F6DFB2E21B3E6F800E0A36D /* Products */ = {
isa = PBXGroup;
children = (
6F6DFB3E21B3E6FA00E0A36D /* libAppCenterReactNativePush.a */,
); );
name = Products; name = Products;
sourceTree = "<group>"; sourceTree = "<group>";
@ -1014,6 +1043,8 @@
00E356EA1AD99517003FC87E /* Sources */, 00E356EA1AD99517003FC87E /* Sources */,
00E356EB1AD99517003FC87E /* Frameworks */, 00E356EB1AD99517003FC87E /* Frameworks */,
00E356EC1AD99517003FC87E /* Resources */, 00E356EC1AD99517003FC87E /* Resources */,
0B24CB1EABFA7AB3D0CDDEDA /* [CP] Copy Pods Resources */,
FEA575B9607687EFDC8D24EE /* [CP] Embed Pods Frameworks */,
); );
buildRules = ( buildRules = (
); );
@ -1035,6 +1066,7 @@
13B07F8E1A680F5B00A75B9A /* Resources */, 13B07F8E1A680F5B00A75B9A /* Resources */,
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
9EA5AE6570C5AD4044128B10 /* [CP] Copy Pods Resources */, 9EA5AE6570C5AD4044128B10 /* [CP] Copy Pods Resources */,
D25874F75A215F66412A5A14 /* [CP] Embed Pods Frameworks */,
); );
buildRules = ( buildRules = (
); );
@ -1054,6 +1086,8 @@
2D02E4781E0B4A5D006451C7 /* Frameworks */, 2D02E4781E0B4A5D006451C7 /* Frameworks */,
2D02E4791E0B4A5D006451C7 /* Resources */, 2D02E4791E0B4A5D006451C7 /* Resources */,
2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */, 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */,
D35636FB2923D3ACB67C010A /* [CP] Embed Pods Frameworks */,
EBCFA561F5949B587575ED25 /* [CP] Copy Pods Resources */,
); );
buildRules = ( buildRules = (
); );
@ -1072,6 +1106,8 @@
2D02E48C1E0B4A5D006451C7 /* Sources */, 2D02E48C1E0B4A5D006451C7 /* Sources */,
2D02E48D1E0B4A5D006451C7 /* Frameworks */, 2D02E48D1E0B4A5D006451C7 /* Frameworks */,
2D02E48E1E0B4A5D006451C7 /* Resources */, 2D02E48E1E0B4A5D006451C7 /* Resources */,
23FFCD4F7198876FCA459CF7 /* [CP] Embed Pods Frameworks */,
198AF4201012A90ABC204B3A /* [CP] Copy Pods Resources */,
); );
buildRules = ( buildRules = (
); );
@ -1100,6 +1136,9 @@
DevelopmentTeam = V4RRE3CHH2; DevelopmentTeam = V4RRE3CHH2;
ProvisioningStyle = Manual; ProvisioningStyle = Manual;
SystemCapabilities = { SystemCapabilities = {
com.apple.BackgroundModes = {
enabled = 1;
};
com.apple.Push = { com.apple.Push = {
enabled = 1; enabled = 1;
}; };
@ -1141,7 +1180,7 @@
ProjectRef = 5781B02C94A842A6A5F5D701 /* AppCenterReactNativeCrashes.xcodeproj */; ProjectRef = 5781B02C94A842A6A5F5D701 /* AppCenterReactNativeCrashes.xcodeproj */;
}, },
{ {
ProductGroup = 94D7D3B521B3E7EE00476275 /* Products */; ProductGroup = 6F6DFB2E21B3E6F800E0A36D /* Products */;
ProjectRef = 1E5BA5C385A94A9996A8961A /* AppCenterReactNativePush.xcodeproj */; ProjectRef = 1E5BA5C385A94A9996A8961A /* AppCenterReactNativePush.xcodeproj */;
}, },
{ {
@ -1554,6 +1593,27 @@
remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */; remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR; sourceTree = BUILT_PRODUCTS_DIR;
}; };
6F6DFB3E21B3E6FA00E0A36D /* libAppCenterReactNativePush.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libAppCenterReactNativePush.a;
remoteRef = 6F6DFB3D21B3E6FA00E0A36D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
6F6DFB4621B3E6FA00E0A36D /* libRCTAnimation.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRCTAnimation.a;
remoteRef = 6F6DFB4521B3E6FA00E0A36D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
6F6DFB4821B3E6FA00E0A36D /* libRCTAnimation.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRCTAnimation.a;
remoteRef = 6F6DFB4721B3E6FA00E0A36D /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = {
isa = PBXReferenceProxy; isa = PBXReferenceProxy;
fileType = archive.ar; fileType = archive.ar;
@ -1705,6 +1765,36 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
198AF4201012A90ABC204B3A /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-eSteem-tvOSTests/Pods-eSteem-tvOSTests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
23FFCD4F7198876FCA459CF7 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-eSteem-tvOSTests/Pods-eSteem-tvOSTests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = { 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
@ -1775,6 +1865,66 @@
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-eSteem/Pods-eSteem-resources.sh\"\n"; shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-eSteem/Pods-eSteem-resources.sh\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
D25874F75A215F66412A5A14 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-eSteem/Pods-eSteem-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
D35636FB2923D3ACB67C010A /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-eSteem-tvOS/Pods-eSteem-tvOS-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
EBCFA561F5949B587575ED25 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-eSteem-tvOS/Pods-eSteem-tvOS-resources.sh\"\n";
showEnvVarsInLog = 0;
};
FEA575B9607687EFDC8D24EE /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-eSteemTests/Pods-eSteemTests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */ /* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */

View File

@ -2,14 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>NSMicrophoneUsageDescription</key>
<string>Microphone Usage Access</string>
<key>NSCameraUsageDescription</key>
<string>Camera Usage Access</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Photo Usage Access</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Photo Library Access</string>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>en</string> <string>en</string>
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
@ -45,8 +37,16 @@
</dict> </dict>
</dict> </dict>
</dict> </dict>
<key>NSCameraUsageDescription</key>
<string>Camera Usage Access</string>
<key>NSLocationWhenInUseUsageDescription</key> <key>NSLocationWhenInUseUsageDescription</key>
<string/> <string/>
<key>NSMicrophoneUsageDescription</key>
<string>Microphone Usage Access</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Photo Library Access</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Photo Usage Access</string>
<key>UIAppFonts</key> <key>UIAppFonts</key>
<array> <array>
<string>Entypo.ttf</string> <string>Entypo.ttf</string>
@ -71,6 +71,10 @@
<string>FontAwesome5_Regular.ttf</string> <string>FontAwesome5_Regular.ttf</string>
<string>FontAwesome5_Solid.ttf</string> <string>FontAwesome5_Solid.ttf</string>
</array> </array>
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
</array>
<key>UILaunchStoryboardName</key> <key>UILaunchStoryboardName</key>
<string>LaunchScreen</string> <string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key> <key>UIRequiredDeviceCapabilities</key>

View File

@ -23,10 +23,10 @@
"@babel/runtime": "^7.1.2", "@babel/runtime": "^7.1.2",
"@esteemapp/react-native-scrollable-tab-view": "^0.8.2", "@esteemapp/react-native-scrollable-tab-view": "^0.8.2",
"@esteemapp/react-native-tags": "^1.3.1", "@esteemapp/react-native-tags": "^1.3.1",
"appcenter": "1.9.0", "appcenter": "^1.10.0",
"appcenter-analytics": "1.9.0", "appcenter-analytics": "^1.10.0",
"appcenter-crashes": "1.9.0", "appcenter-crashes": "^1.10.0",
"appcenter-push": "1.10.0", "appcenter-push": "^1.10.0",
"axios": "^0.18.0", "axios": "^0.18.0",
"buffer": "^5.2.1", "buffer": "^5.2.1",
"crypto-js": "^3.1.9-1", "crypto-js": "^3.1.9-1",

View File

@ -1,3 +1,4 @@
export default { export default {
IS_EXIST_USER: 'IS_EXIST_USER', IS_EXIST_USER: 'IS_EXIST_USER',
PUSH_TOKEN_SAVED: 'PUSH_TOKEN_SAVED',
}; };

View File

@ -107,6 +107,19 @@ export const markActivityAsRead = (user, id = null) => new Promise((resolve, rej
}); });
}); });
export const setPushToken = data => new Promise((resolve, reject) => {
api
.post('/rgstrmbldvc/', data)
.then((res) => {
resolve(res.data);
})
.catch((error) => {
reject(error);
});
});
// SEARCH API
export const search = data => new Promise((resolve, reject) => { export const search = data => new Promise((resolve, reject) => {
searchApi searchApi
.post('/search', data) .post('/search', data)

View File

@ -5,6 +5,7 @@ const USER_SCHEMA = 'user';
const AUTH_SCHEMA = 'auth'; const AUTH_SCHEMA = 'auth';
const DRAFT_SCHEMA = 'draft'; const DRAFT_SCHEMA = 'draft';
const SETTINGS_SCHEMA = 'settings'; const SETTINGS_SCHEMA = 'settings';
const APPLICATION_SCHEMA = 'application';
const userSchema = { const userSchema = {
name: USER_SCHEMA, name: USER_SCHEMA,
@ -41,6 +42,13 @@ const settingsSchema = {
}, },
}; };
const applicationSchema = {
name: APPLICATION_SCHEMA,
properties: {
isPushTokenSaved: { type: 'bool', default: false },
},
};
const authSchema = { const authSchema = {
name: AUTH_SCHEMA, name: AUTH_SCHEMA,
properties: { properties: {
@ -52,7 +60,7 @@ const authSchema = {
const realm = new Realm({ const realm = new Realm({
path: 'esteem.realm', path: 'esteem.realm',
schema: [userSchema, authSchema, draftSchema, settingsSchema], schema: [userSchema, authSchema, draftSchema, settingsSchema, applicationSchema],
}); });
const settings = realm.objects(SETTINGS_SCHEMA); const settings = realm.objects(SETTINGS_SCHEMA);
@ -359,3 +367,40 @@ export const getSettings = () => new Promise((resolve, reject) => {
reject(error); reject(error);
} }
}); });
export const getPushTokenSaved = () => new Promise((resolve, reject) => {
try {
const application = realm.objects(APPLICATION_SCHEMA);
if (!application[0]) {
setPushTokenSaved(JSON.stringify(false));
resolve(false);
}
if (application[0].isPushTokenSaved) {
resolve((application[0].isPushTokenSaved));
} else {
resolve(false);
}
} catch (error) {
reject(error);
}
});
export const setPushTokenSaved = pushTokenSaved => new Promise((resolve, reject) => {
try {
const application = realm.objects(APPLICATION_SCHEMA);
realm.write(() => {
if (Array.from(application).length > 0) {
application[0].isPushTokenSaved = pushTokenSaved;
resolve(application[0]);
} else {
const applicationData = {
pushTokenSaved: false,
};
realm.create(APPLICATION_SCHEMA, { ...applicationData });
resolve(applicationData);
}
});
} catch (error) {
reject(error);
}
});

View File

@ -1,14 +1,25 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { AsyncStorage, Platform } from 'react-native';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { addLocaleData } from 'react-intl'; import { addLocaleData } from 'react-intl';
import Config from 'react-native-config'; import Config from 'react-native-config';
import AppCenter from 'appcenter';
// Constants // Constants
import en from 'react-intl/locale-data/en'; import en from 'react-intl/locale-data/en';
import tr from 'react-intl/locale-data/tr'; import tr from 'react-intl/locale-data/tr';
import INITIAL from '../../../constants/initial';
import { getUserData, getAuthStatus, getSettings } from '../../../realm/realm'; // Services
import {
getUserData,
getAuthStatus,
getSettings,
getPushTokenSaved,
setPushTokenSaved,
} from '../../../realm/realm';
import { getUser } from '../../../providers/steem/dsteem'; import { getUser } from '../../../providers/steem/dsteem';
import { setPushToken } from '../../../providers/esteem/esteem';
// Actions // Actions
import { import {
@ -31,6 +42,7 @@ import {
import { ApplicationScreen } from '..'; import { ApplicationScreen } from '..';
addLocaleData([...en, ...tr]); addLocaleData([...en, ...tr]);
/* eslint-disable */
// symbol polyfills // symbol polyfills
global.Symbol = require('core-js/es6/symbol'); global.Symbol = require('core-js/es6/symbol');
require('core-js/fn/symbol/iterator'); require('core-js/fn/symbol/iterator');
@ -39,6 +51,7 @@ require('core-js/fn/symbol/iterator');
require('core-js/fn/map'); require('core-js/fn/map');
require('core-js/fn/set'); require('core-js/fn/set');
require('core-js/fn/array/find'); require('core-js/fn/array/find');
/* eslint-enable */
class ApplicationContainer extends Component { class ApplicationContainer extends Component {
constructor() { constructor() {
@ -85,6 +98,7 @@ class ApplicationContainer extends Component {
dispatch(openPinCodeModal()); dispatch(openPinCodeModal());
} }
this._connectNotificationServer(accountData.name); this._connectNotificationServer(accountData.name);
this._setPushToken(accountData.name);
}) })
.catch((err) => { .catch((err) => {
alert(err); alert(err);
@ -101,6 +115,7 @@ class ApplicationContainer extends Component {
const { dispatch } = this.props; const { dispatch } = this.props;
getSettings().then((response) => { getSettings().then((response) => {
console.log('response :', response);
if (response) { if (response) {
response.isDarkTheme && dispatch(isDarkTheme(response.isDarkTheme)); response.isDarkTheme && dispatch(isDarkTheme(response.isDarkTheme));
response.language && dispatch(setLanguage(response.language)); response.language && dispatch(setLanguage(response.language));
@ -122,6 +137,29 @@ class ApplicationContainer extends Component {
}; };
}; };
_setPushToken = async (username) => {
const { notificationSettings } = this.props;
const token = await AppCenter.getInstallId();
AsyncStorage.getItem(INITIAL.IS_EXIST_USER, (err, result) => {
if (JSON.parse(result)) {
getPushTokenSaved().then((isPushTokenSaved) => {
if (!isPushTokenSaved) {
const data = {
username,
token,
system: Platform.OS,
allows_notify: notificationSettings,
};
setPushToken(data).then(() => {
setPushTokenSaved(JSON.stringify(true));
});
}
});
}
});
};
render() { render() {
const { selectedLanguage } = this.props; const { selectedLanguage } = this.props;
const { isRenderRequire } = this.state; const { isRenderRequire } = this.state;
@ -142,6 +180,7 @@ const mapStateToProps = state => ({
isDarkTheme: state.application.isDarkTheme, isDarkTheme: state.application.isDarkTheme,
selectedLanguage: state.application.language, selectedLanguage: state.application.language,
unreadActivityCount: state.account.currentAccount.unread_activity_count, unreadActivityCount: state.account.currentAccount.unread_activity_count,
notificationSettings: state.application.isNotificationOpen,
}); });
export default connect(mapStateToProps)(ApplicationContainer); export default connect(mapStateToProps)(ApplicationContainer);

View File

@ -1,6 +1,7 @@
import React, { Component, Fragment } from 'react'; import React, { Component, Fragment } from 'react';
import { AppState, AsyncStorage } from 'react-native'; import { AppState, AsyncStorage } from 'react-native';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import Push from 'appcenter-push';
// Actions // Actions
import { openPinCodeModal } from '../../../redux/actions/applicationActions'; import { openPinCodeModal } from '../../../redux/actions/applicationActions';
@ -10,8 +11,8 @@ import { Modal } from '../../../components';
import { PinCode } from '../..'; import { PinCode } from '../..';
// Constants // Constants
import { default as ROUTES } from '../../../constants/routeNames'; import ROUTES from '../../../constants/routeNames';
import { default as INITIAL } from '../../../constants/initial'; import INITIAL from '../../../constants/initial';
const RootContainer = () => (WrappedComponent) => { const RootContainer = () => (WrappedComponent) => {
class RootComponent extends Component { class RootComponent extends Component {
@ -33,6 +34,7 @@ const RootContainer = () => (WrappedComponent) => {
componentDidMount() { componentDidMount() {
AppState.addEventListener('change', this._handleAppStateChange); AppState.addEventListener('change', this._handleAppStateChange);
this._createPushListener();
} }
componentWillUnmount() { componentWillUnmount() {
@ -65,6 +67,25 @@ const RootContainer = () => (WrappedComponent) => {
this.setState({ wrappedComponentStates: { ...data } }); this.setState({ wrappedComponentStates: { ...data } });
}; };
_createPushListener = () => {
const { navigation } = this.props;
Push.setListener({
onPushNotificationReceived(pushNotification) {
if (AppState.currentState === 'background') {
if (pushNotification.customProperties.routeName) {
navigation.navigate({
routeName: pushNotification.customProperties.routeName,
});
} else {
navigation.navigate({
routeName: ROUTES.TABBAR.NOTIFICATION,
});
}
}
},
});
};
render() { render() {
const { isPinCodeReqiure, navigation } = this.props; const { isPinCodeReqiure, navigation } = this.props;
const { pinCodeStates, wrappedComponentStates } = this.state; const { pinCodeStates, wrappedComponentStates } = this.state;

View File

@ -1,5 +1,7 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { AsyncStorage, Platform } from 'react-native';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import AppCenter from 'appcenter';
// Realm // Realm
import { import {
@ -18,12 +20,15 @@ import {
setApi, setApi,
isDarkTheme, isDarkTheme,
} from '../../../redux/actions/applicationActions'; } from '../../../redux/actions/applicationActions';
import { setPushToken } from '../../../providers/esteem/esteem';
// Middleware // Middleware
// Constants // Constants
import { VALUE as CURRENCY_VALUE } from '../../../constants/options/currency'; import { VALUE as CURRENCY_VALUE } from '../../../constants/options/currency';
import { VALUE as LANGUAGE_VALUE } from '../../../constants/options/language'; import { VALUE as LANGUAGE_VALUE } from '../../../constants/options/language';
import API_VALUE from '../../../constants/options/api'; import API_VALUE from '../../../constants/options/api';
import INITIAL from '../../../constants/initial';
// Utilities // Utilities
@ -89,8 +94,6 @@ class SettingsContainer extends Component {
}; };
_handleOnChange = (action, type, actionType = null) => { _handleOnChange = (action, type, actionType = null) => {
const { dispatch, navigation } = this.props;
switch (type) { switch (type) {
case 'dropdown': case 'dropdown':
this._handleDropdownSelected(action, actionType); this._handleDropdownSelected(action, actionType);
@ -109,6 +112,24 @@ class SettingsContainer extends Component {
} }
}; };
_setPushToken = async () => {
const { notificationSettings, isLoggedIn, username } = this.props;
if (isLoggedIn) {
const token = await AppCenter.getInstallId();
AsyncStorage.getItem(INITIAL.IS_EXIST_USER, (err, result) => {
if (JSON.parse(result)) {
const data = {
username,
token,
system: Platform.OS,
allows_notify: notificationSettings,
};
setPushToken(data);
}
});
}
};
render() { render() {
return <SettingsScreen handleOnChange={this._handleOnChange} {...this.props} />; return <SettingsScreen handleOnChange={this._handleOnChange} {...this.props} />;
} }
@ -120,5 +141,8 @@ const mapStateToProps = state => ({
selectedCurrency: state.application.currency, selectedCurrency: state.application.currency,
isNotificationOpen: state.application.isNotificationOpen, isNotificationOpen: state.application.isNotificationOpen,
isDarkTheme: state.application.isDarkTheme, isDarkTheme: state.application.isDarkTheme,
notificationSettings: state.application.isNotificationOpen,
isLoggedIn: state.application.isLoggedIn,
username: state.account.currentAccount && state.account.currentAccount.name,
}); });
export default connect(mapStateToProps)(SettingsContainer); export default connect(mapStateToProps)(SettingsContainer);

View File

@ -858,19 +858,19 @@ anymatch@^2.0.0:
micromatch "^3.1.4" micromatch "^3.1.4"
normalize-path "^2.1.1" normalize-path "^2.1.1"
appcenter-analytics@1.9.0: appcenter-analytics@^1.10.0:
version "1.9.0" version "1.10.0"
resolved "https://registry.yarnpkg.com/appcenter-analytics/-/appcenter-analytics-1.9.0.tgz#16c2a2a715a8d9316c07a5f357015eeff15af343" resolved "https://registry.yarnpkg.com/appcenter-analytics/-/appcenter-analytics-1.10.0.tgz#48fd31f2bd3ff8808ee68d7ce43bc8c5e20600a2"
integrity sha512-I9RF+VdeCAM4WqSLSu57YHrHNwtK0t6dFlsVcfnYKdLAcAhzgWsYd5WPlFelVcNfjhPbEUqt+YE6Sas1X189cg== integrity sha512-TzFIAdsj0Q0A+gGQnsYEcxweZfXNU9shgnBRF2QPTPPUv2DFXQINFeJt1gTgHyJ+qkPSHjJGg5n9XPlCrRzfiQ==
dependencies: dependencies:
appcenter "1.9.0" appcenter "1.10.0"
appcenter-crashes@1.9.0: appcenter-crashes@^1.10.0:
version "1.9.0" version "1.10.0"
resolved "https://registry.yarnpkg.com/appcenter-crashes/-/appcenter-crashes-1.9.0.tgz#f1c14125c4a7c882cfd08e1381b6f78a54ea7386" resolved "https://registry.yarnpkg.com/appcenter-crashes/-/appcenter-crashes-1.10.0.tgz#4feca7e3bf471841b3eb7904d030448c29454be2"
integrity sha512-FEh0MGOgmu0GVRYyV+dEthvEq/KT70Xltl02OhBU9pBlwfEmcEp9Ume5bjnTFwdWbS+9ogu0o1U7I/N5XHuRQg== integrity sha512-aIZV6rGYN6bujQrpIWa9nuhOlSZWLu078kDXGUPFx+d7LSkP7h7LFo2hfVigijWJ31NrrwBFIzxmmGfriywQgw==
dependencies: dependencies:
appcenter "1.9.0" appcenter "1.10.0"
appcenter-link-scripts@1.10.0: appcenter-link-scripts@1.10.0:
version "1.10.0" version "1.10.0"
@ -885,40 +885,20 @@ appcenter-link-scripts@1.10.0:
which "^1.2.11" which "^1.2.11"
xcode "^1.0.0" xcode "^1.0.0"
appcenter-link-scripts@1.9.0: appcenter-push@^1.10.0:
version "1.9.0"
resolved "https://registry.yarnpkg.com/appcenter-link-scripts/-/appcenter-link-scripts-1.9.0.tgz#d8603e2943383bf76f585316e696328743284a67"
integrity sha512-R6UacmMhsLi9sn3Y1RjPyBfrkznI2KoNA/CgQ1A61dGxAMxMlKPShGXuG3C57UU8JvdJdo+KUE+dHbF6fAz27A==
dependencies:
debug "^2.2.0"
glob "^5.0.15"
inquirer "1.1.2"
mkdirp "^0.5.1"
plist "^3.0.1"
which "^1.2.11"
xcode "^1.0.0"
appcenter-push@1.10.0:
version "1.10.0" version "1.10.0"
resolved "https://registry.yarnpkg.com/appcenter-push/-/appcenter-push-1.10.0.tgz#09eca4184fdc7b4bb939fa39adf9ce00aa223144" resolved "https://registry.yarnpkg.com/appcenter-push/-/appcenter-push-1.10.0.tgz#09eca4184fdc7b4bb939fa39adf9ce00aa223144"
integrity sha512-P0gfzBNLpPAejeLx3Imc59JzNVVc9m0SPneLCiH/pyx9WkTcM0PxhuxFEmqm4Udj7ncMZMVyd4iOgqXJSmFilg== integrity sha512-P0gfzBNLpPAejeLx3Imc59JzNVVc9m0SPneLCiH/pyx9WkTcM0PxhuxFEmqm4Udj7ncMZMVyd4iOgqXJSmFilg==
dependencies: dependencies:
appcenter "1.10.0" appcenter "1.10.0"
appcenter@1.10.0: appcenter@1.10.0, appcenter@^1.10.0:
version "1.10.0" version "1.10.0"
resolved "https://registry.yarnpkg.com/appcenter/-/appcenter-1.10.0.tgz#f01daaadd1e2e9df3ca2b8dfda89a15c215d7adc" resolved "https://registry.yarnpkg.com/appcenter/-/appcenter-1.10.0.tgz#f01daaadd1e2e9df3ca2b8dfda89a15c215d7adc"
integrity sha512-FdDtlAt4TsexU1NqZ/sjwbgg927Vr8yUkaNPZG19pcJmZsOXUOFDPV1ArNjhCStpf6gNFYVLvHOkooIsdCyobQ== integrity sha512-FdDtlAt4TsexU1NqZ/sjwbgg927Vr8yUkaNPZG19pcJmZsOXUOFDPV1ArNjhCStpf6gNFYVLvHOkooIsdCyobQ==
dependencies: dependencies:
appcenter-link-scripts "1.10.0" appcenter-link-scripts "1.10.0"
appcenter@1.9.0:
version "1.9.0"
resolved "https://registry.yarnpkg.com/appcenter/-/appcenter-1.9.0.tgz#00ee98256bf6167c62e1ed2c35a59b448affb963"
integrity sha512-QyTmKPjM5N2GfqP2ob1htUMWsIVln5ujhXNocr/t/N0u1zJWzaWmcY895AnvH5B7JR1D8pdt57aQKPwTRZeAHA==
dependencies:
appcenter-link-scripts "1.9.0"
append-transform@^0.4.0: append-transform@^0.4.0:
version "0.4.0" version "0.4.0"
resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991"