Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add .NET 6 Mobile support #377

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lottie.Android/Lottie.Android.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras">
<PropertyGroup>
<TargetFrameworks>monoandroid10.0</TargetFrameworks>
<TargetFrameworks>monoandroid10.0;net6.0-android</TargetFrameworks>
<AssemblyName>Lottie.Android</AssemblyName>
<RootNamespace>Lottie.Android</RootNamespace>
<Description>Render After Effects animations natively on Android, iOS, MacOS, TVOs and UWP</Description>
Expand Down
12 changes: 6 additions & 6 deletions Lottie.iOS/Lottie.iOS.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="MSBuild.Sdk.Extras">
<PropertyGroup>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">xamarin.ios10</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">xamarin.ios10;xamarin.mac20;xamarin.tvos10</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">xamarin.ios10;net6.0-ios</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">xamarin.ios10;xamarin.mac20;xamarin.tvos10;net6.0-ios;net6.0-macos;net6.0-tvos</TargetFrameworks>
<AssemblyName>Lottie.iOS</AssemblyName>
<RootNamespace>Lottie.iOS</RootNamespace>
<Description>Render After Effects animations natively on Android, iOS, MacOS, TVOs and UWP</Description>
Expand All @@ -23,28 +23,28 @@
<Compile Include="LOTAnimationView.cs" />
</ItemGroup>

<ItemGroup Condition=" $(TargetFramework.StartsWith('xamarin.ios')) ">
<ItemGroup Condition=" $(TargetFramework.StartsWith('xamarin.ios')) or $(TargetFramework.StartsWith('net6.0-ios')) ">
<ObjcBindingApiDefinition Include="ApiDefinitions.Ios.cs" />
<ObjcBindingNativeLibrary Include="libLottie-ios.a" />
<Compile Include="libLottie-ios.linkwith.cs">
<DependentUpon>libLottie-ios.a</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup Condition=" $(TargetFramework.StartsWith('xamarin.mac')) ">
<ItemGroup Condition=" $(TargetFramework.StartsWith('xamarin.mac')) or $(TargetFramework.StartsWith('net6.0-macos')) ">
<ObjcBindingApiDefinition Include="ApiDefinitions.Mac.cs" />
<ObjcBindingNativeLibrary Include="libLottie-macos.a" />
<Compile Include="libLottie-macos.linkwith.cs">
<DependentUpon>libLottie-macos.a</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup Condition=" $(TargetFramework.StartsWith('xamarin.tvos')) ">
<ItemGroup Condition=" $(TargetFramework.StartsWith('xamarin.tvos')) or $(TargetFramework.StartsWith('net6.0-tvos')) ">
<ObjcBindingApiDefinition Include="ApiDefinitions.Ios.cs" />
<ObjcBindingNativeLibrary Include="libLottie-tvos.a" />
<Compile Include="libLottie-tvos.linkwith.cs">
<DependentUpon>libLottie-tvos.a</DependentUpon>
</Compile>
</ItemGroup>

</Project>
7 changes: 3 additions & 4 deletions Lottie.sln
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29209.62
# Visual Studio Version 17
VisualStudioVersion = 17.2.32314.265
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lottie.Forms", "Lottie.Forms\Lottie.Forms.csproj", "{F03D2DD6-BBDA-45B9-982E-4DCA43FCB8E1}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lottie.Forms", "Lottie.Forms\Lottie.Forms.csproj", "{F03D2DD6-BBDA-45B9-982E-4DCA43FCB8E1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lottie.iOS", "Lottie.iOS\Lottie.iOS.csproj", "{8F0CC2B2-88E2-459B-AC92-F3A74071707E}"
EndProject
Expand Down Expand Up @@ -707,7 +707,6 @@ Global
{A7CECB0B-C674-462C-8E50-6A21BC41A62D}.Debug|x86.ActiveCfg = Debug|Any CPU
{A7CECB0B-C674-462C-8E50-6A21BC41A62D}.Debug|x86.Build.0 = Debug|Any CPU
{A7CECB0B-C674-462C-8E50-6A21BC41A62D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A7CECB0B-C674-462C-8E50-6A21BC41A62D}.Release|Any CPU.Build.0 = Release|Any CPU
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the release configuration was trying to build the Forms macOS project, while all other targets were removed. Is there are reason for it being the sample only project built?

{A7CECB0B-C674-462C-8E50-6A21BC41A62D}.Release|ARM.ActiveCfg = Release|Any CPU
{A7CECB0B-C674-462C-8E50-6A21BC41A62D}.Release|ARM.Build.0 = Release|Any CPU
{A7CECB0B-C674-462C-8E50-6A21BC41A62D}.Release|iPhone.ActiveCfg = Release|Any CPU
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# LottieXamarin
Lottie is a mobile library for Android and iOS that parses [Adobe After Effects](http://www.adobe.com/products/aftereffects.html) animations exported as json with [Bodymovin](https://github.com/bodymovin/bodymovin) and renders them natively on mobile!
Lottie is a mobile library for Android and iOS (Xamarin and .NET 6) that parses [Adobe After Effects](http://www.adobe.com/products/aftereffects.html) animations exported as json with [Bodymovin](https://github.com/bodymovin/bodymovin) and renders them natively on mobile!

# Support

Expand Down
10 changes: 9 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,16 @@
only:
- develop
version: 1.0.{build}
image: Visual Studio 2019
image: Visual Studio 2022
before_build:
- ps: |
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri "https://dot.net/v1/dotnet-install.ps1" -OutFile dotnet-install.ps1
& .\dotnet-install.ps1 -Version 6.0.300-preview.22154.4 -InstallDir "$env:ProgramFiles\dotnet\"
- ps: |
# Use uno-check to install an early .NET 6.0.300 rc1 build which does not require jumping through hoops: https://github.com/dotnet/maui/releases/tag/6.0.200-preview.14.2
dotnet tool update --global uno.check --version 1.1.1 --add-source https://api.nuget.org/v3/index.json
uno-check -v --ci --non-interactive --fix --skip xcode --skip gtk3 --skip vswin --skip vsmac --skip androidemulator --manifest https://raw.githubusercontent.com/unoplatform/uno.check/d14571a546b55f58e51e392c04cf098168d6fe2d/manifests/uno.ui-preview.manifest.json
- cmd: dotnet --info
- cmd: dotnet tool install --tool-path . SignClient
environment:
Expand Down
2 changes: 1 addition & 1 deletion build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ MSBuildSettings GetDefaultBuildSettings()
ToolPath = msBuildPath,
Verbosity = verbosity,
ArgumentCustomization = args => args.Append("/m"),
ToolVersion = MSBuildToolVersion.VS2019
ToolVersion = MSBuildToolVersion.VS2022
};

return settings;
Expand Down
3 changes: 3 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"msbuild-sdks": {
"MSBuild.Sdk.Extras": "3.0.44"
},
"sdk": {
"allowPrerelease": true
}
}
2 changes: 1 addition & 1 deletion tools/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Cake" version="0.34.1" />
<package id="Cake" version="1.3.0" />
</packages>