Skip to content

Commit

Permalink
Using major versions for native platform SDKs & coming out of alpha f…
Browse files Browse the repository at this point in the history
…or RN SDK (#47)

* chnl-4781: iOS readme updates to intilization steps

* fixed typo

* chnl-4782: beta dev state update

* chnl-4783: updated events

* some more readme updates

* Using major versions in RN SDK

* adding podfile lock and initilize for android

* registering lifecycle events for andrioid
  • Loading branch information
ajaysubra authored Jan 24, 2024
1 parent a5dcdcc commit 843254f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ dependencies {
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-android:0.73.1"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
api "com.github.klaviyo.klaviyo-android-sdk:analytics:2.0.0-alpha.1"
api "com.github.klaviyo.klaviyo-android-sdk:push-fcm:2.0.0-alpha.1"
api "com.github.klaviyo.klaviyo-android-sdk:analytics:2.0.0"
api "com.github.klaviyo.klaviyo-android-sdk:push-fcm:2.0.0"
implementation "org.jetbrains.kotlin:kotlin-reflect:1.8.21"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.react.flipper.ReactNativeFlipper
import com.facebook.soloader.SoLoader
import com.klaviyo.analytics.Klaviyo

class MainApplication : Application(), ReactApplication {
override val reactNativeHost: ReactNativeHost =
Expand All @@ -35,6 +36,9 @@ class MainApplication : Application(), ReactApplication {
override fun onCreate() {
super.onCreate()
SoLoader.init(this, false)
Klaviyo.initialize("YOUR_PUBLIC_API_KEY", this)
registerActivityLifecycleCallbacks(Klaviyo.lifecycleCallbacks)

if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load()
Expand Down
8 changes: 4 additions & 4 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ PODS:
- hermes-engine/Pre-built (0.73.1)
- klaviyo-react-native-sdk (0.1.0):
- glog
- KlaviyoSwift (= 3.0.0-alpha.1)
- KlaviyoSwift (= 3.0.0)
- RCT-Folly (= 2022.05.16.00)
- React-Core
- KlaviyoSwift (3.0.0-alpha.1):
- KlaviyoSwift (3.0.0):
- AnyCodable-FlightSchool
- libevent (2.1.12)
- OpenSSL-Universal (1.1.1100)
Expand Down Expand Up @@ -1335,8 +1335,8 @@ SPEC CHECKSUMS:
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2
hermes-engine: 34df9d5034e90bd9bf1505e1ca198760373935af
klaviyo-react-native-sdk: cd5ec1f2b608093bdde609146b37c3fe71c6707a
KlaviyoSwift: c299185c389d31796cfdfde202cba2995998baf0
klaviyo-react-native-sdk: ab1e9cd0d87782ebbd45235ed71bed06c0c85ee7
KlaviyoSwift: 772fd78ef4b1f5d22c192b19e3ac2fd58ad49c90
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0
Expand Down
2 changes: 1 addition & 1 deletion klaviyo-react-native-sdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ Pod::Spec.new do |s|
s.dependency "ReactCommon/turbomodule/core"
end
end
s.dependency "KlaviyoSwift", "3.0.0-alpha.1"
s.dependency "KlaviyoSwift", "3.0.0"
end
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "klaviyo-react-native-sdk",
"version": "0.1.0-alpha.1",
"version": "0.1.0",
"description": "Official Klaviyo React Native SDK",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down

0 comments on commit 843254f

Please sign in to comment.