Skip to content

Commit 65d3e45

Browse files
committed
[.NET] Add .NET MAUI iOS and MacCatalyst native platforms support
1 parent 9b8d146 commit 65d3e45

File tree

74 files changed

+2176
-19
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+2176
-19
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,14 @@ StylusDrivers/externals/
1212
*.dll
1313
*.mdb
1414
*.framework
15+
*.xcframework
1516
tools/
1617
packages/
1718
.vs/
1819
nuget/pkgs/
20+
MAUI/cache/
21+
MAUI/nuget/pkgs/
22+
Directory.Build.props
1923

2024
# Xcode
2125
#
@@ -41,4 +45,3 @@ DerivedData/
4145
*.perspectivev3
4246
!default.perspectivev3
4347
*.xcuserstate
44-
*.xcframework

MAUI/.config/dotnet-tools.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"cake.tool": {
6+
"version": "3.0.0",
7+
"commands": [
8+
"dotnet-cake"
9+
]
10+
}
11+
}
12+
}

MAUI/Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Project>
2+
<PropertyGroup>
3+
<PSVersion>12.0.1</PSVersion>
4+
</PropertyGroup>
5+
</Project>
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<!-- <TargetFramework>net7.0-maccatalyst</TargetFramework> -->
4+
<TargetFrameworks>net6.0-maccatalyst;net7.0-maccatalyst</TargetFrameworks>
5+
<Nullable>enable</Nullable>
6+
<ImplicitUsings>true</ImplicitUsings>
7+
<IsBindingProject>true</IsBindingProject>
8+
<ProcessEnums>true</ProcessEnums>
9+
<NoBindingEmbedding>true</NoBindingEmbedding>
10+
<CompressBindingResourcePackage>true</CompressBindingResourcePackage>
11+
</PropertyGroup>
12+
13+
<PropertyGroup>
14+
<PackageId>PSPDFKit.MAUI.MacCatalyst.Instant</PackageId>
15+
<Title>PSPDFKit for MAUI MacCatalyst - Instant</Title>
16+
<Summary>With PSPDFKit Instant, it's easier than ever to add real-time collaboration, efficient synchronization, offline support, and data security to your apps. Instant is made especially for PSPDFKit, works extremely fast, and is available on all platforms.</Summary>
17+
<Description>The leading framework for displaying, annotating and editing PDFs on iOS, Android, Windows, Electron and the Web.</Description>
18+
<Authors>PSPDFKit GmbH</Authors>
19+
<Owners>PSPDFKit GmbH</Owners>
20+
<Copyright>PSPDFKit GmbH. Copyright 2010-2023</Copyright>
21+
<PackageIcon>icon.png</PackageIcon>
22+
<PackageProjectUrl>https://pspdfkit.com/instant/</PackageProjectUrl>
23+
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
24+
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
25+
<PackageTags>pdf, pdf document, pdf document view, pdf sdk, pdf annotation, edit pdf, display pdf, display pdf, xamarin, maui, ios</PackageTags>
26+
<PackageReleaseNotes>For changelog go to: https://pspdfkit.com/changelog/ios/</PackageReleaseNotes>
27+
<RepositoryUrl>https://github.com/PSPDFKit/Xamarin-iOS</RepositoryUrl>
28+
<PackageVersion>$(PSVersion)</PackageVersion>
29+
</PropertyGroup>
30+
<ItemGroup>
31+
<None Include="..\..\LICENSE.md" Pack="True" PackagePath="LICENSE.md" />
32+
<None Include="..\nuget\icon.png" Pack="True" PackagePath="icon.png" />
33+
<None Include="..\nuget\readme.txt" Pack="True" PackagePath="readme.txt" />
34+
</ItemGroup>
35+
36+
<ItemGroup>
37+
<ObjcBindingApiDefinition Include="..\PSPDFKit.MAUI.iOS.Instant\ApiDefinition.cs">
38+
<Link>ApiDefinition.cs</Link>
39+
</ObjcBindingApiDefinition>
40+
<ObjcBindingCoreSource Include="..\PSPDFKit.MAUI.iOS.Instant\Structs.cs">
41+
<Link>Structs.cs</Link>
42+
</ObjcBindingCoreSource>
43+
<Compile Include="..\PSPDFKit.MAUI.iOS.Instant\Metadata.cs">
44+
<Link>Metadata.cs</Link>
45+
</Compile>
46+
<NativeReference Include="..\PSPDFKit.MAUI.iOS.Instant\Instant.xcframework">
47+
<Kind>Framework</Kind>
48+
<SmartLink>true</SmartLink>
49+
</NativeReference>
50+
</ItemGroup>
51+
<ItemGroup>
52+
<ProjectReference Include="..\PSPDFKit.MAUI.MacCatalyst.Model\PSPDFKit.MAUI.MacCatalyst.Model.csproj" PrivateAssets="None" />
53+
<ProjectReference Include="..\PSPDFKit.MAUI.MacCatalyst.UI\PSPDFKit.MAUI.MacCatalyst.UI.csproj" PrivateAssets="None" />
54+
</ItemGroup>
55+
</Project>
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<!-- <TargetFramework>net7.0-maccatalyst</TargetFramework> -->
4+
<TargetFrameworks>net6.0-maccatalyst;net7.0-maccatalyst</TargetFrameworks>
5+
<Nullable>enable</Nullable>
6+
<ImplicitUsings>true</ImplicitUsings>
7+
<IsBindingProject>true</IsBindingProject>
8+
<ProcessEnums>true</ProcessEnums>
9+
<NoBindingEmbedding>true</NoBindingEmbedding>
10+
<CompressBindingResourcePackage>true</CompressBindingResourcePackage>
11+
</PropertyGroup>
12+
13+
<PropertyGroup>
14+
<PackageId>PSPDFKit.MAUI.MacCatalyst.Model</PackageId>
15+
<Title>PSPDFKit for MAUI MacCatalyst - Model</Title>
16+
<Summary>A high-performance viewer, extensive annotation and document editing tools, digital signatures, and more. All engineered for the best possible user and developer experience. PSPDFKit — the iOS PDF SDK made for you.</Summary>
17+
<Description>The leading framework for displaying, annotating and editing PDFs on iOS, Android, Windows, Electron and the Web.</Description>
18+
<Authors>PSPDFKit GmbH</Authors>
19+
<Owners>PSPDFKit GmbH</Owners>
20+
<Copyright>PSPDFKit GmbH. Copyright 2010-2023</Copyright>
21+
<PackageIcon>icon.png</PackageIcon>
22+
<PackageProjectUrl>https://pspdfkit.com/</PackageProjectUrl>
23+
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
24+
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
25+
<PackageTags>pdf, pdf document, pdf document view, pdf sdk, pdf annotation, edit pdf, display pdf, display pdf, xamarin, maui, ios</PackageTags>
26+
<PackageReleaseNotes>For changelog go to: https://pspdfkit.com/changelog/ios/</PackageReleaseNotes>
27+
<RepositoryUrl>https://github.com/PSPDFKit/Xamarin-iOS</RepositoryUrl>
28+
<PackageVersion>$(PSVersion)</PackageVersion>
29+
</PropertyGroup>
30+
<ItemGroup>
31+
<None Include="..\..\LICENSE.md" Pack="True" PackagePath="LICENSE.md" />
32+
<None Include="..\nuget\icon.png" Pack="True" PackagePath="icon.png" />
33+
<None Include="..\nuget\readme.txt" Pack="True" PackagePath="readme.txt" />
34+
<None Include="..\cache\ios\PSPDFKit.xcframework\ACKNOWLEDGEMENTS.md" Pack="True" PackagePath="ACKNOWLEDGEMENTS.md" />
35+
</ItemGroup>
36+
37+
<ItemGroup>
38+
<ObjcBindingApiDefinition Include="..\PSPDFKit.MAUI.iOS.Model\ApiDefinition.cs">
39+
<Link>ApiDefinition.cs</Link>
40+
</ObjcBindingApiDefinition>
41+
<ObjcBindingApiDefinition Include="..\PSPDFKit.MAUI.iOS.Model\Enums.cs">
42+
<Link>Enums.cs</Link>
43+
</ObjcBindingApiDefinition>
44+
<ObjcBindingCoreSource Include="..\PSPDFKit.MAUI.iOS.Model\LibraryConstant.cs">
45+
<Link>LibraryConstant.cs</Link>
46+
</ObjcBindingCoreSource>
47+
<ObjcBindingCoreSource Include="..\PSPDFKit.MAUI.iOS.Model\Structs.cs">
48+
<Link>Structs.cs</Link>
49+
</ObjcBindingCoreSource>
50+
<Compile Include="..\PSPDFKit.MAUI.iOS.Model\ApiEnhancements.cs">
51+
<Link>ApiEnhancements.cs</Link>
52+
</Compile>
53+
<Compile Include="..\PSPDFKit.MAUI.iOS.Model\Metadata.cs">
54+
<Link>Metadata.cs</Link>
55+
</Compile>
56+
<NativeReference Include="..\PSPDFKit.MAUI.iOS.Model\PSPDFKit.xcframework">
57+
<Kind>Framework</Kind>
58+
<SmartLink>true</SmartLink>
59+
</NativeReference>
60+
</ItemGroup>
61+
</Project>
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<!-- <TargetFramework>net7.0-maccatalyst</TargetFramework> -->
4+
<TargetFrameworks>net6.0-maccatalyst;net7.0-maccatalyst</TargetFrameworks>
5+
<Nullable>enable</Nullable>
6+
<ImplicitUsings>true</ImplicitUsings>
7+
<IsBindingProject>true</IsBindingProject>
8+
<ProcessEnums>true</ProcessEnums>
9+
<NoBindingEmbedding>true</NoBindingEmbedding>
10+
<CompressBindingResourcePackage>true</CompressBindingResourcePackage>
11+
</PropertyGroup>
12+
13+
<PropertyGroup>
14+
<PackageId>PSPDFKit.MAUI.MacCatalyst.UI</PackageId>
15+
<Title>PSPDFKit for MAUI MacCatalyst - UI</Title>
16+
<Summary>A high-performance viewer, extensive annotation and document editing tools, digital signatures, and more. All engineered for the best possible user and developer experience. PSPDFKit — the iOS PDF SDK made for you.</Summary>
17+
<Description>The leading framework for displaying, annotating and editing PDFs on iOS, Android, Windows, Electron and the Web.</Description>
18+
<Authors>PSPDFKit GmbH</Authors>
19+
<Owners>PSPDFKit GmbH</Owners>
20+
<Copyright>PSPDFKit GmbH. Copyright 2010-2023</Copyright>
21+
<PackageIcon>icon.png</PackageIcon>
22+
<PackageProjectUrl>https://pspdfkit.com/</PackageProjectUrl>
23+
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
24+
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
25+
<PackageTags>pdf, pdf document, pdf document view, pdf sdk, pdf annotation, edit pdf, display pdf, display pdf, xamarin, maui, ios</PackageTags>
26+
<PackageReleaseNotes>For changelog go to: https://pspdfkit.com/changelog/ios/</PackageReleaseNotes>
27+
<RepositoryUrl>https://github.com/PSPDFKit/Xamarin-iOS</RepositoryUrl>
28+
<PackageVersion>$(PSVersion)</PackageVersion>
29+
</PropertyGroup>
30+
<ItemGroup>
31+
<None Include="..\..\LICENSE.md" Pack="true" PackagePath="LICENSE.md" />
32+
<None Include="..\nuget\icon.png" Pack="true" PackagePath="icon.png" />
33+
<None Include="..\nuget\readme.txt" Pack="true" PackagePath="readme.txt" />
34+
<None Include="..\cache\ios\PSPDFKitUI.xcframework\ACKNOWLEDGEMENTS.md" Pack="true" PackagePath="ACKNOWLEDGEMENTS.md" />
35+
</ItemGroup>
36+
37+
<ItemGroup>
38+
<ObjcBindingApiDefinition Include="..\PSPDFKit.MAUI.iOS.UI\ApiDefinition.cs">
39+
<Link>ApiDefinition.cs</Link>
40+
</ObjcBindingApiDefinition>
41+
<ObjcBindingApiDefinition Include="..\PSPDFKit.MAUI.iOS.UI\Enums.cs">
42+
<Link>Enums.cs</Link>
43+
</ObjcBindingApiDefinition>
44+
<Compile Include="..\PSPDFKit.MAUI.iOS.UI\ApiEnhancements.cs">
45+
<Link>ApiEnhancements.cs</Link>
46+
</Compile>
47+
<Compile Include="..\PSPDFKit.MAUI.iOS.UI\Metadata.cs">
48+
<Link>Metadata.cs</Link>
49+
</Compile>
50+
<Compile Include="..\PSPDFKit.MAUI.iOS.UI\Helpers\PSPDFActivityType.cs">
51+
<Link>Helpers\PSPDFActivityType.cs</Link>
52+
</Compile>
53+
<NativeReference Include="..\PSPDFKit.MAUI.iOS.UI\PSPDFKitUI.xcframework">
54+
<Kind>Framework</Kind>
55+
<SmartLink>true</SmartLink>
56+
</NativeReference>
57+
</ItemGroup>
58+
<ItemGroup>
59+
<Folder Include="..\PSPDFKit.MAUI.iOS.UI\Helpers">
60+
</Folder>
61+
</ItemGroup>
62+
<ItemGroup>
63+
<ProjectReference Include="..\PSPDFKit.MAUI.MacCatalyst.Model\PSPDFKit.MAUI.MacCatalyst.Model.csproj" PrivateAssets="None" />
64+
</ItemGroup>
65+
</Project>

PSPDFKit.iOS.Instant/ApiDefinition.cs renamed to MAUI/PSPDFKit.MAUI.iOS.Instant/ApiDefinition.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,11 @@ interface PSPDFInstantClient {
190190

191191
interface IPSPDFInstantClientDelegate { }
192192

193+
#if NET
194+
[Protocol, Model]
195+
#else
193196
[Protocol, Model (AutoGeneratedName = true)]
197+
#endif
194198
[BaseType (typeof (NSObject))]
195199
interface PSPDFInstantClientDelegate {
196200

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
using System;
2+
using System.Reflection;
3+
4+
[assembly: AssemblyMetadata ("IsTrimmable", "True")]
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<!-- <TargetFramework>net7.0-ios</TargetFramework> -->
4+
<TargetFrameworks>net6.0-ios;net7.0-ios</TargetFrameworks>
5+
<Nullable>enable</Nullable>
6+
<ImplicitUsings>true</ImplicitUsings>
7+
<IsBindingProject>true</IsBindingProject>
8+
<ProcessEnums>true</ProcessEnums>
9+
<NoBindingEmbedding>true</NoBindingEmbedding>
10+
<CompressBindingResourcePackage>true</CompressBindingResourcePackage>
11+
</PropertyGroup>
12+
13+
<PropertyGroup>
14+
<PackageId>PSPDFKit.MAUI.iOS.Instant</PackageId>
15+
<Title>PSPDFKit for MAUI iOS - Instant</Title>
16+
<Summary>With PSPDFKit Instant, it's easier than ever to add real-time collaboration, efficient synchronization, offline support, and data security to your apps. Instant is made especially for PSPDFKit, works extremely fast, and is available on all platforms.</Summary>
17+
<Description>The leading framework for displaying, annotating and editing PDFs on iOS, Android, Windows, Electron and the Web.</Description>
18+
<Authors>PSPDFKit GmbH</Authors>
19+
<Owners>PSPDFKit GmbH</Owners>
20+
<Copyright>PSPDFKit GmbH. Copyright 2010-2023</Copyright>
21+
<PackageIcon>icon.png</PackageIcon>
22+
<PackageProjectUrl>https://pspdfkit.com/instant/</PackageProjectUrl>
23+
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
24+
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
25+
<PackageTags>pdf, pdf document, pdf document view, pdf sdk, pdf annotation, edit pdf, display pdf, display pdf, xamarin, maui, ios</PackageTags>
26+
<PackageReleaseNotes>For changelog go to: https://pspdfkit.com/changelog/ios/</PackageReleaseNotes>
27+
<RepositoryUrl>https://github.com/PSPDFKit/Xamarin-iOS</RepositoryUrl>
28+
<PackageVersion>$(PSVersion)</PackageVersion>
29+
</PropertyGroup>
30+
<ItemGroup>
31+
<None Include="..\..\LICENSE.md" Pack="true" PackagePath="LICENSE.md" />
32+
<None Include="..\nuget\icon.png" Pack="true" PackagePath="icon.png" />
33+
<None Include="..\nuget\readme.txt" Pack="true" PackagePath="readme.txt" />
34+
</ItemGroup>
35+
36+
<ItemGroup>
37+
<ObjcBindingApiDefinition Include="ApiDefinition.cs" />
38+
<ObjcBindingCoreSource Include="Structs.cs" />
39+
<NativeReference Include="Instant.xcframework">
40+
<Kind>Framework</Kind>
41+
<SmartLink>true</SmartLink>
42+
</NativeReference>
43+
</ItemGroup>
44+
<ItemGroup>
45+
<ProjectReference Include="..\PSPDFKit.MAUI.iOS.Model\PSPDFKit.MAUI.iOS.Model.csproj" PrivateAssets="None" />
46+
<ProjectReference Include="..\PSPDFKit.MAUI.iOS.UI\PSPDFKit.MAUI.iOS.UI.csproj" PrivateAssets="None" />
47+
</ItemGroup>
48+
</Project>

0 commit comments

Comments
 (0)