@baeckerherz/expo-mapbox-navigation 1.0.0 → 1.0.1
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/package.json
CHANGED
|
@@ -96,17 +96,28 @@ const withMapboxNavPodfile = (config, { navigationSdkVersion }) => {
|
|
|
96
96
|
end
|
|
97
97
|
end
|
|
98
98
|
end
|
|
99
|
-
#
|
|
100
|
-
#
|
|
99
|
+
# SPM binary xcframeworks are linked via OTHER_LDFLAGS but not embedded
|
|
100
|
+
# because the SPM product deps are on the pod target (static lib), not
|
|
101
|
+
# the app target. We add script phases to embed them and strip duplicate
|
|
102
|
+
# signatures (Xcode 17 bug).
|
|
101
103
|
user_proj = installer.aggregate_targets.first&.user_project
|
|
102
104
|
if user_proj
|
|
103
105
|
app_target = user_proj.targets.first
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
d = '$'
|
|
107
|
+
mapbox_fws = %w[MapboxCommon MapboxCoreMaps MapboxNavigationNative]
|
|
108
|
+
|
|
109
|
+
embed_name = 'EmbedMapboxFrameworks'
|
|
110
|
+
unless app_target.shell_script_build_phases.any? { |p| p.name == embed_name }
|
|
111
|
+
phase = app_target.new_shell_script_build_phase(embed_name)
|
|
112
|
+
phase.shell_script = "FRAMEWORKS_DIR=\\"#{d}{BUILT_PRODUCTS_DIR}/#{d}{FRAMEWORKS_FOLDER_PATH}\\"\\nmkdir -p \\"#{d}{FRAMEWORKS_DIR}\\"\\nfor fw in #{mapbox_fws.join(' ')}; do\\n SRC=\\"#{d}{BUILT_PRODUCTS_DIR}/#{d}{fw}.framework\\"\\n if [ -d \\"#{d}{SRC}\\" ]; then\\n cp -R \\"#{d}{SRC}\\" \\"#{d}{FRAMEWORKS_DIR}/\\"\\n codesign --force --sign \\"#{d}{EXPANDED_CODE_SIGN_IDENTITY}\\" \\"#{d}{FRAMEWORKS_DIR}/#{d}{fw}.framework\\"\\n fi\\ndone\\n"
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
strip_name = 'StripXCFrameworkSignatures'
|
|
116
|
+
unless app_target.shell_script_build_phases.any? { |p| p.name == strip_name }
|
|
117
|
+
phase = app_target.new_shell_script_build_phase(strip_name)
|
|
108
118
|
phase.shell_script = "DERIVED_ROOT=\\"#{d}{BUILD_DIR%/Build/*}\\"\\nfind \\"#{d}{DERIVED_ROOT}\\" -name \\"*.xcframework-*.signature\\" -delete 2>/dev/null\\nexit 0\\n"
|
|
109
119
|
end
|
|
120
|
+
|
|
110
121
|
user_proj.save
|
|
111
122
|
end`;
|
|
112
123
|
const escapedMarker = PLUGIN_MARKER.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
@@ -75,17 +75,28 @@ export const withMapboxNavPodfile: ConfigPlugin<PodfileOptions> = (
|
|
|
75
75
|
end
|
|
76
76
|
end
|
|
77
77
|
end
|
|
78
|
-
#
|
|
79
|
-
#
|
|
78
|
+
# SPM binary xcframeworks are linked via OTHER_LDFLAGS but not embedded
|
|
79
|
+
# because the SPM product deps are on the pod target (static lib), not
|
|
80
|
+
# the app target. We add script phases to embed them and strip duplicate
|
|
81
|
+
# signatures (Xcode 17 bug).
|
|
80
82
|
user_proj = installer.aggregate_targets.first&.user_project
|
|
81
83
|
if user_proj
|
|
82
84
|
app_target = user_proj.targets.first
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
d = '$'
|
|
86
|
+
mapbox_fws = %w[MapboxCommon MapboxCoreMaps MapboxNavigationNative]
|
|
87
|
+
|
|
88
|
+
embed_name = 'EmbedMapboxFrameworks'
|
|
89
|
+
unless app_target.shell_script_build_phases.any? { |p| p.name == embed_name }
|
|
90
|
+
phase = app_target.new_shell_script_build_phase(embed_name)
|
|
91
|
+
phase.shell_script = "FRAMEWORKS_DIR=\\"#{d}{BUILT_PRODUCTS_DIR}/#{d}{FRAMEWORKS_FOLDER_PATH}\\"\\nmkdir -p \\"#{d}{FRAMEWORKS_DIR}\\"\\nfor fw in #{mapbox_fws.join(' ')}; do\\n SRC=\\"#{d}{BUILT_PRODUCTS_DIR}/#{d}{fw}.framework\\"\\n if [ -d \\"#{d}{SRC}\\" ]; then\\n cp -R \\"#{d}{SRC}\\" \\"#{d}{FRAMEWORKS_DIR}/\\"\\n codesign --force --sign \\"#{d}{EXPANDED_CODE_SIGN_IDENTITY}\\" \\"#{d}{FRAMEWORKS_DIR}/#{d}{fw}.framework\\"\\n fi\\ndone\\n"
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
strip_name = 'StripXCFrameworkSignatures'
|
|
95
|
+
unless app_target.shell_script_build_phases.any? { |p| p.name == strip_name }
|
|
96
|
+
phase = app_target.new_shell_script_build_phase(strip_name)
|
|
87
97
|
phase.shell_script = "DERIVED_ROOT=\\"#{d}{BUILD_DIR%/Build/*}\\"\\nfind \\"#{d}{DERIVED_ROOT}\\" -name \\"*.xcframework-*.signature\\" -delete 2>/dev/null\\nexit 0\\n"
|
|
88
98
|
end
|
|
99
|
+
|
|
89
100
|
user_proj.save
|
|
90
101
|
end`;
|
|
91
102
|
|