react-native-chabok
v2.4.0
Published
React native wrapper for Chabok SDK
Downloads
25
Maintainers
Readme
Table of contents:
Project Notes
For developing in this project use WebStorm IDE. This is the best IDE and more compatible with React-Native platform.
All js module codes are in
chabok-client-rn/lib
path. After applied changes in the native modules, Don't forget apply them on the js module if need.SDK initialization should be in native side for each platform. For example: iOS users should call
configureEnvironment
method from native SDK inAppDelegate.m
class.
Android contributing instructions:
Notes:
For developing Android native bridge use Android Studio IDE.
Never change the
ChabokReactPackage
class. When this class may change you need to support for specific version on the React-Native. Their breaking changes always affects of this module.React-Native has any two-way communication channel from the native module to js module and conversely. You have a one-way communication service by calling
emit
method.For running project on android device follow the instruction:
npm run android
Update Android native SDK:
All Chabok libraries follow the semantic versioning.
Without any breaking changes:
If it hasn't any breaking changes follow this instruction:
cd react-native-rn/android
vi build.gradle
Just change Chabok Android SDK Version:
from:
api 'com.adpdigital.push:chabok-lib:3.4.0'
to:
api 'com.adpdigital.push:chabok-lib:3.7.1'
With breaking changes
If it has some breaking changes first follow the above instruction. After that if breaking changes includes code changes, don't forget apply all changes in ChabokPushModule.java
bridge class.
The ChabokPushModule
is a simple bridge for connect the native module and js module.
iOS contributing instructions:
Notes:
For developing iOS native bridge use Xcode IDE. Open project from
react-native-rn/ios
path.For testing iOS bridge you should use
cocoapods
with1.7.5
version.For running project on iOS device follow the instruction:
cd ios
pod install
cd ..
npm run ios
Update iOS native SDK:
All Chabok libraries follow the semantic versioning.
Without any breaking changes:
If it hasn't any breaking changes follow this instruction:
cd react-native-rn
vi react-native-chabok.podspec
Just change Chabok iOS SDK Version:
from:
s.dependency "ChabokPush", "~> 2.2.0"
to:
s.dependency "ChabokPush", "~> 2.4.0"
And copy last version of iOS framework into the react-native-rn/ios/frameworks
:
With breaking changes
If it has some breaking changes first follow the above instruction. After that if breaking changes includes code changes, don't forget apply all changes in ChabokPush.m
bridge class.
The ChabokPush
is a simple bridge for connect the native module and js module.