Skip to content

Commit d6c36ef

Browse files
authored
chore: fix lib build (#32)
* update turbo * relax peerDependencies * nitrogen is not part of prebuild * use RNRive as podname, and remove "react-native-rive": "*", from example * fix readme * RNRive.podspec * podfile update * use undefiend instead of null to be compatible with more nitro versions
1 parent 2469115 commit d6c36ef

File tree

62 files changed

+272
-257
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+272
-257
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Rive React Native 2.0
2323
## Installation
2424

2525
```sh
26-
npm install react-native-rive react-native-nitro-modules
26+
npm install rive-app/rive-nitro-react-native react-native-nitro-modules
2727
```
2828

2929
> `react-native-nitro-modules` is required as this library relies on [Nitro Modules](https://nitro.margelo.com/).
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ end
3131
Pod::UI.puts "react-native-rive: Rive iOS SDK #{rive_ios_version}"
3232

3333
Pod::Spec.new do |s|
34-
s.name = "react_native_rive"
34+
s.name = "RNRive"
3535
s.version = package["version"]
3636
s.summary = package["description"]
3737
s.homepage = package["homepage"]
@@ -44,7 +44,7 @@ Pod::Spec.new do |s|
4444
s.source_files = "ios/**/*.{h,m,mm,swift}"
4545

4646
s.public_header_files = ['ios/RCTSwiftLog.h']
47-
load 'nitrogen/generated/ios/react_native_rive+autolinking.rb'
47+
load 'nitrogen/generated/ios/RNRive+autolinking.rb'
4848
add_nitrogen_files(s)
4949

5050
s.dependency "RiveRuntime", rive_ios_version

example/ios/Podfile.lock

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1687,32 +1687,6 @@ PODS:
16871687
- React-debug
16881688
- React-hermes
16891689
- React-jsi (= 0.79.2)
1690-
- react_native_rive (0.1.0):
1691-
- DoubleConversion
1692-
- glog
1693-
- hermes-engine
1694-
- NitroModules
1695-
- RCT-Folly (= 2024.11.18.00)
1696-
- RCTRequired
1697-
- RCTTypeSafety
1698-
- React-Core
1699-
- React-debug
1700-
- React-Fabric
1701-
- React-featureflags
1702-
- React-graphics
1703-
- React-hermes
1704-
- React-ImageManager
1705-
- React-jsi
1706-
- React-NativeModulesApple
1707-
- React-RCTFabric
1708-
- React-renderercss
1709-
- React-rendererdebug
1710-
- React-utils
1711-
- ReactCodegen
1712-
- ReactCommon/turbomodule/bridging
1713-
- ReactCommon/turbomodule/core
1714-
- RiveRuntime (= 6.12.0)
1715-
- Yoga
17161690
- ReactAppDependencyProvider (0.79.2):
17171691
- ReactCodegen
17181692
- ReactCodegen (0.79.2):
@@ -1829,6 +1803,32 @@ PODS:
18291803
- ReactCommon/turbomodule/bridging
18301804
- ReactCommon/turbomodule/core
18311805
- Yoga
1806+
- RNRive (0.1.0):
1807+
- DoubleConversion
1808+
- glog
1809+
- hermes-engine
1810+
- NitroModules
1811+
- RCT-Folly (= 2024.11.18.00)
1812+
- RCTRequired
1813+
- RCTTypeSafety
1814+
- React-Core
1815+
- React-debug
1816+
- React-Fabric
1817+
- React-featureflags
1818+
- React-graphics
1819+
- React-hermes
1820+
- React-ImageManager
1821+
- React-jsi
1822+
- React-NativeModulesApple
1823+
- React-RCTFabric
1824+
- React-renderercss
1825+
- React-rendererdebug
1826+
- React-utils
1827+
- ReactCodegen
1828+
- ReactCommon/turbomodule/bridging
1829+
- ReactCommon/turbomodule/core
1830+
- RiveRuntime (= 6.12.0)
1831+
- Yoga
18321832
- SocketRocket (0.7.1)
18331833
- Yoga (0.0.0)
18341834

@@ -1903,12 +1903,12 @@ DEPENDENCIES:
19031903
- React-runtimescheduler (from `../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler`)
19041904
- React-timing (from `../node_modules/react-native/ReactCommon/react/timing`)
19051905
- React-utils (from `../node_modules/react-native/ReactCommon/react/utils`)
1906-
- react_native_rive (from `../..`)
19071906
- ReactAppDependencyProvider (from `build/generated/ios`)
19081907
- ReactCodegen (from `build/generated/ios`)
19091908
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
19101909
- "RNCPicker (from `../node_modules/@react-native-picker/picker`)"
19111910
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
1911+
- RNRive (from `../..`)
19121912
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
19131913

19141914
SPEC REPOS:
@@ -2054,8 +2054,6 @@ EXTERNAL SOURCES:
20542054
:path: "../node_modules/react-native/ReactCommon/react/timing"
20552055
React-utils:
20562056
:path: "../node_modules/react-native/ReactCommon/react/utils"
2057-
react_native_rive:
2058-
:path: "../.."
20592057
ReactAppDependencyProvider:
20602058
:path: build/generated/ios
20612059
ReactCodegen:
@@ -2066,6 +2064,8 @@ EXTERNAL SOURCES:
20662064
:path: "../node_modules/@react-native-picker/picker"
20672065
RNGestureHandler:
20682066
:path: "../node_modules/react-native-gesture-handler"
2067+
RNRive:
2068+
:path: "../.."
20692069
Yoga:
20702070
:path: "../node_modules/react-native/ReactCommon/yoga"
20712071

@@ -2138,13 +2138,13 @@ SPEC CHECKSUMS:
21382138
React-runtimescheduler: e917ab17ae08c204af1ebf8f669b7e411b0220c8
21392139
React-timing: a90f4654cbda9c628614f9bee68967f1768bd6a5
21402140
React-utils: 51c4e71608b8133fecc9a15801d244ae7bdf3758
2141-
react_native_rive: a6e6aa9ef2826c95aeaa7e40619a04f3887c8ac7
21422141
ReactAppDependencyProvider: d5dcc564f129632276bd3184e60f053fcd574d6b
21432142
ReactCodegen: fda99a79c866370190e162083a35602fdc314e5d
21442143
ReactCommon: 4d0da92a5eb8da86c08e3ec34bd23ab439fb2461
21452144
RiveRuntime: 8d819993126145fbf5a73089e7634b14b9aa577f
21462145
RNCPicker: 83c74db2de8274d8a8f3e18d91dea174a708f8c4
21472146
RNGestureHandler: bff91bb5ab5688265c70f74180ef718b94f33fe3
2147+
RNRive: 6ced82b0b2ff90cbb87813849e9c05761d038119
21482148
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
21492149
Yoga: 9f110fc4b7aa538663cba3c14cbb1c335f43c13f
21502150

example/src/pages/ManyViewModels.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function BindModeSelector({
6464

6565
function getDataBindValue(
6666
mode: BindModeOption,
67-
greenInstance: ViewModelInstance | null
67+
greenInstance: ViewModelInstance | undefined
6868
) {
6969
if (mode === 'none') return DataBindMode.None;
7070
if (mode === 'auto') return DataBindMode.Auto;
@@ -80,14 +80,14 @@ export default function ManyViewModels() {
8080

8181
// Create a ViewModelInstance for "green" to demonstrate instance binding
8282
const greenInstance = useMemo(() => {
83-
if (!riveFile) return null;
83+
if (!riveFile) return undefined;
8484
try {
8585
const viewModel = riveFile.defaultArtboardViewModel();
86-
if (!viewModel) return null;
86+
if (!viewModel) return undefined;
8787
return viewModel.createInstanceByName('green');
8888
} catch (e) {
8989
console.error('Failed to create green instance:', e);
90-
return null;
90+
return undefined;
9191
}
9292
}, [riveFile]);
9393

expo-example/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
"react-native-gesture-handler": "~2.28.0",
3636
"react-native-nitro-modules": "^0.31.3",
3737
"react-native-reanimated": "~4.1.1",
38-
"react-native-rive": "*",
3938
"react-native-safe-area-context": "~5.6.0",
4039
"react-native-screens": "~4.16.0",
4140
"react-native-web": "~0.21.0",

nitro.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://nitro.margelo.com/nitro.schema.json",
33
"cxxNamespace": ["rive"],
44
"ios": {
5-
"iosModuleName": "react_native_rive"
5+
"iosModuleName": "RNRive"
66
},
77
"android": {
88
"androidNamespace": ["rive"],

nitrogen/generated/ios/react_native_rive+autolinking.rb renamed to nitrogen/generated/ios/RNRive+autolinking.rb

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)