公式ページに「we were able to use macOS as a development platform with Xcode as IDE, and then use the agility of CMake to build the same code on Windows.」 とありますので、Xcodeと互換性をもち、cmake をつかってWindows上でもつかえるとのことなので、何か設定があるのでありましょう。
使いにくく品質の不安定な MAC / Xcode / Swift を避け、安定したWindow / Visual Stduio (Xamarin もしくは MAUI) で開発できれば効率向上します。appleの基本APIクラスライブラリは、Xamarinソリューション下の project名_iOS の中で、C#インターフェイスで呼び出せるようになっています。(apple一辺倒の方はこれをあまり知らないようです)
しかし、Swiftサードパーティライブラリ はこれに含まれていません。これを解決する方法は Microsoftサイト 「iOS Swift ライブラリのバインド」 で説明されています。これを試してみました。結論としては、調査時間制限もあり上手くいきませんでした。どこまで何を確認したかの記録、ぜひ試したい方へのヒントになればと思います。海外含め「iOS Swift ライブラリのバインド」は情報がほとんどないのが実情でした。
(8) MAC で、xodebuild コマンドを使ってビルドします。iOSシュミレータと実機用をビルドしxcframeworkに統合します。弊方は以下shスクリプトにまとめました。
#!/bin/sh
TARGET_IOS=16.2
TARGET_PRJ=プロジェクト名
xcodebuild -project $TARGET_PRJ.xcodeproj archive \
-scheme $TARGET_PRJ \
-configuration Release \
-archivePath "build/$TARGET_PRJ-simulator.xcarchive" \
-destination "generic/platform=iOS Simulator" \
-derivedDataPath "build" \
-IDECustomBuildProductsPath="" -IDECustomBuildIntermediatesPath="" \
ENABLE_BITCODE=NO \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
if [ $? -ne 0 ]; then
echo "######## S T A G E 1 E R R O R ! ! ! ########"
exit
fi
xcodebuild -project $TARGET_PRJ.xcodeproj archive \
-scheme $TARGET_PRJ \
-configuration Release \
-archivePath "build/$TARGET_PRJ-ios.xcarchive" \
-destination "generic/platform=iOS" \
-derivedDataPath "build" \
-IDECustomBuildProductsPath="" -IDECustomBuildIntermediatesPath="" \
ENABLE_BITCODE=NO \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
if [ $? -ne 0 ]; then
echo "######## S T A G E 2 E R R O R ! ! ! ########"
exit
fi
xcodebuild -create-xcframework \
-framework build/$TARGET_PRJ-simulator.xcarchive/Products/Library/Frameworks/$TARGET_PRJ.framework \
-framework build/$TARGET_PRJ-ios.xcarchive/Products/Library/Frameworks/$TARGET_PRJ.framework \
-output build/$TARGET_PRJ.xcframework
if [ $? -ne 0 ]; then
echo "######## S T A G E 3 E R R O R ! ! ! ########"
extt
fi