react-native-mytatva-rn-sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -0
- package/README.md +31 -0
- package/android/build.gradle +112 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/AndroidManifestNew.xml +2 -0
- package/android/src/main/java/com/visitrnsdk/VisitRnSdkPackage.kt +17 -0
- package/android/src/main/java/com/visitrnsdk/VisitRnSdkViewManager.kt +20 -0
- package/ios/VisitRnSdk.xcodeproj/project.pbxproj +274 -0
- package/ios/VisitRnSdkViewManager.h +20 -0
- package/ios/VisitRnSdkViewManager.m +1240 -0
- package/lib/commonjs/Services.js +35 -0
- package/lib/commonjs/Services.js.map +1 -0
- package/lib/commonjs/constants.js +11 -0
- package/lib/commonjs/constants.js.map +1 -0
- package/lib/commonjs/index.android.js +518 -0
- package/lib/commonjs/index.android.js.map +1 -0
- package/lib/commonjs/index.ios.js +313 -0
- package/lib/commonjs/index.ios.js.map +1 -0
- package/lib/module/Services.js +27 -0
- package/lib/module/Services.js.map +1 -0
- package/lib/module/constants.js +5 -0
- package/lib/module/constants.js.map +1 -0
- package/lib/module/index.android.js +508 -0
- package/lib/module/index.android.js.map +1 -0
- package/lib/module/index.ios.js +304 -0
- package/lib/module/index.ios.js.map +1 -0
- package/lib/typescript/index.test.d.ts +1 -0
- package/lib/typescript/index.test.d.ts.map +1 -0
- package/package.json +177 -0
- package/react-native-visit-rn-sdk.podspec +42 -0
- package/src/Services.js +37 -0
- package/src/constants.js +4 -0
- package/src/index.android.js +714 -0
- package/src/index.ios.js +376 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Yash
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
6
|
+
in the Software without restriction, including without limitation the rights
|
|
7
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
9
|
+
furnished to do so, subject to the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# react-native-mytatva-rn-sdk
|
|
2
|
+
|
|
3
|
+
a package to inject data into visit health pwa
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install react-native-mytatva-rn-sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
import MyTatvaRnSdkView from "react-native-mytatva-rn-sdk";
|
|
15
|
+
|
|
16
|
+
// ...
|
|
17
|
+
|
|
18
|
+
<MyTatvaRnSdkView magicLink="magic-link" />
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Contributing
|
|
22
|
+
|
|
23
|
+
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
|
|
24
|
+
|
|
25
|
+
## License
|
|
26
|
+
|
|
27
|
+
MIT
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
buildscript {
|
|
2
|
+
// Buildscript is evaluated before everything else so we can't use getExtOrDefault
|
|
3
|
+
def kotlin_version = rootProject.ext.has("kotlinVersion") ? rootProject.ext.get("kotlinVersion") : project.properties["VisitRnSdk_kotlinVersion"]
|
|
4
|
+
|
|
5
|
+
repositories {
|
|
6
|
+
google()
|
|
7
|
+
mavenCentral()
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
dependencies {
|
|
11
|
+
classpath "com.android.tools.build:gradle:7.2.1"
|
|
12
|
+
// noinspection DifferentKotlinGradleVersion
|
|
13
|
+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
def isNewArchitectureEnabled() {
|
|
18
|
+
return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
apply plugin: "com.android.library"
|
|
22
|
+
apply plugin: "kotlin-android"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
|
|
26
|
+
|
|
27
|
+
if (isNewArchitectureEnabled()) {
|
|
28
|
+
apply plugin: "com.facebook.react"
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
def getExtOrDefault(name) {
|
|
32
|
+
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["VisitRnSdk_" + name]
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
def getExtOrIntegerDefault(name) {
|
|
36
|
+
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["VisitRnSdk_" + name]).toInteger()
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
def supportsNamespace() {
|
|
40
|
+
def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
|
|
41
|
+
def major = parsed[0].toInteger()
|
|
42
|
+
def minor = parsed[1].toInteger()
|
|
43
|
+
|
|
44
|
+
// Namespace support was added in 7.3.0
|
|
45
|
+
if (major == 7 && minor >= 3) {
|
|
46
|
+
return true
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return major >= 8
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
android {
|
|
53
|
+
if (supportsNamespace()) {
|
|
54
|
+
namespace "com.visitrnsdk"
|
|
55
|
+
|
|
56
|
+
sourceSets {
|
|
57
|
+
main {
|
|
58
|
+
manifest.srcFile "src/main/AndroidManifestNew.xml"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
|
|
64
|
+
|
|
65
|
+
defaultConfig {
|
|
66
|
+
minSdkVersion getExtOrIntegerDefault("minSdkVersion")
|
|
67
|
+
targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
|
|
68
|
+
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
|
69
|
+
}
|
|
70
|
+
buildTypes {
|
|
71
|
+
release {
|
|
72
|
+
minifyEnabled false
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
lintOptions {
|
|
77
|
+
disable "GradleCompatible"
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
compileOptions {
|
|
81
|
+
sourceCompatibility JavaVersion.VERSION_17
|
|
82
|
+
targetCompatibility JavaVersion.VERSION_17
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
buildFeatures{
|
|
86
|
+
buildConfig = true
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
repositories {
|
|
92
|
+
mavenCentral()
|
|
93
|
+
google()
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
def kotlin_version = getExtOrDefault("kotlinVersion")
|
|
97
|
+
|
|
98
|
+
dependencies {
|
|
99
|
+
// For < 0.71, this will be from the local maven repo
|
|
100
|
+
// For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
|
|
101
|
+
//noinspection GradleDynamicVersion
|
|
102
|
+
implementation "com.facebook.react:react-native:+"
|
|
103
|
+
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (isNewArchitectureEnabled()) {
|
|
107
|
+
react {
|
|
108
|
+
jsRootDir = file("../src/")
|
|
109
|
+
libraryName = "MyTatvaRnSdkView"
|
|
110
|
+
codegenJavaPackageName = "com.visitrnsdk"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
package com.visitrnsdk
|
|
2
|
+
|
|
3
|
+
import com.facebook.react.ReactPackage
|
|
4
|
+
import com.facebook.react.bridge.NativeModule
|
|
5
|
+
import com.facebook.react.bridge.ReactApplicationContext
|
|
6
|
+
import com.facebook.react.uimanager.ViewManager
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class VisitRnSdkPackage : ReactPackage {
|
|
10
|
+
override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {
|
|
11
|
+
return emptyList()
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
|
|
15
|
+
return listOf(MyTatvaRnSdkViewManager())
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
package com.visitrnsdk
|
|
2
|
+
|
|
3
|
+
import android.graphics.Color
|
|
4
|
+
import android.view.View
|
|
5
|
+
import com.facebook.react.uimanager.SimpleViewManager
|
|
6
|
+
import com.facebook.react.uimanager.ThemedReactContext
|
|
7
|
+
import com.facebook.react.uimanager.annotations.ReactProp
|
|
8
|
+
|
|
9
|
+
class MyTatvaRnSdkViewManager : SimpleViewManager<View>() {
|
|
10
|
+
override fun getName() = "MyTatvaRnSdkView"
|
|
11
|
+
|
|
12
|
+
override fun createViewInstance(reactContext: ThemedReactContext): View {
|
|
13
|
+
return View(reactContext)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@ReactProp(name = "color")
|
|
17
|
+
fun setColor(view: View, color: String) {
|
|
18
|
+
view.setBackgroundColor(Color.parseColor(color))
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
// !$*UTF8*$!
|
|
2
|
+
{
|
|
3
|
+
archiveVersion = 1;
|
|
4
|
+
classes = {
|
|
5
|
+
};
|
|
6
|
+
objectVersion = 46;
|
|
7
|
+
objects = {
|
|
8
|
+
|
|
9
|
+
/* Begin PBXBuildFile section */
|
|
10
|
+
5E555C0D2413F4C50049A1A2 /* VisitRnSdk.mm in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* VisitRnSdk.mm */; };
|
|
11
|
+
/* End PBXBuildFile section */
|
|
12
|
+
|
|
13
|
+
/* Begin PBXCopyFilesBuildPhase section */
|
|
14
|
+
58B511D91A9E6C8500147676 /* CopyFiles */ = {
|
|
15
|
+
isa = PBXCopyFilesBuildPhase;
|
|
16
|
+
buildActionMask = 2147483647;
|
|
17
|
+
dstPath = "include/$(PRODUCT_NAME)";
|
|
18
|
+
dstSubfolderSpec = 16;
|
|
19
|
+
files = (
|
|
20
|
+
);
|
|
21
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
22
|
+
};
|
|
23
|
+
/* End PBXCopyFilesBuildPhase section */
|
|
24
|
+
|
|
25
|
+
/* Begin PBXFileReference section */
|
|
26
|
+
134814201AA4EA6300B7C361 /* libVisitRnSdk.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libVisitRnSdk.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
27
|
+
B3E7B5881CC2AC0600A0062D /* VisitRnSdk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VisitRnSdk.h; sourceTree = "<group>"; };
|
|
28
|
+
B3E7B5891CC2AC0600A0062D /* VisitRnSdk.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VisitRnSdk.mm; sourceTree = "<group>"; };
|
|
29
|
+
/* End PBXFileReference section */
|
|
30
|
+
|
|
31
|
+
/* Begin PBXFrameworksBuildPhase section */
|
|
32
|
+
58B511D81A9E6C8500147676 /* Frameworks */ = {
|
|
33
|
+
isa = PBXFrameworksBuildPhase;
|
|
34
|
+
buildActionMask = 2147483647;
|
|
35
|
+
files = (
|
|
36
|
+
);
|
|
37
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
38
|
+
};
|
|
39
|
+
/* End PBXFrameworksBuildPhase section */
|
|
40
|
+
|
|
41
|
+
/* Begin PBXGroup section */
|
|
42
|
+
134814211AA4EA7D00B7C361 /* Products */ = {
|
|
43
|
+
isa = PBXGroup;
|
|
44
|
+
children = (
|
|
45
|
+
134814201AA4EA6300B7C361 /* libVisitRnSdk.a */,
|
|
46
|
+
);
|
|
47
|
+
name = Products;
|
|
48
|
+
sourceTree = "<group>";
|
|
49
|
+
};
|
|
50
|
+
58B511D21A9E6C8500147676 = {
|
|
51
|
+
isa = PBXGroup;
|
|
52
|
+
children = (
|
|
53
|
+
B3E7B5881CC2AC0600A0062D /* VisitRnSdk.h */,
|
|
54
|
+
B3E7B5891CC2AC0600A0062D /* VisitRnSdk.mm */,
|
|
55
|
+
134814211AA4EA7D00B7C361 /* Products */,
|
|
56
|
+
);
|
|
57
|
+
sourceTree = "<group>";
|
|
58
|
+
};
|
|
59
|
+
/* End PBXGroup section */
|
|
60
|
+
|
|
61
|
+
/* Begin PBXNativeTarget section */
|
|
62
|
+
58B511DA1A9E6C8500147676 /* VisitRnSdk */ = {
|
|
63
|
+
isa = PBXNativeTarget;
|
|
64
|
+
buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "VisitRnSdk" */;
|
|
65
|
+
buildPhases = (
|
|
66
|
+
58B511D71A9E6C8500147676 /* Sources */,
|
|
67
|
+
58B511D81A9E6C8500147676 /* Frameworks */,
|
|
68
|
+
58B511D91A9E6C8500147676 /* CopyFiles */,
|
|
69
|
+
);
|
|
70
|
+
buildRules = (
|
|
71
|
+
);
|
|
72
|
+
dependencies = (
|
|
73
|
+
);
|
|
74
|
+
name = VisitRnSdk;
|
|
75
|
+
productName = RCTDataManager;
|
|
76
|
+
productReference = 134814201AA4EA6300B7C361 /* libVisitRnSdk.a */;
|
|
77
|
+
productType = "com.apple.product-type.library.static";
|
|
78
|
+
};
|
|
79
|
+
/* End PBXNativeTarget section */
|
|
80
|
+
|
|
81
|
+
/* Begin PBXProject section */
|
|
82
|
+
58B511D31A9E6C8500147676 /* Project object */ = {
|
|
83
|
+
isa = PBXProject;
|
|
84
|
+
attributes = {
|
|
85
|
+
LastUpgradeCheck = 0920;
|
|
86
|
+
ORGANIZATIONNAME = Facebook;
|
|
87
|
+
TargetAttributes = {
|
|
88
|
+
58B511DA1A9E6C8500147676 = {
|
|
89
|
+
CreatedOnToolsVersion = 6.1.1;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "VisitRnSdk" */;
|
|
94
|
+
compatibilityVersion = "Xcode 3.2";
|
|
95
|
+
developmentRegion = English;
|
|
96
|
+
hasScannedForEncodings = 0;
|
|
97
|
+
knownRegions = (
|
|
98
|
+
English,
|
|
99
|
+
en,
|
|
100
|
+
);
|
|
101
|
+
mainGroup = 58B511D21A9E6C8500147676;
|
|
102
|
+
productRefGroup = 58B511D21A9E6C8500147676;
|
|
103
|
+
projectDirPath = "";
|
|
104
|
+
projectRoot = "";
|
|
105
|
+
targets = (
|
|
106
|
+
58B511DA1A9E6C8500147676 /* VisitRnSdk */,
|
|
107
|
+
);
|
|
108
|
+
};
|
|
109
|
+
/* End PBXProject section */
|
|
110
|
+
|
|
111
|
+
/* Begin PBXSourcesBuildPhase section */
|
|
112
|
+
58B511D71A9E6C8500147676 /* Sources */ = {
|
|
113
|
+
isa = PBXSourcesBuildPhase;
|
|
114
|
+
buildActionMask = 2147483647;
|
|
115
|
+
files = (
|
|
116
|
+
B3E7B58A1CC2AC0600A0062D /* VisitRnSdk.mm in Sources */,
|
|
117
|
+
);
|
|
118
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
119
|
+
};
|
|
120
|
+
/* End PBXSourcesBuildPhase section */
|
|
121
|
+
|
|
122
|
+
/* Begin XCBuildConfiguration section */
|
|
123
|
+
58B511ED1A9E6C8500147676 /* Debug */ = {
|
|
124
|
+
isa = XCBuildConfiguration;
|
|
125
|
+
buildSettings = {
|
|
126
|
+
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
127
|
+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
128
|
+
CLANG_CXX_LIBRARY = "libc++";
|
|
129
|
+
CLANG_ENABLE_MODULES = YES;
|
|
130
|
+
CLANG_ENABLE_OBJC_ARC = YES;
|
|
131
|
+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
|
132
|
+
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
133
|
+
CLANG_WARN_COMMA = YES;
|
|
134
|
+
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
135
|
+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
136
|
+
CLANG_WARN_EMPTY_BODY = YES;
|
|
137
|
+
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
138
|
+
CLANG_WARN_INFINITE_RECURSION = YES;
|
|
139
|
+
CLANG_WARN_INT_CONVERSION = YES;
|
|
140
|
+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
|
141
|
+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
|
142
|
+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
143
|
+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
|
144
|
+
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
|
145
|
+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
|
146
|
+
CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
147
|
+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
148
|
+
COPY_PHASE_STRIP = NO;
|
|
149
|
+
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
150
|
+
ENABLE_TESTABILITY = YES;
|
|
151
|
+
"EXCLUDED_ARCHS[sdk=*]" = arm64;
|
|
152
|
+
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
153
|
+
GCC_DYNAMIC_NO_PIC = NO;
|
|
154
|
+
GCC_NO_COMMON_BLOCKS = YES;
|
|
155
|
+
GCC_OPTIMIZATION_LEVEL = 0;
|
|
156
|
+
GCC_PREPROCESSOR_DEFINITIONS = (
|
|
157
|
+
"DEBUG=1",
|
|
158
|
+
"$(inherited)",
|
|
159
|
+
);
|
|
160
|
+
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
|
161
|
+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
162
|
+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
163
|
+
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
164
|
+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
165
|
+
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
166
|
+
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
167
|
+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
|
168
|
+
MTL_ENABLE_DEBUG_INFO = YES;
|
|
169
|
+
ONLY_ACTIVE_ARCH = YES;
|
|
170
|
+
SDKROOT = iphoneos;
|
|
171
|
+
};
|
|
172
|
+
name = Debug;
|
|
173
|
+
};
|
|
174
|
+
58B511EE1A9E6C8500147676 /* Release */ = {
|
|
175
|
+
isa = XCBuildConfiguration;
|
|
176
|
+
buildSettings = {
|
|
177
|
+
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
178
|
+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
179
|
+
CLANG_CXX_LIBRARY = "libc++";
|
|
180
|
+
CLANG_ENABLE_MODULES = YES;
|
|
181
|
+
CLANG_ENABLE_OBJC_ARC = YES;
|
|
182
|
+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
|
183
|
+
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
184
|
+
CLANG_WARN_COMMA = YES;
|
|
185
|
+
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
186
|
+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
187
|
+
CLANG_WARN_EMPTY_BODY = YES;
|
|
188
|
+
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
189
|
+
CLANG_WARN_INFINITE_RECURSION = YES;
|
|
190
|
+
CLANG_WARN_INT_CONVERSION = YES;
|
|
191
|
+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
|
192
|
+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
|
193
|
+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
194
|
+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
|
195
|
+
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
|
196
|
+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
|
197
|
+
CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
198
|
+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
199
|
+
COPY_PHASE_STRIP = YES;
|
|
200
|
+
ENABLE_NS_ASSERTIONS = NO;
|
|
201
|
+
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
202
|
+
"EXCLUDED_ARCHS[sdk=*]" = arm64;
|
|
203
|
+
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
204
|
+
GCC_NO_COMMON_BLOCKS = YES;
|
|
205
|
+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
206
|
+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
207
|
+
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
208
|
+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
209
|
+
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
210
|
+
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
211
|
+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
|
212
|
+
MTL_ENABLE_DEBUG_INFO = NO;
|
|
213
|
+
SDKROOT = iphoneos;
|
|
214
|
+
VALIDATE_PRODUCT = YES;
|
|
215
|
+
};
|
|
216
|
+
name = Release;
|
|
217
|
+
};
|
|
218
|
+
58B511F01A9E6C8500147676 /* Debug */ = {
|
|
219
|
+
isa = XCBuildConfiguration;
|
|
220
|
+
buildSettings = {
|
|
221
|
+
HEADER_SEARCH_PATHS = (
|
|
222
|
+
"$(inherited)",
|
|
223
|
+
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
|
224
|
+
"$(SRCROOT)/../../../React/**",
|
|
225
|
+
"$(SRCROOT)/../../react-native/React/**",
|
|
226
|
+
);
|
|
227
|
+
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
|
228
|
+
OTHER_LDFLAGS = "-ObjC";
|
|
229
|
+
PRODUCT_NAME = VisitRnSdk;
|
|
230
|
+
SKIP_INSTALL = YES;
|
|
231
|
+
};
|
|
232
|
+
name = Debug;
|
|
233
|
+
};
|
|
234
|
+
58B511F11A9E6C8500147676 /* Release */ = {
|
|
235
|
+
isa = XCBuildConfiguration;
|
|
236
|
+
buildSettings = {
|
|
237
|
+
HEADER_SEARCH_PATHS = (
|
|
238
|
+
"$(inherited)",
|
|
239
|
+
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
|
|
240
|
+
"$(SRCROOT)/../../../React/**",
|
|
241
|
+
"$(SRCROOT)/../../react-native/React/**",
|
|
242
|
+
);
|
|
243
|
+
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
|
244
|
+
OTHER_LDFLAGS = "-ObjC";
|
|
245
|
+
PRODUCT_NAME = VisitRnSdk;
|
|
246
|
+
SKIP_INSTALL = YES;
|
|
247
|
+
};
|
|
248
|
+
name = Release;
|
|
249
|
+
};
|
|
250
|
+
/* End XCBuildConfiguration section */
|
|
251
|
+
|
|
252
|
+
/* Begin XCConfigurationList section */
|
|
253
|
+
58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "VisitRnSdk" */ = {
|
|
254
|
+
isa = XCConfigurationList;
|
|
255
|
+
buildConfigurations = (
|
|
256
|
+
58B511ED1A9E6C8500147676 /* Debug */,
|
|
257
|
+
58B511EE1A9E6C8500147676 /* Release */,
|
|
258
|
+
);
|
|
259
|
+
defaultConfigurationIsVisible = 0;
|
|
260
|
+
defaultConfigurationName = Release;
|
|
261
|
+
};
|
|
262
|
+
58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "VisitRnSdk" */ = {
|
|
263
|
+
isa = XCConfigurationList;
|
|
264
|
+
buildConfigurations = (
|
|
265
|
+
58B511F01A9E6C8500147676 /* Debug */,
|
|
266
|
+
58B511F11A9E6C8500147676 /* Release */,
|
|
267
|
+
);
|
|
268
|
+
defaultConfigurationIsVisible = 0;
|
|
269
|
+
defaultConfigurationName = Release;
|
|
270
|
+
};
|
|
271
|
+
/* End XCConfigurationList section */
|
|
272
|
+
};
|
|
273
|
+
rootObject = 58B511D31A9E6C8500147676 /* Project object */;
|
|
274
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#import <React/RCTBridgeModule.h>
|
|
2
|
+
#import <HealthKit/HealthKit.h>
|
|
3
|
+
#import <React/RCTEventEmitter.h>
|
|
4
|
+
|
|
5
|
+
@interface MyTatvaRnSdkViewManager : RCTEventEmitter <RCTBridgeModule>{
|
|
6
|
+
NSCalendar* calendar;
|
|
7
|
+
NSUInteger bmrCaloriesPerHour;
|
|
8
|
+
NSString *gender;
|
|
9
|
+
BOOL hasLoadedOnce;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@property (nonatomic) HKHealthStore *healthStore;
|
|
13
|
+
+ (HKHealthStore *)sharedManager;
|
|
14
|
+
- (void)renderGraph:(NSDictionary *)input callback:(RCTResponseSenderBlock)callback;
|
|
15
|
+
- (void)updateApiUrl:(NSDictionary *)input;
|
|
16
|
+
- (void)connectToAppleHealth:(RCTResponseSenderBlock)callback;
|
|
17
|
+
- (void)fetchHourlyData:(NSInteger)gfHourlyLastSync resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject;
|
|
18
|
+
- (void)fetchDailyData:(NSInteger)googleFitLastSync resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject;
|
|
19
|
+
|
|
20
|
+
@end
|