{"id":26086896,"url":"https://github.com/pspdfkit/xamarin-ios","last_synced_at":"2025-06-11T16:05:28.304Z","repository":{"id":22535217,"uuid":"25875950","full_name":"PSPDFKit/Xamarin-iOS","owner":"PSPDFKit","description":"PSPDFKit for iOS wrapper for the Xamarin platform.","archived":false,"fork":false,"pushed_at":"2024-11-01T11:15:50.000Z","size":183119,"stargazers_count":14,"open_issues_count":0,"forks_count":11,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-04-12T03:35:17.661Z","etag":null,"topics":["bindings","dll","ios","pdf","pspdfkit","sdk","wrapper","xamarin"],"latest_commit_sha":null,"homepage":"https://pspdfkit.com/guides/ios/current/other-languages/xamarin/","language":"C#","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PSPDFKit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-10-28T15:24:20.000Z","updated_at":"2024-11-01T11:15:49.000Z","dependencies_parsed_at":"2025-03-09T07:33:01.659Z","dependency_job_id":null,"html_url":"https://github.com/PSPDFKit/Xamarin-iOS","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/PSPDFKit/Xamarin-iOS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PSPDFKit%2FXamarin-iOS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PSPDFKit%2FXamarin-iOS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PSPDFKit%2FXamarin-iOS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PSPDFKit%2FXamarin-iOS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PSPDFKit","download_url":"https://codeload.github.com/PSPDFKit/Xamarin-iOS/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PSPDFKit%2FXamarin-iOS/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259293097,"owners_count":22835539,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bindings","dll","ios","pdf","pspdfkit","sdk","wrapper","xamarin"],"created_at":"2025-03-09T07:18:49.516Z","updated_at":"2025-06-11T16:05:28.249Z","avatar_url":"https://github.com/PSPDFKit.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"Xamarin PSPDFKit for iOS and Mac Bindings\n=========================================\n\n- Xamarin.iOS Bindings for PSPDFKit 13.3.3 for iOS\n- Xamarin.Mac Bindings for PSPDFKit 5.1.0 for macOS\n\n\u003e [!NOTE]\n\u003e Nutrient Xamarin SDK (formerly PSPDFKit Xamarin for iOS and PSPDFKit Xamarin for Android) is being sunset and replaced by \u003ca href='https://www.nutrient.io/guides/ios/dotnet/'\u003eNutrient .NET for iOS\u003c/a\u003e and \u003ca href='https://www.nutrient.io/guides/android/dotnet/'\u003eNutrient .NET for Android\u003c/a\u003e. All Nutrient Xamarin licenses will remain valid and fully supported until 1 December 2025, or until your license expires, whichever occurs later. Interested in transitioning to another Nutrient product? \u003ca href='https://www.nutrient.io/company/contact'\u003eContact us\u003c/a\u003e and we’ll be happy to help.\u003c/blockquote\u003e\n\n\n#### PSPDFKit\n\nThe [PSPDFKit SDK](https://pspdfkit.com/) is a framework that allows you to view, annotate, sign, and fill PDF forms on iOS, Android, Windows, macOS, and Web.\n\n[PSPDFKit Instant](https://pspdfkit.com/instant) adds real-time collaboration features to seamlessly share, edit, and annotate PDF documents.\n\n#### Related\n\n- Xamarin.Android Bindings for PSPDFKit for Android: [PSPDFKit/Xamarin-Android](https://github.com/PSPDFKit/Xamarin-Android)\n- Xamarin Bindings for PSPDFKit for Windows UWP: [PSPDFKit/Xamarin-UWP](https://github.com/PSPDFKit/Xamarin-UWP)\n\n## Support, Issues and License Questions\n\nPSPDFKit offers support for customers with an active SDK license via https://pspdfkit.com/support/request/\n\nAre you evaluating our SDK? That's great, we're happy to help out!\nTo make sure this is fast, please use a work email and have someone from your company fill out our sales form: https://pspdfkit.com/sales/\n\nMinimum Build Requirements\n==========================\n\nIn order to **build** this binding project you need:\n\n- **Visual Studio for Mac**\n- [Xamarin.iOS 16.2.0.5](https://download.visualstudio.microsoft.com/download/pr/5f9ea8f6-0afe-46b3-b8e8-5dee4c2dd14c/b357a2b833ba86598aaff58fc013f06c/xamarin.ios-16.2.0.5.pkg)\n- [Xamarin.Mac 9.1.0.5](https://download.visualstudio.microsoft.com/download/pr/5f9ea8f6-0afe-46b3-b8e8-5dee4c2dd14c/c5c4f99a992a8cc51b2bad3d31ef6b96/xamarin.mac-9.1.0.5.pkg)\n- [Xcode 14.2](https://download.developer.apple.com/Developer_Tools/Xcode_14.2/Xcode_14.2.xip)\n\nThese above exact requirements are only needed to build this binding project,\nif you are using the already built packages from nuget in your project you can\nuse the latest Stable version of Xamarin.\n\nBuild Instructions\n==================\n\n## Step 1 - Get the bindings\n\n1. Clone this repository to your computer.\n2. Open the `Xamarin-iOS` directory.\n\n## Step 2 - Integrating PSPDFKit\n\nThere's 2 ways for integrating PSPDFKit into your project. We highly recommend using our nuget packages from nuget.org in Visual Studio as it requires less work for the customer and also eliminates the possibility of build errors, which can happen from time to time.\n\n### Integrating PSPDFKit via Nuget (Recommended)\n\n1. Right-Click on your project in Visual Studio and select \"Manage Nuget Packages…\"\n2. In the `Browse` section for \"nuget.org\" search for \"PSPDFKit\"\n\u003cimg width=\"500\" src=\"https://user-images.githubusercontent.com/21023299/75026406-38564d00-549d-11ea-8229-34f91362f3d7.png\"\u003e\n\n3. Select the 3 iOS packages, `PSPDFKit.iOS.Model`, `PSPDFKit.iOS.UI`*, and `PSPDFKit.iOS.Instant`*\n4. Tap on \"Add Packages\" to add the nuget packages to your project.\n\n`*` Items with an asterisk are *optional*, you only need to add those if you also want to use the components.\n\nNow you are done and can skip to [step 3](https://github.com/PSPDFKit/Xamarin-iOS#step-3---using-pspdfkit-in-your-project)!\n\n### Integrating PSPDFKit by adding the DLLs (Advanced) \n#### Downloading required files\n\nIn order to use this C# binding because Xamarin does not support `xcframework` yet, you can only build the binding project on macOS, you will need to obtain the full PSPDFKit framework files by doing either `./build.sh` and let the build script download the frameworks and build the bindings or by `./build.sh --target DownloadDeps` which will only download the required frameworks.\n\n### Get your dlls\n\n### Using command line / terminal\n\nWe are using [Cake](https://cakebuild.net) as our build system, this allows us to build on both Windows and macOS from a single script.\n\n1. Run `./build.sh` (macOS) command from the root directory in terminal.\n2. All the resulting dlls will be inside the root folder.\n3. Go to **Step 3 - Using PSPDFKit in your project**.\n\n### Using Visual Studio for Mac \n\n1. Run `./build.sh --target DownloadDeps` (macOS) command from the root directory in terminal.\n2. Open `PSPDFKit.sln` located in the root folder.\n2. Build the binding projects inside the `iOS` or `Mac` solution folders.\n3. Get the dlls from the `bin` folder of each project.\n4. Go to **Step 3 - Using PSPDFKit in your project**.\n\n#### Advanced build\n\nWe use the `Default` build task which builds all binding projects as long as the frameworks are present inside each directory (see **Copy required files**), if an optional framework is not present this Task will just skip.\n\nIn the case you just want the Mac bits to be built you can do `./build.sh --target mac`. Here are the most common tasks available in the build script, they are particularly useful when you are integrating this into a CI Server.\n\n|              | General Tasks                 |\n|:------------:|-------------------------------|\n|     **Task** | **Description**               |\n|      Default | Builds all PSPDFKit dlls.     |\n|          ios | Builds iOS PSPDFKit dlls.     |\n|          mac | Builds macOS PSPDFKit dlls.   |\n|        Clean | Cleans the build.             |\n| DownloadDeps | Downloads build dependencies. |\n\nTo list all available tasks you can do `./build.sh --showdescription`.\n\n## Step 3 - Using PSPDFKit in your project\n\nIf you don't use nuget, add the generated PSPDFKit dlls as a reference to into your own Xamarin project and add the corresponding using statements depending on the dlls referenced into your project.\n\n```csharp\nusing PSPDFKit.Model;\nusing PSPDFKit.UI;\nusing PSPDFKit.Instant;\n```\n\nAlso you do need to set your **license key** early on in your `AppDelegate`, before accessing any other PSPDFKit classes. You can get your license key from your [customer portal](https://customers.pspdfkit.com/) if you haven't done so already. Pass `null` to use the trial version.\n\n```csharp\npublic override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions)\n{\n\tPSPDFKitGlobal.SetLicenseKey (null, null);\n\t// ...\n}\n```\n\n# PSPDFKit Instant\n\nSupport for Instant was added with the Xamarin.iOS Bindings for PSPDFKit 7.2.0 for iOS.\n\nWith PSPDFKit Instant, it’s easier than ever to add real-time collaboration features to your PSPDFKit-powered app, allowing your users to seamlessly share, edit, and annotate PDF documents across iOS, Android, and web. With just a few lines of code, PSPDFKit Instant gives your users a massive productivity boost.\n\nFor more information about Instant, please have a look at our [website](https://pspdfkit.com/instant/).\n\n# Examples\n\nYou can find several sample projects in the `Examples` folder, including a catalog, Xamarin.Forms, and macOS example.\n\n## How to Run the Example Projects\n\n1. Complete **[Step 2 (Advaned)](https://github.com/PSPDFKit/Xamarin-iOS#integrating-pspdfkit-by-adding-the-dlls-advanced)**.\n2. Open the `PSPDFKit.sln` solution in Visual Studio.\n3. Select the example project and device you want to run it on (alternatively you can also right-click on the project and select \"Build `Project Name`\").\n\u003cimg width=\"60%\" src=\"Images/Project-setup.png\"/\u003e\n4. Tap on the triangle on the left to run the project.\n\n### PSPDFKit Instant Example\n\nThis example is included in the PSPDFCatalog example, but you can also find the code [here][Instant Example].\n\nThe PSPDFKit Instant example shows how easy and efficient Instant works. Just go the [Instant demo page](https://pspdfkit.com/instant/demo/) and tap on `Instant on iOS`, this will show a code at step three, which you have to enter in the example on your device. Afterwards you'll be connected to the server and you can start testing!\n\n\u003cdiv id=\"image-table\"\u003e\n     \u003ctable\u003e\n  \t    \u003ctr\u003e\n      \t    \u003ctd\u003e\n             \u003cimg width=\"80%\" src=\"Images/Instant-device.PNG\"/\u003e\n           \u003c/td\u003e\n           \u003ctd\u003e\n             \u003cimg width=\"80%\" src=\"Images/Instant-desktop.PNG\"/\u003e\n           \u003c/td\u003e\n       \u003c/tr\u003e\n    \u003c/table\u003e\n\u003c/div\u003e\n\n### PSPDFKit Catalog\n\nThe `PSPDFKit Catalog` project includes various examples for pretty much every use-case and will help you to build your own app with PSPDFKit.\n\n\u003cimg width=\"80%\" src=\"Images/Catalog.png\"/\u003e\n\n### Xamarin.Forms\n\nThe `XFSample.iOS` project is an example showcasing how to build an app with PSPDFKit using Xamarin.Forms.\n\u003cimg width=\"80%\" src=\"Images/XForms.png\"/\u003e\n\n### MacPDFViewer\n\n`MacPDFViewer` is an easy example on how build a PDF viewer on Mac.\n\n\u003cimg width=\"80%\" src=\"Images/macOS.png\"/\u003e\n\n# Troubleshooting\n\n## Swift Runtime Support\n\nApple started shipping the Swift Runtime with iOS 12.2. To deploy apps using Swift (which includes PSPDFKit) on iOS 12.1 and 12.0, the Swift Runtime needs to be added manually via adding the `Xamarin.iOS.SwiftRuntimeSupport` NuGet dependency: https://www.nuget.org/packages/Xamarin.iOS.SwiftRuntimeSupport\n\nHowever, only doing this will then get your app rejected by the App Store due to the following error:\n\n```\nITMS-90426: Invalid Swift Support - The SwiftSupport folder is missing. Rebuild your app using the current public (GM) version of Xcode and resubmit it.\n```\n\nThis is due to the fact that Xamarin does not officially support wrapping Swift libraries, so when creating the archives Visual Studio will not create the necesseray `SwiftSupport` folder there. To fix this there is a workaround available.\n\nSince Xcode properly supports wrapping Swift libraries, we can just submit it from here and let Xcode do the work of creating the archives properly.\n\n1. In Visual Studio Form Mac -\u003e Build -\u003e Archive for publishing\n2. The archive window will show up in Visual Studio for Mac\n3. Open Xcode and in there open the Organizer\n4. The Xamarin App archive will show up there\n5. Continue the upload steps in Xcode\n\nThis is only an issue if you must support iOS \u003c 12.2.\n\n## Generating a Stack Trace\n\nIf you experience a crash on your end it's very valuable for us to have as much information as possible to provide you with the best support experience.\nSuch valuable information includes a stack trace of the crash. Here's a quick step-by-step guide, showing how to generate a stack trace in Visual Studio 2019:\n\n#### Device (Recommended)\n\n1. In the Terminal app enter the following command: `touch ~/.mtouch-launch-with-lldb`. This will essentially let you use lldb to debug your application when it launches.\n2. Launch your app in debug mode in Visual Studio for Mac.\n3. Open the Application Output window in Visual Studio. It will ask you to execute another command in the Terminal.\n4. Once lldb is set up in the terminal window, you can simply use it like you would in Xcode.\n5. To get a stack trace you need to type `bt all`.\n\nIf you want to remove lldb from your debug setup again you can simply run `rm ~/.mtouch-launch-with-lldb` in your Terminal.\n\n\n#### Simulator\n\n1. Launch your app in debug mode in Visual Studio for Mac.\n2. Open your Activity Monitor app.\n3. In the Activity Monitor app search for your app name in the search bar. To give an example, if I want to attach to our PSPDFCatalog example app I need to search for \"PSPDFCatalog\".\n4. Double-Click on the process to view the information window.\n5. Now you need to identify the PID (Process ID) of your process. The PID is the number included in the round brackets in the window title, e.g. if the title says \"PSPDFCatalog (73389)\", then 73389 is your PID. Here's an example of how that looks: \n\u003cimg width=\"50%\" src=\"Images/pid.png\"/\u003e\n\n6. Now you need to open your Terminal app and enter the following command to attach lldb: `lldb -p YOUR-PID aux`. For the example case above this is what the full command would look like: `lldb -p 73389 aux`.\n7. Once lldb is set up in the terminal window, you can simply use it like you would in Xcode.\n8. To get a stack trace you need to type `bt all`.\n\n# Contributing\n\nPlease ensure [you signed our CLA](https://pspdfkit.com/guides/web/current/miscellaneous/contributing/) so we can accept your contributions.\n\n\n[Instant Example]: https://github.com/PSPDFKit/Xamarin-iOS/tree/master/Examples/PSPDFCatalog/PSPDFCatalog/Catalog/Instant\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpspdfkit%2Fxamarin-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpspdfkit%2Fxamarin-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpspdfkit%2Fxamarin-ios/lists"}