Open dodikk opened 1 year ago
I had to add this to my MAUI app .csproj
<PropertyGroup Condition="$(TargetFramework.Contains('-ios'))">
<RuntimeIdentifier>ios-arm64</RuntimeIdentifier>
</PropertyGroup>
due to this error
Assets file project.assets.json doesnt have a target for "net7.0-ios/ios-arm64"
You may also need to include "ios-arm64" in your project's RuntimeIdentifiers
Combining the dynamic libs of the framework to a single binary with lipo create
seems like a flawed approach since both iPhone and Mac desktop might be using the same M1 chips in future (with slightly different API and different lib artefacts)
Also Themis.Maui.Droid
binding projects appear under the iOS platform dependencies despite the per-platform references
<ItemGroup>
<ProjectReference Include="..\..\..\lib-bindings\themis-maui\themis.maui\themis.maui.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'ios' ">
<ProjectReference Include="..\..\..\lib-bindings\themis-maui\Themis.Maui.iOS\Themis.Maui.iOS.csproj" />
<ProjectReference Include="..\..\..\lib-bindings\themis-maui\themis.ios.wrapper.maui\themis.ios.wrapper.maui.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetPlatformIdentifier)' == 'android' ">
<ProjectReference Include="..\..\..\lib-bindings\themis-maui\Themis.Maui.Droid\Themis.Maui.Droid.csproj" />
<ProjectReference Include="..\..\..\lib-bindings\themis-maui\themis.droid.wrapper.maui\themis.droid.wrapper.maui.csproj" />
</ItemGroup>
Combining the dynamic libs of the framework to a single binary with lipo create seems like a flawed approach since both iPhone and Mac desktop might be using the same M1 chips in future (with slightly different API and different lib artefacts)
Given this script and the themis.xcframework
the following lipo
error happens exactly as I have predicted.
lipo -create \
-output themis_fat.so \
./themis.xcframework/ios-arm64/themis.framework/themis \
./themis.xcframework/ios-arm64_x86_64-simulator/themis.framework/themis \
./themis.xcframework/macos-arm64_x86_64/themis.framework/Versions/A/themis
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: ./themis.xcframework/ios-arm64/themis.framework/themis and ./themis.xcframework/ios-arm64_x86_64-simulator/themis.framework/themis have the same architectures (arm64) and can't be in the same fat output file
Sample project to reproduce https://github.com/dodikk/themis-maui-prototype
Modern iOS libs ship as
*.xcframework
artefacts which are capable of targeting multiple platforms.I am attempting to bind the
cossacklabs/themis
lib built byCarthage
(also tried theirxcframework
creation scripts) https://github.com/cossacklabs/themisAnd my linker error is: