@jacques_gordon/expo-mapbox-navigation 2.2.10 → 2.2.12
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.
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/app.plugin.js +31 -39
- package/ios/build-xcframeworks.sh +0 -0
- package/package.json +2 -2
- package/plugin/src/index.js +31 -39
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
package/app.plugin.js
CHANGED
|
@@ -172,8 +172,9 @@ def _expo_mapbox_nav_add_spm(installer)
|
|
|
172
172
|
|
|
173
173
|
pkg_class = Xcodeproj::Project::Object::XCRemoteSwiftPackageReference
|
|
174
174
|
ref_class = Xcodeproj::Project::Object::XCSwiftPackageProductDependency
|
|
175
|
+
dep_class = Xcodeproj::Project::Object::PBXTargetDependency
|
|
175
176
|
|
|
176
|
-
# ── Step 1: Add
|
|
177
|
+
# ── Step 1: Add package + products to pods_project ────────────────────────
|
|
177
178
|
pods_project = installer.pods_project
|
|
178
179
|
|
|
179
180
|
pkg = pods_project.root_object.package_references.find { |p|
|
|
@@ -187,60 +188,52 @@ def _expo_mapbox_nav_add_spm(installer)
|
|
|
187
188
|
puts '[ExpoMapboxNavigation] Added mapbox-navigation-ios to pods_project'
|
|
188
189
|
end
|
|
189
190
|
|
|
190
|
-
# ── FIX: Stronger target lookup with fallback ──────────────────────────────
|
|
191
|
-
# CocoaPods normally names the target exactly 'ExpoMapboxNavigation'.
|
|
192
|
-
# Deduplication suffixes (e.g. 'ExpoMapboxNavigation-abc123') only happen
|
|
193
|
-
# when the same pod is included in multiple targets with different specs,
|
|
194
|
-
# which is not our case. We still add an include? fallback to be safe.
|
|
195
191
|
expo_target = pods_project.targets.find { |t| t.name == 'ExpoMapboxNavigation' }
|
|
196
192
|
expo_target ||= pods_project.targets.find { |t| t.name.include?('ExpoMapboxNavigation') }
|
|
197
193
|
if expo_target
|
|
198
194
|
puts "[ExpoMapboxNavigation] Found target: #{expo_target.name}"
|
|
199
195
|
products.each do |product_name|
|
|
200
|
-
|
|
196
|
+
# 1. package_product_dependencies — registers SPM product on target
|
|
197
|
+
prod_ref = expo_target.package_product_dependencies.find { |r|
|
|
201
198
|
r.class == ref_class && r.package == pkg && r.product_name == product_name
|
|
202
199
|
}
|
|
203
|
-
unless
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
expo_target.package_product_dependencies <<
|
|
208
|
-
puts "[ExpoMapboxNavigation]
|
|
200
|
+
unless prod_ref
|
|
201
|
+
prod_ref = pods_project.new(ref_class)
|
|
202
|
+
prod_ref.package = pkg
|
|
203
|
+
prod_ref.product_name = product_name
|
|
204
|
+
expo_target.package_product_dependencies << prod_ref
|
|
205
|
+
puts "[ExpoMapboxNavigation] Added package_product_dependency: #{product_name}"
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# ── SWIFT_INCLUDE_PATHS fix ──────────────────────────────────────────────
|
|
210
|
+
# SPM compiles .swiftmodule into ${PODS_CONFIGURATION_BUILD_DIR}.
|
|
211
|
+
# Without adding this path, Xcode throws "no such module MapboxNavigationCore".
|
|
212
|
+
# Source: https://trinhngocthuyen.com/posts/tech/spm-with-cocoapods/
|
|
213
|
+
expo_target.build_configurations.each do |config|
|
|
214
|
+
existing = config.build_settings['SWIFT_INCLUDE_PATHS'] || '$(inherited)'
|
|
215
|
+
unless existing.include?('PODS_CONFIGURATION_BUILD_DIR')
|
|
216
|
+
config.build_settings['SWIFT_INCLUDE_PATHS'] =
|
|
217
|
+
"#{existing} \"${PODS_CONFIGURATION_BUILD_DIR}\""
|
|
218
|
+
puts "[ExpoMapboxNavigation] Added PODS_CONFIGURATION_BUILD_DIR to SWIFT_INCLUDE_PATHS (#{config.name})"
|
|
209
219
|
end
|
|
210
220
|
end
|
|
211
221
|
else
|
|
212
|
-
# Debug: print all available targets so we can fix the name if needed
|
|
213
222
|
puts '[ExpoMapboxNavigation] WARNING: ExpoMapboxNavigation target not found!'
|
|
214
223
|
puts '[ExpoMapboxNavigation] Available targets:'
|
|
215
224
|
pods_project.targets.each { |t| puts " - #{t.name}" }
|
|
216
225
|
end
|
|
217
226
|
pods_project.save
|
|
218
227
|
|
|
219
|
-
# ── Step 2:
|
|
220
|
-
#
|
|
221
|
-
#
|
|
222
|
-
#
|
|
223
|
-
#
|
|
224
|
-
#
|
|
225
|
-
#
|
|
226
|
-
#
|
|
227
|
-
# v2.2.9 (Step 2 removed entirely):
|
|
228
|
-
# → No "Multiple commands produce" ✅
|
|
229
|
-
# → But "Missing package product MapboxNavigationCore/UIKit" ❌
|
|
230
|
-
# → Because Pods.xcodeproj is rebuilt by CocoaPods each time, so the
|
|
231
|
-
# package reference injected into pods_project does not persist.
|
|
232
|
-
# Without a reference in user_project (Navio.xcodeproj, which persists),
|
|
233
|
-
# Xcode does not resolve the SPM package and the products are not found.
|
|
234
|
-
#
|
|
235
|
-
# v2.2.10 (this version — package reference only in user_project):
|
|
236
|
-
# → Add ONLY the XCRemoteSwiftPackageReference to user_project ✅
|
|
237
|
-
# → Do NOT add XCSwiftPackageProductDependency to user_target ✅
|
|
238
|
-
# → This registers the package in the Xcode workspace SPM graph so it
|
|
239
|
-
# gets resolved and downloaded, without embedding its frameworks again.
|
|
228
|
+
# ── Step 2: Register package reference in user_project (persists) ─────────
|
|
229
|
+
# Pods.xcodeproj is rebuilt every pod install — our Step 1 must survive via
|
|
230
|
+
# the workspace SPM graph. Registering the XCRemoteSwiftPackageReference in
|
|
231
|
+
# user_project (Navio.xcodeproj) ensures Xcode resolves the package into
|
|
232
|
+
# the workspace cache, making products available to Pods.xcodeproj targets.
|
|
233
|
+
# We do NOT add product dependencies to the app target — that caused
|
|
234
|
+
# "Multiple commands produce" in v2.2.8 (duplicate embed with @rnmapbox/maps).
|
|
240
235
|
installer.aggregate_targets.each do |agg|
|
|
241
236
|
user_project = agg.user_project
|
|
242
|
-
|
|
243
|
-
# Add only the package reference — not the product dependencies
|
|
244
237
|
user_pkg = user_project.root_object.package_references.find { |p|
|
|
245
238
|
p.class == pkg_class && p.repositoryURL == url
|
|
246
239
|
}
|
|
@@ -249,9 +242,8 @@ def _expo_mapbox_nav_add_spm(installer)
|
|
|
249
242
|
user_pkg.repositoryURL = url
|
|
250
243
|
user_pkg.requirement = requirement
|
|
251
244
|
user_project.root_object.package_references << user_pkg
|
|
252
|
-
puts "[ExpoMapboxNavigation] Registered
|
|
245
|
+
puts "[ExpoMapboxNavigation] Registered package ref in #{user_project.path.basename}"
|
|
253
246
|
end
|
|
254
|
-
|
|
255
247
|
user_project.save
|
|
256
248
|
end
|
|
257
249
|
end
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jacques_gordon/expo-mapbox-navigation",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.12",
|
|
4
4
|
"description": "Expo module for Mapbox Navigation SDK with 16KB page size support, NDK27, and Mapbox Maps v11.11.0+",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"clean": "rm -rf build",
|
|
10
10
|
"lint": "tsc --noEmit",
|
|
11
11
|
"test": "echo \"Tests require a full Expo project with EAS Build. See README.\"",
|
|
12
|
-
"prepublishOnly": "
|
|
12
|
+
"prepublishOnly": ""
|
|
13
13
|
},
|
|
14
14
|
"keywords": [
|
|
15
15
|
"expo",
|
package/plugin/src/index.js
CHANGED
|
@@ -172,8 +172,9 @@ def _expo_mapbox_nav_add_spm(installer)
|
|
|
172
172
|
|
|
173
173
|
pkg_class = Xcodeproj::Project::Object::XCRemoteSwiftPackageReference
|
|
174
174
|
ref_class = Xcodeproj::Project::Object::XCSwiftPackageProductDependency
|
|
175
|
+
dep_class = Xcodeproj::Project::Object::PBXTargetDependency
|
|
175
176
|
|
|
176
|
-
# ── Step 1: Add
|
|
177
|
+
# ── Step 1: Add package + products to pods_project ────────────────────────
|
|
177
178
|
pods_project = installer.pods_project
|
|
178
179
|
|
|
179
180
|
pkg = pods_project.root_object.package_references.find { |p|
|
|
@@ -187,60 +188,52 @@ def _expo_mapbox_nav_add_spm(installer)
|
|
|
187
188
|
puts '[ExpoMapboxNavigation] Added mapbox-navigation-ios to pods_project'
|
|
188
189
|
end
|
|
189
190
|
|
|
190
|
-
# ── FIX: Stronger target lookup with fallback ──────────────────────────────
|
|
191
|
-
# CocoaPods normally names the target exactly 'ExpoMapboxNavigation'.
|
|
192
|
-
# Deduplication suffixes (e.g. 'ExpoMapboxNavigation-abc123') only happen
|
|
193
|
-
# when the same pod is included in multiple targets with different specs,
|
|
194
|
-
# which is not our case. We still add an include? fallback to be safe.
|
|
195
191
|
expo_target = pods_project.targets.find { |t| t.name == 'ExpoMapboxNavigation' }
|
|
196
192
|
expo_target ||= pods_project.targets.find { |t| t.name.include?('ExpoMapboxNavigation') }
|
|
197
193
|
if expo_target
|
|
198
194
|
puts "[ExpoMapboxNavigation] Found target: #{expo_target.name}"
|
|
199
195
|
products.each do |product_name|
|
|
200
|
-
|
|
196
|
+
# 1. package_product_dependencies — registers SPM product on target
|
|
197
|
+
prod_ref = expo_target.package_product_dependencies.find { |r|
|
|
201
198
|
r.class == ref_class && r.package == pkg && r.product_name == product_name
|
|
202
199
|
}
|
|
203
|
-
unless
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
expo_target.package_product_dependencies <<
|
|
208
|
-
puts "[ExpoMapboxNavigation]
|
|
200
|
+
unless prod_ref
|
|
201
|
+
prod_ref = pods_project.new(ref_class)
|
|
202
|
+
prod_ref.package = pkg
|
|
203
|
+
prod_ref.product_name = product_name
|
|
204
|
+
expo_target.package_product_dependencies << prod_ref
|
|
205
|
+
puts "[ExpoMapboxNavigation] Added package_product_dependency: #{product_name}"
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# ── SWIFT_INCLUDE_PATHS fix ──────────────────────────────────────────────
|
|
210
|
+
# SPM compiles .swiftmodule into ${PODS_CONFIGURATION_BUILD_DIR}.
|
|
211
|
+
# Without adding this path, Xcode throws "no such module MapboxNavigationCore".
|
|
212
|
+
# Source: https://trinhngocthuyen.com/posts/tech/spm-with-cocoapods/
|
|
213
|
+
expo_target.build_configurations.each do |config|
|
|
214
|
+
existing = config.build_settings['SWIFT_INCLUDE_PATHS'] || '$(inherited)'
|
|
215
|
+
unless existing.include?('PODS_CONFIGURATION_BUILD_DIR')
|
|
216
|
+
config.build_settings['SWIFT_INCLUDE_PATHS'] =
|
|
217
|
+
"#{existing} \"\\${PODS_CONFIGURATION_BUILD_DIR}\""
|
|
218
|
+
puts "[ExpoMapboxNavigation] Added PODS_CONFIGURATION_BUILD_DIR to SWIFT_INCLUDE_PATHS (#{config.name})"
|
|
209
219
|
end
|
|
210
220
|
end
|
|
211
221
|
else
|
|
212
|
-
# Debug: print all available targets so we can fix the name if needed
|
|
213
222
|
puts '[ExpoMapboxNavigation] WARNING: ExpoMapboxNavigation target not found!'
|
|
214
223
|
puts '[ExpoMapboxNavigation] Available targets:'
|
|
215
224
|
pods_project.targets.each { |t| puts " - #{t.name}" }
|
|
216
225
|
end
|
|
217
226
|
pods_project.save
|
|
218
227
|
|
|
219
|
-
# ── Step 2:
|
|
220
|
-
#
|
|
221
|
-
#
|
|
222
|
-
#
|
|
223
|
-
#
|
|
224
|
-
#
|
|
225
|
-
#
|
|
226
|
-
#
|
|
227
|
-
# v2.2.9 (Step 2 removed entirely):
|
|
228
|
-
# → No "Multiple commands produce" ✅
|
|
229
|
-
# → But "Missing package product MapboxNavigationCore/UIKit" ❌
|
|
230
|
-
# → Because Pods.xcodeproj is rebuilt by CocoaPods each time, so the
|
|
231
|
-
# package reference injected into pods_project does not persist.
|
|
232
|
-
# Without a reference in user_project (Navio.xcodeproj, which persists),
|
|
233
|
-
# Xcode does not resolve the SPM package and the products are not found.
|
|
234
|
-
#
|
|
235
|
-
# v2.2.10 (this version — package reference only in user_project):
|
|
236
|
-
# → Add ONLY the XCRemoteSwiftPackageReference to user_project ✅
|
|
237
|
-
# → Do NOT add XCSwiftPackageProductDependency to user_target ✅
|
|
238
|
-
# → This registers the package in the Xcode workspace SPM graph so it
|
|
239
|
-
# gets resolved and downloaded, without embedding its frameworks again.
|
|
228
|
+
# ── Step 2: Register package reference in user_project (persists) ─────────
|
|
229
|
+
# Pods.xcodeproj is rebuilt every pod install — our Step 1 must survive via
|
|
230
|
+
# the workspace SPM graph. Registering the XCRemoteSwiftPackageReference in
|
|
231
|
+
# user_project (Navio.xcodeproj) ensures Xcode resolves the package into
|
|
232
|
+
# the workspace cache, making products available to Pods.xcodeproj targets.
|
|
233
|
+
# We do NOT add product dependencies to the app target — that caused
|
|
234
|
+
# "Multiple commands produce" in v2.2.8 (duplicate embed with @rnmapbox/maps).
|
|
240
235
|
installer.aggregate_targets.each do |agg|
|
|
241
236
|
user_project = agg.user_project
|
|
242
|
-
|
|
243
|
-
# Add only the package reference — not the product dependencies
|
|
244
237
|
user_pkg = user_project.root_object.package_references.find { |p|
|
|
245
238
|
p.class == pkg_class && p.repositoryURL == url
|
|
246
239
|
}
|
|
@@ -249,9 +242,8 @@ def _expo_mapbox_nav_add_spm(installer)
|
|
|
249
242
|
user_pkg.repositoryURL = url
|
|
250
243
|
user_pkg.requirement = requirement
|
|
251
244
|
user_project.root_object.package_references << user_pkg
|
|
252
|
-
puts "[ExpoMapboxNavigation] Registered
|
|
245
|
+
puts "[ExpoMapboxNavigation] Registered package ref in #{user_project.path.basename}"
|
|
253
246
|
end
|
|
254
|
-
|
|
255
247
|
user_project.save
|
|
256
248
|
end
|
|
257
249
|
end
|