@jacques_gordon/expo-mapbox-navigation 2.2.19 → 2.2.20
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/app.plugin.js +33 -0
- package/package.json +1 -1
- package/plugin/src/index.js +33 -0
package/app.plugin.js
CHANGED
|
@@ -275,6 +275,39 @@ def _expo_mapbox_nav_add_spm(installer)
|
|
|
275
275
|
puts "[ExpoMapboxNavigation] Added PODS_CONFIGURATION_BUILD_DIR to SWIFT_INCLUDE_PATHS (#{config.name})"
|
|
276
276
|
end
|
|
277
277
|
end
|
|
278
|
+
|
|
279
|
+
# ── FRAMEWORK_SEARCH_PATHS / OTHER_LDFLAGS fix for MapboxNavigationNative ───
|
|
280
|
+
# React Native's own SPM manager (react-native/scripts/cocoapods/spm.rb,
|
|
281
|
+
# SPMManager#apply_on_post_install) unconditionally deletes ALL
|
|
282
|
+
# XCRemoteSwiftPackageReference/XCLocalSwiftPackageReference entries not
|
|
283
|
+
# registered through its own official spm_dependency() API, then only
|
|
284
|
+
# re-adds the ones it knows about. Since we don't use that API (to avoid
|
|
285
|
+
# the static-linking duplicate-symbol issues it's known to cause with
|
|
286
|
+
# Expo modules), our manually-added package_product_dependency for
|
|
287
|
+
# MapboxNavigationNative keeps getting wiped. Running this whole hook
|
|
288
|
+
# from post_integrate (see bottom of file) works around the *timing* of
|
|
289
|
+
# that wipe, but as a second, independent line of defense that doesn't
|
|
290
|
+
# depend on hook ordering at all, we also force-link the actual compiled
|
|
291
|
+
# MapboxNavigationNativeWrapper.framework directly via raw build
|
|
292
|
+
# settings. clean_spm_dependencies_from_target only ever touches
|
|
293
|
+
# package_references - it never touches FRAMEWORK_SEARCH_PATHS or
|
|
294
|
+
# OTHER_LDFLAGS, so this survives regardless of what wipes the package
|
|
295
|
+
# graph entries.
|
|
296
|
+
expo_target.build_configurations.each do |config|
|
|
297
|
+
existing_fsp = config.build_settings['FRAMEWORK_SEARCH_PATHS'] || '$(inherited)'
|
|
298
|
+
unless existing_fsp.to_s.include?('PackageFrameworks')
|
|
299
|
+
config.build_settings['FRAMEWORK_SEARCH_PATHS'] =
|
|
300
|
+
"#{existing_fsp} \\"${podsBuildDir}/PackageFrameworks\\""
|
|
301
|
+
puts "[ExpoMapboxNavigation] Added PackageFrameworks to FRAMEWORK_SEARCH_PATHS (#{config.name})"
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
existing_ldflags = config.build_settings['OTHER_LDFLAGS'] || '$(inherited)'
|
|
305
|
+
unless existing_ldflags.to_s.include?('MapboxNavigationNativeWrapper')
|
|
306
|
+
config.build_settings['OTHER_LDFLAGS'] =
|
|
307
|
+
"#{existing_ldflags} -framework MapboxNavigationNativeWrapper"
|
|
308
|
+
puts "[ExpoMapboxNavigation] Added -framework MapboxNavigationNativeWrapper to OTHER_LDFLAGS (#{config.name})"
|
|
309
|
+
end
|
|
310
|
+
end
|
|
278
311
|
else
|
|
279
312
|
puts '[ExpoMapboxNavigation] WARNING: ExpoMapboxNavigation target not found!'
|
|
280
313
|
puts '[ExpoMapboxNavigation] Available targets:'
|
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.20",
|
|
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",
|
package/plugin/src/index.js
CHANGED
|
@@ -275,6 +275,39 @@ def _expo_mapbox_nav_add_spm(installer)
|
|
|
275
275
|
puts "[ExpoMapboxNavigation] Added PODS_CONFIGURATION_BUILD_DIR to SWIFT_INCLUDE_PATHS (#{config.name})"
|
|
276
276
|
end
|
|
277
277
|
end
|
|
278
|
+
|
|
279
|
+
# ── FRAMEWORK_SEARCH_PATHS / OTHER_LDFLAGS fix for MapboxNavigationNative ───
|
|
280
|
+
# React Native's own SPM manager (react-native/scripts/cocoapods/spm.rb,
|
|
281
|
+
# SPMManager#apply_on_post_install) unconditionally deletes ALL
|
|
282
|
+
# XCRemoteSwiftPackageReference/XCLocalSwiftPackageReference entries not
|
|
283
|
+
# registered through its own official spm_dependency() API, then only
|
|
284
|
+
# re-adds the ones it knows about. Since we don't use that API (to avoid
|
|
285
|
+
# the static-linking duplicate-symbol issues it's known to cause with
|
|
286
|
+
# Expo modules), our manually-added package_product_dependency for
|
|
287
|
+
# MapboxNavigationNative keeps getting wiped. Running this whole hook
|
|
288
|
+
# from post_integrate (see bottom of file) works around the *timing* of
|
|
289
|
+
# that wipe, but as a second, independent line of defense that doesn't
|
|
290
|
+
# depend on hook ordering at all, we also force-link the actual compiled
|
|
291
|
+
# MapboxNavigationNativeWrapper.framework directly via raw build
|
|
292
|
+
# settings. clean_spm_dependencies_from_target only ever touches
|
|
293
|
+
# package_references - it never touches FRAMEWORK_SEARCH_PATHS or
|
|
294
|
+
# OTHER_LDFLAGS, so this survives regardless of what wipes the package
|
|
295
|
+
# graph entries.
|
|
296
|
+
expo_target.build_configurations.each do |config|
|
|
297
|
+
existing_fsp = config.build_settings['FRAMEWORK_SEARCH_PATHS'] || '$(inherited)'
|
|
298
|
+
unless existing_fsp.to_s.include?('PackageFrameworks')
|
|
299
|
+
config.build_settings['FRAMEWORK_SEARCH_PATHS'] =
|
|
300
|
+
"#{existing_fsp} \\"${podsBuildDir}/PackageFrameworks\\""
|
|
301
|
+
puts "[ExpoMapboxNavigation] Added PackageFrameworks to FRAMEWORK_SEARCH_PATHS (#{config.name})"
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
existing_ldflags = config.build_settings['OTHER_LDFLAGS'] || '$(inherited)'
|
|
305
|
+
unless existing_ldflags.to_s.include?('MapboxNavigationNativeWrapper')
|
|
306
|
+
config.build_settings['OTHER_LDFLAGS'] =
|
|
307
|
+
"#{existing_ldflags} -framework MapboxNavigationNativeWrapper"
|
|
308
|
+
puts "[ExpoMapboxNavigation] Added -framework MapboxNavigationNativeWrapper to OTHER_LDFLAGS (#{config.name})"
|
|
309
|
+
end
|
|
310
|
+
end
|
|
278
311
|
else
|
|
279
312
|
puts '[ExpoMapboxNavigation] WARNING: ExpoMapboxNavigation target not found!'
|
|
280
313
|
puts '[ExpoMapboxNavigation] Available targets:'
|