Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SagivOnoApps committed Jun 30, 2020
2 parents 8c6dd61 + 88cdaac commit e5606f3
Show file tree
Hide file tree
Showing 57 changed files with 1,352 additions and 334 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ android {
applicationId "com.hamagen"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 73
versionName '1.4.7'
versionCode 88
versionName '2.1.8'
}

dexOptions {
Expand Down
1 change: 1 addition & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:node="remove"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>

<application
android:name="com.hamagen.MainApplication"
Expand Down
11 changes: 11 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,18 @@ import ResetMessaging from './src/ResetMessaging';
import { checkGeoSickPeople, checkBLESickPeople } from './src/services/Tracker';
import { syncLocationsDBOnLocationEvent } from './src/services/SampleService';
import { onError } from './src/services/ErrorService';
import { initBLETracing } from './src/services/BLEService';
import { initConfig } from './src/config/config';
import { IS_IOS } from './src/constants/Constants';


BackgroundGeolocation.onLocation(
async () => {
await syncLocationsDBOnLocationEvent();

if (IS_IOS) {
await initBLETracing();
}
}, (error) => {
onError({ error });
}
Expand All @@ -23,6 +30,10 @@ const BackgroundFetchHeadlessTask = async (event) => {
const { taskId } = event;
console.log('[BackgroundFetch HeadlessTask] start: ', taskId);

if (IS_IOS) {
initBLETracing();
}

await initConfig();
await syncLocationsDBOnLocationEvent();
await checkBLESickPeople();
Expand Down
3 changes: 2 additions & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def project_pods
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'


pod 'Permission-BluetoothPeripheral', :path => "../node_modules/react-native-permissions/ios/BluetoothPeripheral.podspec"
pod 'Permission-LocationAlways', :path => "../node_modules/react-native-permissions/ios/LocationAlways.podspec"
pod 'Permission-Motion', :path => "../node_modules/react-native-permissions/ios/Motion.podspec"

Expand Down
26 changes: 19 additions & 7 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,11 @@ PODS:
- nanopb/encode (= 0.3.9011)
- nanopb/decode (0.3.9011)
- nanopb/encode (0.3.9011)
- Permission-LocationAlways (2.0.10):
- Permission-BluetoothPeripheral (2.1.5):
- RNPermissions
- Permission-Motion (2.0.10):
- Permission-LocationAlways (2.1.5):
- RNPermissions
- Permission-Motion (2.1.5):
- RNPermissions
- Protobuf (3.11.4)
- RCTRequired (0.61.5)
Expand Down Expand Up @@ -350,6 +352,8 @@ PODS:
- RNBackgroundGeolocation (3.4.2):
- CocoaLumberjack (~> 3.5.1)
- React
- RNBluetoothStateManager (1.1.0):
- React
- RNCAsyncStorage (1.7.1):
- React
- RNCMaskedView (0.1.10):
Expand All @@ -367,7 +371,7 @@ PODS:
- React
- RNGestureHandler (1.5.2):
- React
- RNPermissions (2.0.10):
- RNPermissions (2.1.5):
- React
- RNReanimated (1.4.0):
- React
Expand All @@ -391,6 +395,7 @@ DEPENDENCIES:
- GoogleMaps
- lottie-ios (from `../node_modules/lottie-ios`)
- lottie-react-native (from `../node_modules/lottie-react-native`)
- Permission-BluetoothPeripheral (from `../node_modules/react-native-permissions/ios/BluetoothPeripheral.podspec`)
- Permission-LocationAlways (from `../node_modules/react-native-permissions/ios/LocationAlways.podspec`)
- Permission-Motion (from `../node_modules/react-native-permissions/ios/Motion.podspec`)
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
Expand Down Expand Up @@ -431,6 +436,7 @@ DEPENDENCIES:
- rn-fetch-blob (from `../node_modules/rn-fetch-blob`)
- RNBackgroundFetch (from `../node_modules/react-native-background-fetch`)
- RNBackgroundGeolocation (from `../node_modules/react-native-background-geolocation`)
- RNBluetoothStateManager (from `../node_modules/react-native-bluetooth-state-manager`)
- "RNCAsyncStorage (from `../node_modules/@react-native-community/async-storage`)"
- "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)"
- RNDeviceInfo (from `../node_modules/react-native-device-info`)
Expand Down Expand Up @@ -477,6 +483,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/lottie-ios"
lottie-react-native:
:path: "../node_modules/lottie-react-native"
Permission-BluetoothPeripheral:
:path: "../node_modules/react-native-permissions/ios/BluetoothPeripheral.podspec"
Permission-LocationAlways:
:path: "../node_modules/react-native-permissions/ios/LocationAlways.podspec"
Permission-Motion:
Expand Down Expand Up @@ -551,6 +559,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-background-fetch"
RNBackgroundGeolocation:
:path: "../node_modules/react-native-background-geolocation"
RNBluetoothStateManager:
:path: "../node_modules/react-native-bluetooth-state-manager"
RNCAsyncStorage:
:path: "../node_modules/@react-native-community/async-storage"
RNCMaskedView:
Expand Down Expand Up @@ -597,8 +607,9 @@ SPEC CHECKSUMS:
lottie-ios: 85ce835dd8c53e02509f20729fc7d6a4e6645a0a
lottie-react-native: 2a1a82bb326ae51331a5520de0cf706733c6db69
nanopb: 18003b5e52dab79db540fe93fe9579f399bd1ccd
Permission-LocationAlways: 738e3b24333d52c87361804bb0a1641de014c405
Permission-Motion: 6d251146daf1102ebe143a2618adc18946353ad2
Permission-BluetoothPeripheral: 4663a8373072abfe3099c44cb06bf10b0c16c110
Permission-LocationAlways: 155e6251b757b380f6354737cae8e8d59c472495
Permission-Motion: 099bc32191080089d1cb839cbae96d621a589c8f
Protobuf: 176220c526ad8bd09ab1fb40a978eac3fef665f7
RCTRequired: b153add4da6e7dbc44aebf93f3cf4fcae392ddf1
RCTTypeSafety: 9aa1b91d7f9310fc6eadc3cf95126ffe818af320
Expand Down Expand Up @@ -635,18 +646,19 @@ SPEC CHECKSUMS:
rn-fetch-blob: f065bb7ab7fb48dd002629f8bdcb0336602d3cba
RNBackgroundFetch: 8d8d66b47eafcb9e772b2eb95057939038b3ef95
RNBackgroundGeolocation: 8f0a20788100fbf08987d80f2053ae6eba79c566
RNBluetoothStateManager: f38ca64bd09d3028b596cb080b89a388207b62a0
RNCAsyncStorage: 44395cb9c7c1523104c2b499eb426ef7aff82bca
RNCMaskedView: 5a8ec07677aa885546a0d98da336457e2bea557f
RNDeviceInfo: c7b1dc457611b9231bb780a882102e2c93edc7af
RNFirebase: 37daa9a346d070f9f6ee1f3b4aaf4c8e3b1d5d1c
RNGestureHandler: 946a7691e41df61e2c4b1884deab41a4cdc3afff
RNPermissions: 1008d3511fee0e25739cf81c4af0d1b2248f1053
RNPermissions: ad71dd4f767ec254f2cd57592fbee02afee75467
RNReanimated: b2ab0b693dddd2339bd2f300e770f6302d2e960c
RNScreens: 5e4758109c6d35f9a009ce72af873df907548020
RNSha1: 6de589cd0b0397d0f6248a2e5ee9e5f0d7da38dc
RNWifi: 1747f039612dd494192ba6c8bc498606ad9f3ec4
Yoga: f2a7cd4280bfe2cca5a7aed98ba0eb3d1310f18b

PODFILE CHECKSUM: c85d4a94c29bc88bc3f697f6b2b5831cdd10d31a
PODFILE CHECKSUM: 837d1b8bd2e1fdf1485b9358860cb5287bda5d36

COCOAPODS: 1.9.1
16 changes: 8 additions & 8 deletions ios/codeAgainstCorona.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -554,12 +554,12 @@
CODE_SIGN_ENTITLEMENTS = "codeAgainstCorona/Code against corona.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 73;
CURRENT_PROJECT_VERSION = 84;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = N3P977USJJ;
INFOPLIST_FILE = codeAgainstCorona/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.4.7;
MARKETING_VERSION = 2.1.4;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand All @@ -585,11 +585,11 @@
CODE_SIGN_ENTITLEMENTS = "המגןRelease.entitlements";
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 73;
CURRENT_PROJECT_VERSION = 84;
DEVELOPMENT_TEAM = N3P977USJJ;
INFOPLIST_FILE = codeAgainstCorona/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.4.7;
MARKETING_VERSION = 2.1.4;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -713,7 +713,7 @@
CODE_SIGN_ENTITLEMENTS = "המגן QA.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 73;
CURRENT_PROJECT_VERSION = 88;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = N3P977USJJ;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -725,7 +725,7 @@
INFOPLIST_FILE = "codeAgainstCorona/Info-qa.plist";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.4.7;
MARKETING_VERSION = 2.1.8;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand All @@ -751,7 +751,7 @@
CODE_SIGN_ENTITLEMENTS = "המגן QA.entitlements";
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 73;
CURRENT_PROJECT_VERSION = 88;
DEVELOPMENT_TEAM = N3P977USJJ;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -762,7 +762,7 @@
INFOPLIST_FILE = "codeAgainstCorona/Info-qa.plist";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.4.7;
MARKETING_VERSION = 2.1.8;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
Expand Down
5 changes: 4 additions & 1 deletion ios/codeAgainstCorona/AppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@

#import <React/RCTBridgeDelegate.h>
#import <UIKit/UIKit.h>
#import <CoreLocation/CoreLocation.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate>
@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate, CLLocationManagerDelegate>

@property (nonatomic, strong) UIWindow *window;

@property (nonatomic, strong) CLLocationManager *locationManager;

@end
Loading

0 comments on commit e5606f3

Please sign in to comment.