Is there still no solution or workaround for targe...
# multiplatform
e
Is there still no solution or workaround for targeting mac catalyst - https://youtrack.jetbrains.com/issue/KT-40442
đź‘€ 1
@sergey.bogolepov from the issue on youtrack, the issue is that LLVM needs to be updated to a newer version that supports catalyst? An iOS engineer on my team found that with Kotlin 1.7.10 after building the XCFramework he could make it (at least appear to) work for catalyst by doing:
Copy code
cd my-lib/build/XCFrameworks/debug/MyLib.xcframework/macos-arm64/MyLib.framework/Versions/A
codesign --remove-signature MyLib
xcrun vtool -set-build-version 6 14.0 16.1 -tool 3 820.1 -replace -output MyLib MyLib
codesign -s <IDENTITY FOR SIGNING> MyLib
And updating the
Info,plist
to change:
Copy code
<key>SupportedPlatform</key>
			<string>macos</string>
to
Copy code
<key>SupportedPlatform</key>
			<string>ios</string>
			<key>SupportedPlatformVariant</key>
			<string>maccatalyst</string>
I don't know much about the apple toolchain so I don't know what's going on with that, but is this something that could be used until KN supports a newer version of LLVM?
t
I would love to have this as an official option in the gradle files...
s
from the issue on youtrack, the issue is that LLVM needs to be updated to a newer version that supports catalyst?
That’s the blocker, yes.
I don’t know much about the apple toolchain so I don’t know what’s going on with that, but is this something that could be used until KN supports a newer version of LLVM?
If it works for your project, great! Please note that it probably won’t work if your framework uses API that is not available in Catalyst.