Skip to content

Commit

Permalink
Upgrades iOS and Android SDK, bug fixes
Browse files Browse the repository at this point in the history
- Pins iOS to specific version
- Adds restoreStart, restoreComplete, restoreFail events.
  • Loading branch information
yusuftor committed Jun 12, 2024
1 parent af947d9 commit 391ec6f
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 7 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

The changelog for `Superwall`. Also see the [releases](https://github.com/superwall/react-native-superwall/releases) on GitHub.

## 1.2.2

### Enhancements

- Upgrades iOS SDK to 3.6.6. [View iOS SDK release notes](https://github.com/superwall-me/Superwall-iOS/releases/tag/3.6.6)
- Upgrades Android SDK to 1.1.7. [View Android SDK release notes](https://github.com/superwall-me/Superwall-Android/releases/tag/1.1.7)

### Fixes

- Makes sure the iOS SDK is pinned to a specific version, rather than a minimum version.

## 1.2.1

### Enhancements
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,6 @@ dependencies {
implementation "com.facebook.react:react-native:+"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"

implementation "com.superwall.sdk:superwall-android:1.1.6"
implementation "com.superwall.sdk:superwall-android:1.1.7"
implementation 'com.android.billingclient:billing:6.1.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ class SuperwallEvent {
val map = Arguments.createMap()
when (superwallEvent) {
is SuperwallEvent.FirstSeen -> map.putString("event", "firstSeen")
is SuperwallEvent.Restore.Start -> map.putString("event", "restoreStart")
is SuperwallEvent.Restore.Complete -> map.putString("event", "restoreComplete")
is SuperwallEvent.Restore.Fail -> {
map.putString("event", "restoreFail")
map.putString("message", superwallEvent.reason)
}
is SuperwallEvent.AppOpen -> map.putString("event", "appOpen")
is SuperwallEvent.AppLaunch -> map.putString("event", "appLaunch")
is SuperwallEvent.IdentityAlias -> map.putString("event", "identityAlias")
Expand Down
8 changes: 4 additions & 4 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1122,8 +1122,8 @@ PODS:
- glog
- RCT-Folly (= 2022.05.16.00)
- React-Core
- SuperwallKit (~> 3.6.5)
- SuperwallKit (3.6.5)
- SuperwallKit (= 3.6.6)
- SuperwallKit (3.6.6)
- Yoga (1.14.0)

DEPENDENCIES:
Expand Down Expand Up @@ -1389,8 +1389,8 @@ SPEC CHECKSUMS:
RevenueCat: 7be0d7bde9efb2fc1ebd1888522c55bb4f9feb18
RNPurchases: 06957eb2f35bd7bb336d32fccf3534d45a3fda8a
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
superwall-react-native: 1ac0e497cbb660a5a78ccb2080f63a18a8d53e9f
SuperwallKit: 4e2a87335eeea4de6938aad7a1258e127fc0ab75
superwall-react-native: 1030e20b03e7b856ae87afd89aa9fe4e7d9695ea
SuperwallKit: e6db6c60f6dc95c3dc841525f84dc8504cfffb5a
Yoga: 1b901a6d6eeba4e8a2e8f308f708691cdb5db312

PODFILE CHECKSUM: ef933d85d2e37cf2166eefe876125fde9d6d2a1e
Expand Down
6 changes: 6 additions & 0 deletions ios/Json/SuperwallEventInfo+Json.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ extension SuperwallEvent {
return ["event": "surveyClose"]
case .reset:
return ["event": "reset"]
case .restoreStart:
return ["event": "restoreStart"]
case .restoreComplete:
return ["event": "restoreComplete"]
case .restoreFail(message: let message):
return ["event": "restoreFail", "message": message]
}
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@superwall/react-native-superwall",
"version": "1.2.1",
"version": "1.2.2",
"description": "The React Native package for Superwall",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down
12 changes: 12 additions & 0 deletions src/public/SuperwallEventInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ export enum EventType {
touchesBegan = "touchesBegan",
surveyClose = "surveyClose",
reset = "reset",
restoreStart = "restoreStart",
restoreComplete = "restoreComplete",
restoreFail = "restoreFail"
}

export class SuperwallEvent {
Expand All @@ -76,6 +79,7 @@ export class SuperwallEvent {
transaction?: StoreTransaction;
product?: StoreProduct;
error?: string;
message?: string;
triggeredEventName?: string;
survey?: Survey;
selectedOption?: SurveyOption;
Expand All @@ -95,6 +99,7 @@ export class SuperwallEvent {
transaction?: StoreTransaction;
product?: StoreProduct;
error?: string;
message?: string;
triggeredEventName?: string;
survey?: Survey;
selectedOption?: SurveyOption;
Expand Down Expand Up @@ -123,7 +128,14 @@ export class SuperwallEvent {
case EventType.touchesBegan:
case EventType.surveyClose:
case EventType.reset:
case EventType.restoreStart:
case EventType.restoreComplete:
return new SuperwallEvent({ type: eventType });
case EventType.restoreFail:
return new SuperwallEvent({
type: eventType,
message: json.message,
});
case EventType.deviceAttributes:
return new SuperwallEvent({
type: eventType,
Expand Down
2 changes: 1 addition & 1 deletion superwall-react-native.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Pod::Spec.new do |s|
s.source = { :git => "https://github.com/superwall-me/Superwall-React-Native.git", :tag => "#{s.version}" }

s.source_files = "ios/**/*.{h,m,mm,swift}"
s.dependency "SuperwallKit", '~> 3.6.5'
s.dependency "SuperwallKit", '3.6.6'

# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
Expand Down

0 comments on commit 391ec6f

Please sign in to comment.