diff --git a/Icomoon.xcodeproj/project.pbxproj b/Icomoon.xcodeproj/project.pbxproj
index 2e3899e..61259bb 100644
--- a/Icomoon.xcodeproj/project.pbxproj
+++ b/Icomoon.xcodeproj/project.pbxproj
@@ -273,13 +273,14 @@
8FFB56341C2D7BFB00D2BE62 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CLANG_ENABLE_MODULES = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
- ENABLE_BITCODE = NO;
+ ENABLE_BITCODE = YES;
INFOPLIST_FILE = Icomoon/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
@@ -297,13 +298,14 @@
8FFB56351C2D7BFB00D2BE62 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CLANG_ENABLE_MODULES = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
- ENABLE_BITCODE = NO;
+ ENABLE_BITCODE = YES;
INFOPLIST_FILE = Icomoon/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
diff --git a/Icomoon.xcworkspace/contents.xcworkspacedata b/Icomoon.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..37f010b
--- /dev/null
+++ b/Icomoon.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/Icomoon.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Icomoon.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/Icomoon.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/Icomoon.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Icomoon.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f9b0d7c
--- /dev/null
+++ b/Icomoon.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/run.sh b/run.sh
index b156248..98d4710 100755
--- a/run.sh
+++ b/run.sh
@@ -15,11 +15,11 @@ set -e
LIB_DIR="/usr/local/lib/icomoon-swift"
BUILD_DIR="/tmp/icomoon-build"
FRAMEWORK_NAME="Icomoon"
-SIMULATOR_LIBRARY_PATH="${BUILD_DIR}/iphonesimulator/${FRAMEWORK_NAME}.framework"
-DEVICE_LIBRARY_PATH="${BUILD_DIR}/iphoneos/${FRAMEWORK_NAME}.framework"
-UNIVERSAL_LIBRARY_DIR="${BUILD_DIR}/iphoneuniversal"
-FRAMEWORK="${UNIVERSAL_LIBRARY_DIR}/${FRAMEWORK_NAME}.framework"
-RESULT_FRAMEWORK="$(pwd)/${FRAMEWORK_NAME}.framework"
+SIMULATOR_ARCHIVE="$BUILD_DIR/$FRAMEWORK_NAME.framework-iphoneos.xcarchive"
+DEVICE_ARCHIVE="$BUILD_DIR/$FRAMEWORK_NAME.framework-iphonesimulator.xcarchive"
+CATALYST_ARCHIVE="$BUILD_DIR/$FRAMEWORK_NAME.framework-catalyst.xcarchive"
+MAIN_DIR="$(pwd)"
+RESULT_FRAMEWORK="$(pwd)/${FRAMEWORK_NAME}.xcframework"
######################
@@ -30,8 +30,6 @@ rm -rf "${RESULT_FRAMEWORK}"
rm -rf "${BUILD_DIR}"
mkdir -p "${BUILD_DIR}"
-mkdir "${UNIVERSAL_LIBRARY_DIR}"
-mkdir "${FRAMEWORK}"
cp -r "${LIB_DIR}/." "${BUILD_DIR}"
@@ -60,30 +58,28 @@ cp "$TTF_FONT" "${FRAMEWORK_NAME}/font.ttf"
# Build Frameworks
######################
-xcodebuild -sdk iphonesimulator -configuration "Release" clean build CONFIGURATION_BUILD_DIR=${BUILD_DIR}/iphonesimulator ENABLE_BITCODE=YES
+# Device slice.
+xcodebuild archive -workspace "$FRAMEWORK_NAME.xcworkspace" -scheme "$FRAMEWORK_NAME" -configuration Release -destination 'generic/platform=iOS' -archivePath "$SIMULATOR_ARCHIVE" SKIP_INSTALL=NO
-xcodebuild -sdk iphoneos -configuration "Release" clean build CONFIGURATION_BUILD_DIR=${BUILD_DIR}/iphoneos ENABLE_BITCODE=YES
+# Simulator slice.
+xcodebuild archive -workspace "$FRAMEWORK_NAME.xcworkspace" -scheme "$FRAMEWORK_NAME" -configuration Release -destination 'generic/platform=iOS Simulator' -archivePath "$DEVICE_ARCHIVE" SKIP_INSTALL=NO
+
+# Mac Catalyst slice.
+xcodebuild archive -workspace "$FRAMEWORK_NAME.xcworkspace" -scheme "$FRAMEWORK_NAME" -configuration Release -destination 'platform=macOS,arch=x86_64,variant=Mac Catalyst' -archivePath "$CATALYST_ARCHIVE" SKIP_INSTALL=NO
######################
# Copy files Framework
#####################
-cp -r "${DEVICE_LIBRARY_PATH}/." "${FRAMEWORK}"
-cp -r "${SIMULATOR_LIBRARY_PATH}/Modules/${FRAMEWORK_NAME}.swiftmodule/." "${FRAMEWORK}/Modules/${FRAMEWORK_NAME}.swiftmodule"
-
-
-######################
-# Make fat universal binary
-######################
-
-lipo "${SIMULATOR_LIBRARY_PATH}/${FRAMEWORK_NAME}" "${DEVICE_LIBRARY_PATH}/${FRAMEWORK_NAME}" -create -output "${FRAMEWORK}/${FRAMEWORK_NAME}"
+#cp -r "${DEVICE_LIBRARY_PATH}/." "${FRAMEWORK}"
+#cp -r "${SIMULATOR_LIBRARY_PATH}/Modules/${FRAMEWORK_NAME}.swiftmodule/." "${FRAMEWORK}/Modules/${FRAMEWORK_NAME}.swiftmodule"
######################
-# Copy the result to current dir and open in finder
+# Make XCFramework
######################
-cp -r "${FRAMEWORK}" "${RESULT_FRAMEWORK}"
+xcodebuild -create-xcframework -framework "$SIMULATOR_ARCHIVE/Products/Library/Frameworks/$FRAMEWORK_NAME.framework" -framework "$DEVICE_ARCHIVE/Products/Library/Frameworks/$FRAMEWORK_NAME.framework" -framework "$CATALYST_ARCHIVE/Products/Library/Frameworks/$FRAMEWORK_NAME.framework" -output "$RESULT_FRAMEWORK"
-open "${RESULT_FRAMEWORK}"
+open "$MAIN_DIR"