node-sword-interface 1.0.73 → 1.0.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/binding.gyp +20 -7
  2. package/package.json +1 -1
package/binding.gyp CHANGED
@@ -1,7 +1,16 @@
1
1
  {
2
2
  "variables": {
3
- # Detect if we are building for iOS by checking an env var
4
- "is_ios%": "<!(python3 -c \"import os; print(1 if os.environ.get('PLATFORM') == 'ios' or os.environ.get('SDKROOT') and 'iPhone' in os.environ.get('SDKROOT') else 0)\")"
3
+ # 1. Detect if we are on iOS
4
+ "is_ios%": "<!(python3 -c \"import os; sdk = os.environ.get('SDKROOT', ''); print(1 if 'iPhone' in sdk or os.environ.get('PLATFORM') == 'ios' else 0)\")",
5
+
6
+ # 2. Get the deployment target (e.g., '15.0') from env, default to '13.0'
7
+ "ios_ver%": "<!(python3 -c \"import os; print(os.environ.get('IPHONEOS_DEPLOYMENT_TARGET', '13.0'))\")",
8
+
9
+ # 3. Detect if it's a simulator build
10
+ "is_ios_sim%": "<!(python3 -c \"import os; print(1 if 'iPhoneSimulator' in os.environ.get('SDKROOT', '') else 0)\")",
11
+
12
+ # 4. Construct the full target triple dynamically
13
+ "ios_target": "<!(python3 -c \"import os; ver = os.environ.get('IPHONEOS_DEPLOYMENT_TARGET', '13.0'); suffix = '-simulator' if 'iPhoneSimulator' in os.environ.get('SDKROOT', '') else ''; print(f'arm64-apple-ios{ver}{suffix}')\")"
5
14
  },
6
15
  "targets": [
7
16
  {
@@ -11,7 +20,7 @@
11
20
  ["is_ios==1", {
12
21
  "xcode_settings": {
13
22
  "SDKROOT": "iphoneos",
14
- "IPHONEOS_DEPLOYMENT_TARGET": "13.0"
23
+ "IPHONEOS_DEPLOYMENT_TARGET": "<(ios_ver)"
15
24
  },
16
25
  'actions': [
17
26
  {
@@ -112,14 +121,18 @@
112
121
  ],
113
122
  "xcode_settings": {
114
123
  "SDKROOT": "iphoneos",
115
- "IPHONEOS_DEPLOYMENT_TARGET": "13.0",
116
- "SUPPORTED_PLATFORMS": "iphonesimulator iphoneos",
117
- # This ensures the binary is built for the current active destination
124
+ "IPHONEOS_DEPLOYMENT_TARGET": "<(ios_ver)",
118
125
  "ONLY_ACTIVE_ARCH": "YES",
126
+ "OTHER_CFLAGS": [
127
+ "-target <(ios_target)"
128
+ ],
119
129
  "OTHER_LDFLAGS": [
120
130
  "-dynamiclib",
121
131
  "-install_name @rpath/node_sword_interface.framework/node_sword_interface",
122
- "-undefined dynamic_lookup"
132
+ "-undefined dynamic_lookup",
133
+ "-Wl,-bind_at_load",
134
+ "-all_load",
135
+ "-target <(ios_target)"
123
136
  ],
124
137
  "MACH_O_TYPE": "mh_dylib",
125
138
  "PRODUCT_TYPE": "com.apple.product-type.framework"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-sword-interface",
3
- "version": "1.0.73",
3
+ "version": "1.0.74",
4
4
  "description": "Javascript (N-API) interface to SWORD library",
5
5
  "keywords": [
6
6
  "C++",