Skip to content

Commit b74b823

Browse files
committed
chore: change package name
1 parent 2c33e7d commit b74b823

File tree

14 files changed

+363
-381
lines changed

14 files changed

+363
-381
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ If you want to use Android Studio or XCode to edit the native code, you can open
3131
- `example/ios`
3232
- `expoExample/android`
3333
- `expoExample/ios`
34-
directories respectively in those editors. To edit the Objective-C or Swift files, open `ios/ContentpassExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-contentpass`.
34+
directories respectively in those editors. To edit the Objective-C or Swift files, open `ios/ContentpassExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > contentpass-react-native-contentpass`.
3535

36-
To edit the Java or Kotlin files, open `android` in Android studio and find the source files at `react-native-contentpass` under `Android`.
36+
To edit the Java or Kotlin files, open `android` in Android studio and find the source files at `@contentpass/react-native-contentpass` under `Android`.
3737

3838
You can use various commands from the root directory to work with the project.
3939

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
# react-native-contentpass
1+
# @contentpass/react-native-contentpass
22

33
Contentpass React Native SDK enables easy integration of Contentpass functionality into your React Native applications.
44

55
## Installation
66
Install the package using npm or Yarn:
77

88
```sh
9-
npm install react-native-contentpass
9+
npm install @contentpass/react-native-contentpass
1010
```
1111

1212
or
1313

1414
```sh
15-
yarn add react-native-contentpass
15+
yarn add @contentpass/react-native-contentpass
1616
```
1717

1818
### Peer Dependencies
@@ -44,7 +44,7 @@ Wrap your app's root component with ContentpassSdkProvider. The provider require
4444

4545
```jsx
4646
import React from 'react';
47-
import { ContentpassSdkProvider } from 'react-native-contentpass';
47+
import { ContentpassSdkProvider } from '@contentpass/react-native-contentpass';
4848

4949
const contentpassConfig = {
5050
propertyId: 'your-property-id',
@@ -88,7 +88,7 @@ or improved. The SDK will then refresh and revalidate the user's authentication
8888

8989
```jsx
9090
import React, { useEffect } from 'react';
91-
import { useContentpassSdk } from 'react-native-contentpass';
91+
import { useContentpassSdk } from '@contentpass/react-native-contentpass';
9292
import { Button, View } from 'react-native';
9393

9494
const YourApp = () => {

react-native-contentpass.podspec renamed to contentpass-react-native-contentpass.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
44
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
55

66
Pod::Spec.new do |s|
7-
s.name = "react-native-contentpass"
7+
s.name = "contentpass-react-native-contentpass"
88
s.version = package["version"]
99
s.summary = package["description"]
1010
s.homepage = package["homepage"]

example/Gemfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ GEM
7878
httpclient (2.8.3)
7979
i18n (1.14.6)
8080
concurrent-ruby (~> 1.0)
81-
json (2.8.2)
82-
logger (1.6.1)
83-
minitest (5.25.1)
81+
json (2.9.0)
82+
logger (1.6.2)
83+
minitest (5.25.4)
8484
molinillo (0.8.0)
8585
nanaimo (0.3.0)
8686
nap (1.1.0)
@@ -89,7 +89,7 @@ GEM
8989
public_suffix (4.0.7)
9090
rexml (3.3.9)
9191
ruby-macho (2.5.1)
92-
securerandom (0.3.2)
92+
securerandom (0.4.0)
9393
typhoeus (1.4.1)
9494
ethon (>= 0.9.0)
9595
tzinfo (2.0.6)
@@ -114,4 +114,4 @@ RUBY VERSION
114114
ruby 3.1.6p260
115115

116116
BUNDLED WITH
117-
2.3.27
117+
2.5.23

example/ios/Podfile.lock

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,34 @@
11
PODS:
2-
- AppAuth (1.7.5):
3-
- AppAuth/Core (= 1.7.5)
4-
- AppAuth/ExternalUserAgent (= 1.7.5)
5-
- AppAuth/Core (1.7.5)
6-
- AppAuth/ExternalUserAgent (1.7.5):
2+
- AppAuth (1.7.6):
3+
- AppAuth/Core (= 1.7.6)
4+
- AppAuth/ExternalUserAgent (= 1.7.6)
5+
- AppAuth/Core (1.7.6)
6+
- AppAuth/ExternalUserAgent (1.7.6):
77
- AppAuth/Core
88
- boost (1.84.0)
99
- ConsentViewController (7.6.7):
1010
- Down (~> 0.11.0)
11+
- contentpass-react-native-contentpass (0.2.4):
12+
- DoubleConversion
13+
- glog
14+
- hermes-engine
15+
- RCT-Folly (= 2024.01.01.00)
16+
- RCTRequired
17+
- RCTTypeSafety
18+
- React-Core
19+
- React-debug
20+
- React-Fabric
21+
- React-featureflags
22+
- React-graphics
23+
- React-ImageManager
24+
- React-NativeModulesApple
25+
- React-RCTFabric
26+
- React-rendererdebug
27+
- React-utils
28+
- ReactCodegen
29+
- ReactCommon/turbomodule/bridging
30+
- ReactCommon/turbomodule/core
31+
- Yoga
1132
- DoubleConversion (1.1.6)
1233
- FBLazyVector (0.76.2)
1334
- fmt (9.1.0)
@@ -1250,30 +1271,9 @@ PODS:
12501271
- ReactCommon/turbomodule/bridging
12511272
- ReactCommon/turbomodule/core
12521273
- Yoga
1253-
- react-native-app-auth (8.0.0):
1254-
- AppAuth (>= 1.7.3)
1255-
- React-Core
1256-
- react-native-contentpass (0.1.0):
1257-
- DoubleConversion
1258-
- glog
1259-
- hermes-engine
1260-
- RCT-Folly (= 2024.01.01.00)
1261-
- RCTRequired
1262-
- RCTTypeSafety
1274+
- react-native-app-auth (8.0.1):
1275+
- AppAuth (>= 1.7.6)
12631276
- React-Core
1264-
- React-debug
1265-
- React-Fabric
1266-
- React-featureflags
1267-
- React-graphics
1268-
- React-ImageManager
1269-
- React-NativeModulesApple
1270-
- React-RCTFabric
1271-
- React-rendererdebug
1272-
- React-utils
1273-
- ReactCodegen
1274-
- ReactCommon/turbomodule/bridging
1275-
- ReactCommon/turbomodule/core
1276-
- Yoga
12771277
- react-native-encrypted-storage (4.0.3):
12781278
- React-Core
12791279
- React-nativeconfig (0.76.2)
@@ -1570,6 +1570,7 @@ PODS:
15701570

15711571
DEPENDENCIES:
15721572
- boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
1573+
- contentpass-react-native-contentpass (from `../..`)
15731574
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
15741575
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
15751576
- fmt (from `../node_modules/react-native/third-party-podspecs/fmt.podspec`)
@@ -1607,7 +1608,6 @@ DEPENDENCIES:
16071608
- React-Mapbuffer (from `../node_modules/react-native/ReactCommon`)
16081609
- React-microtasksnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/microtasks`)
16091610
- react-native-app-auth (from `../node_modules/react-native-app-auth`)
1610-
- react-native-contentpass (from `../..`)
16111611
- react-native-encrypted-storage (from `../node_modules/react-native-encrypted-storage`)
16121612
- React-nativeconfig (from `../node_modules/react-native/ReactCommon`)
16131613
- React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`)
@@ -1648,6 +1648,8 @@ SPEC REPOS:
16481648
EXTERNAL SOURCES:
16491649
boost:
16501650
:podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec"
1651+
contentpass-react-native-contentpass:
1652+
:path: "../.."
16511653
DoubleConversion:
16521654
:podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
16531655
FBLazyVector:
@@ -1719,8 +1721,6 @@ EXTERNAL SOURCES:
17191721
:path: "../node_modules/react-native/ReactCommon/react/nativemodule/microtasks"
17201722
react-native-app-auth:
17211723
:path: "../node_modules/react-native-app-auth"
1722-
react-native-contentpass:
1723-
:path: "../.."
17241724
react-native-encrypted-storage:
17251725
:path: "../node_modules/react-native-encrypted-storage"
17261726
React-nativeconfig:
@@ -1783,9 +1783,10 @@ EXTERNAL SOURCES:
17831783
:path: "../node_modules/react-native/ReactCommon/yoga"
17841784

17851785
SPEC CHECKSUMS:
1786-
AppAuth: 501c04eda8a8d11f179dbe8637b7a91bb7e5d2fa
1786+
AppAuth: d4f13a8fe0baf391b2108511793e4b479691fb73
17871787
boost: 1dca942403ed9342f98334bf4c3621f011aa7946
17881788
ConsentViewController: 243f7bfcde4b6ec71a5033486465b7c17448493c
1789+
contentpass-react-native-contentpass: 27dd53dddc86eb602a6c4d74eea5dc52674061dc
17891790
DoubleConversion: f16ae600a246532c4020132d54af21d0ddb2a385
17901791
FBLazyVector: bc70dcb22ad30ce734a7cce7210791dc737e230f
17911792
fmt: 10c6e61f4be25dc963c36bd73fc7b1705fe975be
@@ -1820,8 +1821,7 @@ SPEC CHECKSUMS:
18201821
React-logger: addd140841248966c2547eb94836399cc1061f4d
18211822
React-Mapbuffer: 029b5332e78af8c67c4b5e65edfc717068b8eac1
18221823
React-microtasksnativemodule: ee9ac93cdd64745dfd3f3e5fa7cb1d0f6a5b89cd
1823-
react-native-app-auth: 58e24517e55368bee2950c5a4d0699ed80f0bff7
1824-
react-native-contentpass: 491cee39ada3d0b087246234752249e617a0c0db
1824+
react-native-app-auth: 0dd956abd9201fc06f7b4a71f0740836e2532014
18251825
react-native-encrypted-storage: 569d114e329b1c2c2d9f8c84bcdbe4478dda2258
18261826
React-nativeconfig: 470fce6d871c02dc5eff250a362d56391b7f52d6
18271827
React-NativeModulesApple: 1586448c61a7c2bd4040cc03ccde66a72037e77e

expoExample/ios/Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ PODS:
1111
- DoubleConversion (1.1.6)
1212
- EXConstants (17.0.3):
1313
- ExpoModulesCore
14-
- Expo (52.0.11):
14+
- Expo (52.0.14):
1515
- ExpoModulesCore
1616
- ExpoAsset (11.0.1):
1717
- ExpoModulesCore
@@ -21,7 +21,7 @@ PODS:
2121
- ExpoModulesCore
2222
- ExpoKeepAwake (14.0.1):
2323
- ExpoModulesCore
24-
- ExpoModulesCore (2.0.6):
24+
- ExpoModulesCore (2.1.1):
2525
- DoubleConversion
2626
- glog
2727
- hermes-engine
@@ -1820,12 +1820,12 @@ SPEC CHECKSUMS:
18201820
ConsentViewController: 243f7bfcde4b6ec71a5033486465b7c17448493c
18211821
DoubleConversion: f16ae600a246532c4020132d54af21d0ddb2a385
18221822
EXConstants: dd2fe64c6cdb1383b694c309a63028a8e9f2be6d
1823-
Expo: 148aac4ce0da148c63447d09ae41ddb153f35506
1823+
Expo: 0e7b52be71a24a38d5e919e3040d8f51a8739cd0
18241824
ExpoAsset: 8138f2a9ec55ae1ad7c3871448379f7d97692d15
18251825
ExpoFileSystem: dc2679a2b5d4c465ca881129074da95faee943d5
18261826
ExpoFont: 7522d869d84ee2ee8093ee997fef5b86f85d856b
18271827
ExpoKeepAwake: 783e68647b969b210a786047c3daa7b753dcac1f
1828-
ExpoModulesCore: f71914f0725f2f4ca7a8d25dc551263e730d5d7f
1828+
ExpoModulesCore: 6b1ed7e4e5ab279a1825f40ef0140db84f6aad0f
18291829
FBLazyVector: be7314029d6ec6b90f0f75ce1195b8130ed9ac4f
18301830
fmt: 10c6e61f4be25dc963c36bd73fc7b1705fe975be
18311831
glog: 08b301085f15bcbb6ff8632a8ebaf239aae04e6a

expoExample/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"target": "ESNext",
2121
"verbatimModuleSyntax": true,
2222
"paths": {
23-
"react-native-contentpass": [
23+
"@contentpass/react-native-contentpass": [
2424
"../src/index"
2525
]
2626
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "react-native-contentpass",
2+
"name": "@contentpass/react-native-contentpass",
33
"version": "0.2.4",
44
"description": "Contentpass React Native SDK",
55
"source": "./src/index.tsx",
@@ -85,7 +85,7 @@
8585
"eslint-config-prettier": "^9.0.0",
8686
"eslint-plugin-prettier": "^5.0.1",
8787
"jest": "^29.7.0",
88-
"prettier": "^3.0.3",
88+
"prettier": "^3.4.2",
8989
"react": "18.3.1",
9090
"react-native": "0.76.2",
9191
"react-native-app-auth": "^8.0.0",

sharedExample/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { StyleSheet, View } from 'react-native';
22
import ContentpassUsage from './ContentpassUsage';
3-
import { ContentpassSdkProvider } from 'react-native-contentpass';
3+
import { ContentpassSdkProvider } from '@contentpass/react-native-contentpass';
44
import { contentpassConfig } from './contentpassConfig';
55

66
const styles = StyleSheet.create({

sharedExample/src/ContentpassUsage.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import { Button, ScrollView, StyleSheet, Text, View } from 'react-native';
22
import { useEffect, useRef, useState } from 'react';
33
import {
44
type ContentpassState,
5+
ContentpassStateType,
56
useContentpassSdk,
6-
} from 'react-native-contentpass';
7+
} from '@contentpass/react-native-contentpass';
78
import {
89
SPConsentManager,
910
type SPUserData,
@@ -39,6 +40,11 @@ export default function ContentpassUsage() {
3940
>();
4041

4142
useEffect(() => {
43+
// wait for the authResult to be set before setting up Sourcepoint
44+
if (!authResult || authResult.state === ContentpassStateType.INITIALISING) {
45+
return;
46+
}
47+
4248
spConsentManager.current = setupSourcepoint(
4349
authResult?.hasValidSubscription ?? false
4450
);

0 commit comments

Comments
 (0)