Skip to content

Commit b2af96e

Browse files
author
Heart
committed
update code
1 parent 2c09f52 commit b2af96e

File tree

5 files changed

+79
-6
lines changed

5 files changed

+79
-6
lines changed

example/ios/PamReactNativeExample.xcodeproj/project.pbxproj

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,10 @@
586586
"-DFOLLY_CFG_NO_COROUTINES=1",
587587
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
588588
);
589-
OTHER_LDFLAGS = "$(inherited) ";
589+
OTHER_LDFLAGS = (
590+
"$(inherited)",
591+
" ",
592+
);
590593
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
591594
SDKROOT = iphoneos;
592595
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
@@ -655,7 +658,10 @@
655658
"-DFOLLY_CFG_NO_COROUTINES=1",
656659
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
657660
);
658-
OTHER_LDFLAGS = "$(inherited) ";
661+
OTHER_LDFLAGS = (
662+
"$(inherited)",
663+
" ",
664+
);
659665
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
660666
SDKROOT = iphoneos;
661667
USE_HERMES = true;

example/ios/Podfile.lock

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1530,6 +1530,27 @@ PODS:
15301530
- React-logger (= 0.76.6)
15311531
- React-perflogger (= 0.76.6)
15321532
- React-utils (= 0.76.6)
1533+
- RNCAsyncStorage (2.1.0):
1534+
- DoubleConversion
1535+
- glog
1536+
- hermes-engine
1537+
- RCT-Folly (= 2024.01.01.00)
1538+
- RCTRequired
1539+
- RCTTypeSafety
1540+
- React-Core
1541+
- React-debug
1542+
- React-Fabric
1543+
- React-featureflags
1544+
- React-graphics
1545+
- React-ImageManager
1546+
- React-NativeModulesApple
1547+
- React-RCTFabric
1548+
- React-rendererdebug
1549+
- React-utils
1550+
- ReactCodegen
1551+
- ReactCommon/turbomodule/bridging
1552+
- ReactCommon/turbomodule/core
1553+
- Yoga
15331554
- SocketRocket (0.7.1)
15341555
- Yoga (0.0.0)
15351556

@@ -1599,6 +1620,7 @@ DEPENDENCIES:
15991620
- React-utils (from `../node_modules/react-native/ReactCommon/react/utils`)
16001621
- ReactCodegen (from `build/generated/ios`)
16011622
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
1623+
- "RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)"
16021624
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
16031625

16041626
SPEC REPOS:
@@ -1733,6 +1755,8 @@ EXTERNAL SOURCES:
17331755
:path: build/generated/ios
17341756
ReactCommon:
17351757
:path: "../node_modules/react-native/ReactCommon"
1758+
RNCAsyncStorage:
1759+
:path: "../node_modules/@react-native-async-storage/async-storage"
17361760
Yoga:
17371761
:path: "../node_modules/react-native/ReactCommon/yoga"
17381762

@@ -1800,9 +1824,10 @@ SPEC CHECKSUMS:
18001824
React-utils: e6697b03f21c7ac57b075d848cda7882662cabf7
18011825
ReactCodegen: 484b223748d7489d7036db1cbf79896d297e33a7
18021826
ReactCommon: 832cdd669aeecd430d9ca1975d15676b38d0b263
1827+
RNCAsyncStorage: fe98f1b459a87b80f12207da80c50b3a3abb6081
18031828
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
18041829
Yoga: be6f55a028e86c83ae066f018e9b5d24ffc45436
18051830

18061831
PODFILE CHECKSUM: 0b23fa334f7dc47bad5ff245a36b4ae07016c9d8
18071832

1808-
COCOAPODS: 1.16.2
1833+
COCOAPODS: 1.15.2

example/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"build:ios": "react-native build-ios --scheme PamReactNativeExample --mode Debug --extra-params \"-sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO\""
1212
},
1313
"dependencies": {
14+
"@react-native-async-storage/async-storage": "^2.1.0",
1415
"react": "18.3.1",
1516
"react-native": "0.76.6"
1617
},

example/src/App.tsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Text, View, StyleSheet } from 'react-native';
1+
import { Text, View, StyleSheet, Button } from 'react-native';
22
import { Pam } from 'pam-react-native';
33

44
Pam.initialize({
@@ -13,6 +13,19 @@ export default function App() {
1313
return (
1414
<View style={styles.container}>
1515
<Text>Result:</Text>
16+
<Button
17+
title="CLICK"
18+
onPress={async () => {
19+
console.log('clicked');
20+
try {
21+
console.log('CALL TRACK');
22+
const result = await Pam.track('click', { name: 'button' });
23+
console.log('RESULT', result);
24+
} catch (e) {
25+
console.log('ERROR', e);
26+
}
27+
}}
28+
/>
1629
</View>
1730
);
1831
}

yarn.lock

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2488,6 +2488,17 @@ __metadata:
24882488
languageName: node
24892489
linkType: hard
24902490

2491+
"@react-native-async-storage/async-storage@npm:^2.1.0":
2492+
version: 2.1.0
2493+
resolution: "@react-native-async-storage/async-storage@npm:2.1.0"
2494+
dependencies:
2495+
merge-options: ^3.0.4
2496+
peerDependencies:
2497+
react-native: ^0.0.0-0 || >=0.65 <1.0
2498+
checksum: bc6cdf3554fdd09f3e7916b105d966e56dbaca48475f33da378dd40c3823f7a6978057ca8207bc161c8e0b8c2b08161797dab48955bce1f3e3e457aeaa4ffaf9
2499+
languageName: node
2500+
linkType: hard
2501+
24912502
"@react-native-community/cli-clean@npm:15.0.1":
24922503
version: 15.0.1
24932504
resolution: "@react-native-community/cli-clean@npm:15.0.1"
@@ -7387,6 +7398,13 @@ __metadata:
73877398
languageName: node
73887399
linkType: hard
73897400

7401+
"is-plain-obj@npm:^2.1.0":
7402+
version: 2.1.0
7403+
resolution: "is-plain-obj@npm:2.1.0"
7404+
checksum: cec9100678b0a9fe0248a81743041ed990c2d4c99f893d935545cfbc42876cbe86d207f3b895700c690ad2fa520e568c44afc1605044b535a7820c1d40e38daa
7405+
languageName: node
7406+
linkType: hard
7407+
73907408
"is-plain-object@npm:^2.0.4":
73917409
version: 2.0.4
73927410
resolution: "is-plain-object@npm:2.0.4"
@@ -8815,6 +8833,15 @@ __metadata:
88158833
languageName: node
88168834
linkType: hard
88178835

8836+
"merge-options@npm:^3.0.4":
8837+
version: 3.0.4
8838+
resolution: "merge-options@npm:3.0.4"
8839+
dependencies:
8840+
is-plain-obj: ^2.1.0
8841+
checksum: d86ddb3dd6e85d558dbf25dc944f3527b6bacb944db3fdda6e84a3f59c4e4b85231095f58b835758b9a57708342dee0f8de0dffa352974a48221487fe9f4584f
8842+
languageName: node
8843+
linkType: hard
8844+
88188845
"merge-stream@npm:^2.0.0":
88198846
version: 2.0.0
88208847
resolution: "merge-stream@npm:2.0.0"
@@ -10167,6 +10194,7 @@ __metadata:
1016710194
"@babel/core": ^7.25.2
1016810195
"@babel/preset-env": ^7.25.3
1016910196
"@babel/runtime": ^7.25.0
10197+
"@react-native-async-storage/async-storage": ^2.1.0
1017010198
"@react-native-community/cli": 15.0.1
1017110199
"@react-native-community/cli-platform-android": 15.0.1
1017210200
"@react-native-community/cli-platform-ios": 15.0.1
@@ -10213,11 +10241,11 @@ __metadata:
1021310241

1021410242
"pamtag@file:../pamtracker.js::locator=pam-react-native%40workspace%3A.":
1021510243
version: 1.3.0
10216-
resolution: "pamtag@file:../pamtracker.js#../pamtracker.js::hash=179101&locator=pam-react-native%40workspace%3A."
10244+
resolution: "pamtag@file:../pamtracker.js#../pamtracker.js::hash=f56d42&locator=pam-react-native%40workspace%3A."
1021710245
dependencies:
1021810246
crypto-js: ^4.1.1
1021910247
eta: ^2.2.0
10220-
checksum: 9e8031766a8d350d69f5f612013ae5689161e785bc1788ad677ea1d0dc5786aa7faf0db7aa2e9216d29a48748bc4bd2463dc8b4af7de41d95c17268c8e472ace
10248+
checksum: a5098020925c48238e98b3409389e1b3d48729216ed0208f9eb577bbe0564643a23515fefb1a69263893d25cbdfda06705ccf7f6c581bc1158f48a98e124b48b
1022110249
languageName: node
1022210250
linkType: hard
1022310251

0 commit comments

Comments
 (0)