Skip to content

Commit 6a83a84

Browse files
committed
make iOS native module build for macOS as well
1 parent 5bcce20 commit 6a83a84

File tree

5 files changed

+39
-8
lines changed

5 files changed

+39
-8
lines changed

packages/jsi/NativescriptJsi.podspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ Pod::Spec.new do |s|
1010
s.license = package["license"]
1111
s.authors = package["author"]
1212

13-
s.platforms = { :ios => min_ios_version_supported }
13+
s.platforms = { :ios => min_ios_version_supported, :osx => "12.0" }
1414
s.source = { :git => "https://github.com/NativeScript/napi-ios/tree/main/packages/jsi.git", :tag => "#{s.version}" }
1515

16-
s.source_files = "ios/**/*.{h,m,mm,swift,cpp}"
17-
s.private_header_files = "ios/**/*.h"
16+
s.source_files = "apple/**/*.{h,m,mm,swift,cpp}"
17+
s.private_header_files = "apple/**/*.h"
1818

1919
install_modules_dependencies(s)
2020
end

packages/jsi/example/macos/Podfile.lock

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,34 @@ PODS:
8282
- hermes-engine (0.81.5):
8383
- hermes-engine/Pre-built (= 0.81.5)
8484
- hermes-engine/Pre-built (0.81.5)
85+
- NativescriptJsi (0.1.0):
86+
- boost
87+
- DoubleConversion
88+
- fast_float
89+
- fmt
90+
- glog
91+
- hermes-engine
92+
- RCT-Folly
93+
- RCT-Folly/Fabric
94+
- RCTRequired
95+
- RCTTypeSafety
96+
- React-Core
97+
- React-debug
98+
- React-Fabric
99+
- React-featureflags
100+
- React-graphics
101+
- React-ImageManager
102+
- React-jsi
103+
- React-NativeModulesApple
104+
- React-RCTFabric
105+
- React-renderercss
106+
- React-rendererdebug
107+
- React-utils
108+
- ReactCodegen
109+
- ReactCommon/turbomodule/bridging
110+
- ReactCommon/turbomodule/core
111+
- SocketRocket
112+
- Yoga
85113
- RCT-Folly (2024.11.18.00):
86114
- boost
87115
- DoubleConversion
@@ -2348,6 +2376,7 @@ DEPENDENCIES:
23482376
- fmt (from `../../../../node_modules/react-native-macos/third-party-podspecs/fmt.podspec`)
23492377
- glog (from `../../../../node_modules/react-native-macos/third-party-podspecs/glog.podspec`)
23502378
- hermes-engine (from `../../../../node_modules/react-native-macos/sdks/hermes-engine/hermes-engine.podspec`)
2379+
- NativescriptJsi (from `../..`)
23512380
- RCT-Folly (from `../../../../node_modules/react-native-macos/third-party-podspecs/RCT-Folly.podspec`)
23522381
- RCTDeprecation (from `../../../../node_modules/react-native-macos/ReactApple/Libraries/RCTFoundation/RCTDeprecation`)
23532382
- RCTRequired (from `../../../../node_modules/react-native-macos/Libraries/Required`)
@@ -2453,6 +2482,8 @@ EXTERNAL SOURCES:
24532482
hermes-engine:
24542483
:podspec: "../../../../node_modules/react-native-macos/sdks/hermes-engine/hermes-engine.podspec"
24552484
:tag: hermes-2025-07-07-RNv0.81.0-e0fc67142ec0763c6b6153ca2bf96df815539782
2485+
NativescriptJsi:
2486+
:path: "../.."
24562487
RCT-Folly:
24572488
:podspec: "../../../../node_modules/react-native-macos/third-party-podspecs/RCT-Folly.podspec"
24582489
RCTDeprecation:
@@ -2599,6 +2630,7 @@ SPEC CHECKSUMS:
25992630
fmt: 24e7591456deb60b4a77518f83d9a916ac84223f
26002631
glog: 0b31c25149b9d350b2666c7d459229861a00ec07
26012632
hermes-engine: d1e544246fbda6f5b9b0ebe261340f34645cb03a
2633+
NativescriptJsi: 716565d81fe7d789f16252fa1b44aaf909c33fa9
26022634
RCT-Folly: 0a7558aedae101878b4a1273756c05613dbdfb61
26032635
RCTDeprecation: b60b889eafa75f46c3d6be5332681efbb16ad0c7
26042636
RCTRequired: 070d7f0ef937e7a93aab20761cef55419f16b5de

packages/jsi/package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
"name": "nativescript-jsi",
33
"version": "0.1.0",
44
"description": "A JSI projection for NativeScript",
5-
"main": "./lib/module/index.js",
6-
"types": "./lib/typescript/src/index.d.ts",
5+
"react-native": "./src/index.tsx",
6+
"types": "./src/index.tsx",
77
"exports": {
88
".": {
99
"source": "./src/index.tsx",
10-
"types": "./lib/typescript/src/index.d.ts",
11-
"default": "./lib/module/index.js"
10+
"types": "./src/index.tsx",
11+
"default": "./src/index.tsx"
1212
},
1313
"./package.json": "./package.json"
1414
},
@@ -33,7 +33,6 @@
3333
],
3434
"scripts": {
3535
"clean": "del-cli lib",
36-
"prepare": "bob build",
3736
"typecheck": "tsc"
3837
},
3938
"keywords": [

0 commit comments

Comments
 (0)