0.3.0 • Published 10 months ago
@sency/react-native-smkit-ui v0.3.0
Github:
1. Installation
run npm install @sency/react-native-smkit-ui
2. Setup
iOS Setup
- Update Podfile in
iOSfolder:
[1] add the source to the top of your Podfile.
source 'https://bitbucket.org/sencyai/ios_sdks_release.git'
source 'https://github.com/CocoaPods/Specs.git'
[2] add use_frameworks! commend to your target
target 'YOUR_TARGET' do
use_frameworks!
[3] At the end of your code please add
post_install do |installer|
react_native_post_install(
installer,
:mac_catalyst_enabled => false
)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64'
end
end
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end- Run
NO_FLIPPER=1 pod installto install the necessary pods. - Add camera permission request to
Info.plist
<key>NSCameraUsageDescription</key>
<string>Camera access is needed</string>Known issues
- Dynamic/Static linking issues due to
use_frameworks: If you're unable to use use_frameworks you should add the following code to your Podfile:
# [1] Add the dynamic_frameworks array that will hold all of the dynamic frameworks names
dynamic_frameworks = ['SMKitUI', 'SMKit', 'SMBase', 'SwiftyJSON', 'SMBaseUI']
# [2] Add this pre_install function
pre_install do |installer|
installer.pod_targets.each do |pod|
if dynamic_frameworks.include?(pod.name)
def pod.build_type
Pod::BuildType.dynamic_framework
end
end
end
end
# [3] Add this post_install function
post_install do |installer|
react_native_post_install(installer, config[:reactNativePath], :mac_catalyst_enabled => false)
installer.pods_project.targets.each do |target|
if dynamic_frameworks.include?(target.name)
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64'
end
end
end
end
endNow you can run pod install.
Android Setup
In order to integrate SMKitUI you need your app to target minSdk 26
Add on project level build.gradle:
buildscript {
ext {
minSdkVersion = 26
}
}Add on project level build.gradle:
allprojects {
maven {
url "https://artifacts.sency.ai/artifactory/release/"
}
}3. API
1. Configure
[1] First import configure
import { configure } from '@sency/react-native-smkit-ui/src/index.tsx';
[2] then call the configure function with your auth key
try{
var res = await configure("YOUR_AUTH_KEY");
}catch (e) {
console.error(e);
}To reduce wait time we recommend to call configure on app launch.
⚠️ smkit_ui_library will not work if you don't first call configure.
2. Start
Start Assessment
##Data
AssessmentTypes
| Name (enum) | Description | More info |
|---|---|---|
| Fitness | For individuals of any activity level who seek to enhance their physical abilities, strength, and endurance through a tailored plan. | Link |
| Body360 | Designed for individuals of any age and activity level, this assessment determines the need for a preventative plan or medical support. | Link |
| Strength | For individuals of any activity level who seek to assess their strength capabilities (core and endurance) * This assessment will be available soon. Contact us for more info. | Link |
| Cardio | For individuals of any activity level who seek to assess their cardiovascular capabilities * This assessment will be available soon. Contact us for more info. | Link |
| Custom | If Sency created a tailored assessment for you, you probably know it, and you should use this enum. |
Having issues? Contact us and let us know what the problem is.
0.2.6-patch1
12 months ago
0.2.8-patch1
11 months ago
0.3.0
10 months ago
0.2.1
1 year ago
0.2.7
12 months ago
0.2.6
12 months ago
0.2.9
10 months ago
0.2.8
11 months ago
0.2.3
1 year ago
0.2.2
1 year ago
0.2.5
12 months ago
0.2.4
1 year ago
0.1.1-snapshot-2
2 years ago
0.1.2
2 years ago
0.2.0
1 year ago
0.1.1
2 years ago
0.1.1-snapshot-1
2 years ago
0.1.8
1 year ago
0.1.7
1 year ago
0.1.9
1 year ago
0.1.4
1 year ago
0.1.3
1 year ago
0.1.6
1 year ago
0.1.5
1 year ago
0.1.0
2 years ago