Skip to content

Commit 2e5ed27

Browse files
committed
version 3.10.0
2 parents d372330 + 422fa7a commit 2e5ed27

39 files changed

+1131
-141
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ Read the [documentation](https://docs.adapty.io/docs/react-native-installation?u
9090

9191
Check out our [example applications](./examples) to see Adapty SDK in action. The Expo example is recommended for Adapty beginners.
9292

93+
📹 **Watch our video guide** for step-by-step integration with the Focus Journal Expo example:
94+
95+
[![Focus Journal Expo Integration Guide](https://img.youtube.com/vi/TtCJswpt2ms/hqdefault.jpg)](https://www.youtube.com/watch?v=TtCJswpt2ms)
96+
9397
## Contributing
9498

9599
- Feel free to open an issue, we check all of them or drop us an email at [[email protected]](mailto:[email protected]) and tell us everything you want.

android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ def getExtOrDefault(name) {
110110
def kotlin_version = getExtOrDefault('kotlinVersion')
111111

112112
dependencies {
113-
api 'io.adapty:android-sdk:3.8.2'
114-
api 'io.adapty:android-ui:3.8.3'
113+
api 'io.adapty:android-sdk:3.10.0'
114+
api 'io.adapty:android-ui:3.10.0'
115115

116116
//noinspection GradleDynamicVersion
117-
api 'io.adapty.internal:crossplatform:3.8.5'
117+
api 'io.adapty.internal:crossplatform:3.10.0'
118118

119119
// Compatible with older and newer RN
120120
//noinspection GradleDynamicVersion

examples/AdaptyRnSdkExample/App.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ import { createNativeStackNavigator } from '@react-navigation/native-stack';
1313
import { adapty, GetPlacementForDefaultAudienceParamsInput } from 'react-native-adapty';
1414
import adaptyVersion from 'react-native-adapty/dist/version';
1515

16-
import { readCredentials, useJsLogs } from './src/helpers';
17-
import { PlacementId } from './src/constants';
16+
import { readCredentials, readPlacementId, useJsLogs } from './src/helpers';
1817

1918
import HomeScreen from './src/screens/Home';
2019
import LogsScreen from './src/screens/Logs';
@@ -25,8 +24,14 @@ const Stack = createNativeStackNavigator();
2524
async function init() {
2625
// Check credentials (only for this example)
2726
// This is for demonstration purposes only
28-
const token = await readCredentials();
29-
if (!token) {
27+
let token: string;
28+
let placementId: string;
29+
30+
try {
31+
token = readCredentials();
32+
placementId = readPlacementId();
33+
} catch (error: any) {
34+
console.error('[ADAPTY] Failed to read credentials:', error.message);
3035
return;
3136
}
3237

@@ -43,7 +48,7 @@ async function init() {
4348
};
4449

4550
// Get paywall for default audience
46-
adapty.getPaywallForDefaultAudience(PlacementId.Standard, undefined, params);
51+
adapty.getPaywallForDefaultAudience(placementId, undefined, params);
4752
} catch (error: any) {
4853
console.warn('[ADAPTY] Error activating Adapty SDK', error.message);
4954
}

examples/AdaptyRnSdkExample/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ This project was created using [React Native CLI](https://reactnative.dev/docs/e
2525

2626
1. This example uses an automated credential setup system. When you run `yarn start`, the app will automatically prompt you to enter:
2727
- Your Adapty API token
28-
- iOS Bundle ID (if different from default)
28+
- Add placement ID from your dashboard
29+
- iOS Bundle ID
30+
- Android Application
2931

3032
Your credentials are stored in `.adapty-credentials.json` file (which is gitignored for security).
3133

32-
2. Add placement ID from your dashboard to ./src/constants.ts.
33-
3434
## How to run example with production version of the library
3535
1. Clone this repository
3636
2. In the directory of this example fetch dependencies:

examples/AdaptyRnSdkExample/assets/android_fallback.json renamed to examples/AdaptyRnSdkExample/android/app/src/main/assets/custom/android_fallback.json

File renamed without changes.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"migIndex": 1,
3+
"data": [
4+
{
5+
"path": "assets/android/android_fallback.json",
6+
"sha1": "51e5dbfc2797f13829c7cdbb879872f41c989bff"
7+
}
8+
]
9+
}

examples/AdaptyRnSdkExample/assets/ios_fallback.json renamed to examples/AdaptyRnSdkExample/assets/android/android_fallback.json

File renamed without changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"version": "1.0",
3+
"paywalls": []
4+
}

examples/AdaptyRnSdkExample/ios/AdaptyRnSdkExample.xcodeproj/project.pbxproj

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
761780ED2CA45674006654EE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761780EC2CA45674006654EE /* AppDelegate.swift */; };
1313
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
1414
8437EBA135A031D05633AC4F /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */; };
15+
34167C2D90E640D2812C5709 /* ios_fallback.json in Resources */ = {isa = PBXBuildFile; fileRef = 3FC0B409DB974A95B1B568AD /* ios_fallback.json */; };
1516
/* End PBXBuildFile section */
1617

1718
/* Begin PBXFileReference section */
@@ -25,6 +26,7 @@
2526
761780EC2CA45674006654EE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = AdaptyRnSdkExample/AppDelegate.swift; sourceTree = "<group>"; };
2627
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = AdaptyRnSdkExample/LaunchScreen.storyboard; sourceTree = "<group>"; };
2728
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
29+
3FC0B409DB974A95B1B568AD /* ios_fallback.json */ = {isa = PBXFileReference; name = "ios_fallback.json"; path = "../assets/ios/ios_fallback.json"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
2830
/* End PBXFileReference section */
2931

3032
/* Begin PBXFrameworksBuildPhase section */
@@ -75,6 +77,7 @@
7577
83CBBA001A601CBA00E9B192 /* Products */,
7678
2D16E6871FA4F8E400B85C8A /* Frameworks */,
7779
BBD78D7AC51CEA395F1C20DB /* Pods */,
80+
91140BB2FC594AC489D06BED /* Resources */,
7881
);
7982
indentWidth = 2;
8083
sourceTree = "<group>";
@@ -98,6 +101,15 @@
98101
path = Pods;
99102
sourceTree = "<group>";
100103
};
104+
91140BB2FC594AC489D06BED /* Resources */ = {
105+
isa = "PBXGroup";
106+
children = (
107+
3FC0B409DB974A95B1B568AD /* ios_fallback.json */,
108+
);
109+
name = Resources;
110+
sourceTree = "<group>";
111+
path = "";
112+
};
101113
/* End PBXGroup section */
102114

103115
/* Begin PBXNativeTarget section */
@@ -161,6 +173,7 @@
161173
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
162174
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
163175
8437EBA135A031D05633AC4F /* PrivacyInfo.xcprivacy in Resources */,
176+
34167C2D90E640D2812C5709 /* ios_fallback.json in Resources */,
164177
);
165178
runOnlyForDeploymentPostprocessing = 0;
166179
};

examples/AdaptyRnSdkExample/ios/AdaptyRnSdkExample/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<true/>
3333
</dict>
3434
<key>NSLocationWhenInUseUsageDescription</key>
35-
<string></string>
35+
<string/>
3636
<key>RCTNewArchEnabled</key>
3737
<true/>
3838
<key>UILaunchStoryboardName</key>

0 commit comments

Comments
 (0)