@@ -123,22 +123,23 @@ create_xcframework() {
123
123
# Create the new .xcframework.
124
124
xcodebuild -create-xcframework " ${libraries[@]} " -output " ${xcframework} "
125
125
126
- # Copy the .swiftmodule files into the .xcframework if applicable.
126
+ # Copy the .swiftinterface files into the .xcframework if applicable.
127
127
if [[ -n " $swift_module " ]]; then
128
- echo -e " \nCopying Swift module ${swift_module} .swiftmodule into ${xcframework} "
128
+ echo -e " \nCopying Swift interface ${swift_module} .swiftinterface into ${xcframework} "
129
129
for dir in " ${directories[@]} " ; do
130
130
local module_source_dir=" ${dir} /${swift_module} .swiftmodule"
131
131
if [ ! -d " $module_source_dir " ]; then
132
132
echo " Swiftmodule directory ${module_source_dir} does not exist"
133
133
exit 1
134
134
fi
135
- local swiftmodule_file
136
- swiftmodule_file=$( find " $module_source_dir " -maxdepth 1 -type f -name ' *.swiftmodule' | head -n1)
137
- if [[ -z " $swiftmodule_file " ]]; then
138
- echo " No .swiftmodule file found in ${module_source_dir} "
135
+ local swiftinterface_file
136
+ swiftinterface_file=$( find " $module_source_dir " -maxdepth 1 \
137
+ -type f -name ' *.swiftinterface' ! -name ' *.private.swiftinterface' | head -n1)
138
+ if [[ -z " $swiftinterface_file " ]]; then
139
+ echo " No public .swiftinterface file found in ${module_source_dir} "
139
140
exit 1
140
141
fi
141
- local base=$( basename " $swiftmodule_file " .swiftmodule )
142
+ local base=$( basename " $swiftinterface_file " .swiftinterface )
142
143
local arch=" ${base%% -* } "
143
144
local rest=" ${base#* -apple-} "
144
145
local platform_tag
@@ -156,9 +157,9 @@ create_xcframework() {
156
157
echo " Warning: slice '${slice_name} ' not found in ${xcframework} , skipping"
157
158
continue
158
159
fi
159
- echo " - Copying ${swift_module} .swiftmodule into slice ${slice_name} "
160
- cp " $swiftmodule_file " " ${slice_path} /${swift_module} .swiftmodule "
161
- ln -sf " ../${swift_module} .swiftmodule " " ${slice_path} /Headers/${swift_module} .swiftmodule "
160
+ echo " - Copying ${swift_module} .swiftinterface into slice ${slice_name} "
161
+ cp " $swiftinterface_file " " ${slice_path} /${swift_module} .swiftinterface "
162
+ ln -sf " ../${swift_module} .swiftinterface " " ${slice_path} /Headers/${swift_module} .swiftinterface "
162
163
done
163
164
fi
164
165
0 commit comments