Microsoft.Intune.MAM.Remapper.Tasks
0.1.3863.2
Prefix Reserved
See the version list below for details.
dotnet add package Microsoft.Intune.MAM.Remapper.Tasks --version 0.1.3863.2
NuGet\Install-Package Microsoft.Intune.MAM.Remapper.Tasks -Version 0.1.3863.2
<PackageReference Include="Microsoft.Intune.MAM.Remapper.Tasks" Version="0.1.3863.2" />
paket add Microsoft.Intune.MAM.Remapper.Tasks --version 0.1.3863.2
#r "nuget: Microsoft.Intune.MAM.Remapper.Tasks, 0.1.3863.2"
// Install Microsoft.Intune.MAM.Remapper.Tasks as a Cake Addin #addin nuget:?package=Microsoft.Intune.MAM.Remapper.Tasks&version=0.1.3863.2 // Install Microsoft.Intune.MAM.Remapper.Tasks as a Cake Tool #tool nuget:?package=Microsoft.Intune.MAM.Remapper.Tasks&version=0.1.3863.2
Microsoft Intune App SDK Xamarin Component
You may wish to first read the Get Started with Intune App SDK article, which explains how to prepare for integration on each supported platform.
The Intune SDK for Xamarin support is currently available in preview.
Overview
The Intune App SDK Xamarin component enables Intune app protection policy in iOS and Android apps built with Xamarin. The component allows developers to easily build in Intune app protection features into their Xamarin-based app.
The Microsoft Intune App SDK Xamarin Component lets you incorporate Intune app protection policies (also known as APP or MAM policies) into your apps developed with Xamarin. A MAM-enabled application is one that is integrated with the Intune App SDK. IT administrators can deploy app protection policies to your mobile app when Intune actively manages the app.
What's supported?
Developer machines
- macOS
Mobile app platforms
- Android
- iOS
Intune Mobile Application Management scenarios
- Intune MDM-enrolled devices
- Third-party EMM-enrolled devices
- Unmanaged devices (not enrolled with any MDM)
Xamarin apps built with the Intune App SDK Xamarin Component can now receive Intune app protection policies on both Intune mobile device management (MDM) enrolled devices and unenrolled devices.
Prerequisites
- [Android only] The latest Microsoft Intune Company Portal app must be installed on the device.
Get started
Download Xamarin-component.exe from here and extract it.
Read the license terms for the Microsoft Intune MAM Xamarin Component.
Download the Intune App SDK Xamarin Component folder from GitHub or Xamarin and extract it. Both files downloaded from step 1 and step 3 should be in the same directory level.
In the command line as an administrator, run
Xamarin.Component.exe install <.xam> file
.In Visual Studio, right-click components in your previously created Xamarin project.
Select Edit Components and add the Intune App SDK component you’ve downloaded locally to your computer.
Enabling Intune app protection polices in your iOS mobile app
In order to initialize the Intune App SDK, you need to make a call for any API in the
AppDelegate.cs
class. For example:public override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions) { Console.WriteLine ("Is Managed: {0}", IntuneMAMPolicyManager.Instance.PrimaryUser != null); return true; }
Now that the component is added and initialized, you can follow the general steps required for building the App SDK into an iOS mobile app. You can find the full documentation for enabling native iOS apps in the Intune App SDK for iOS Developer Guide.
Important: There are several modifications specific to Xamarin-based iOS apps. For instance, when enabling keychain groups, you need to add the following to include the Xamarin sample app we included in the component. Below is an example of the groups you would need to have in your Keychain Access groups:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>keychain-access-groups</key> <array> <string>$(AppIdentifierPrefix)com.xamarin.microsoftintunesample</string> <string>$(AppIdentifierPrefix)com.xamarin.microsoftintunesample.intunemam</string> <string>$(AppIdentifierPrefix)com.microsoft.intune.mam</string> <string>$(AppIdentifierPrefix)com.microsoft.adalcache</string> </array> </dict> </plist>
You have completed the steps necessary to build the component into your Xamarin-based iOS app. If you are utilizing Xcode for building your project, you can use the Intune App SDK Settings.bundle
. This allows you to toggle Intune policy settings on and off as you build your project to test and debug. To take advantage of this bundle, follow the steps in the Intune App SDK for iOS Developer Guide and read the section on debugging in Xcode.
Enabling app protection policies in your Android mobile app
For Xamarin-based Android apps not using a UI framework, you need to read and follow the Intune App SDK for Android Developer Guide. For your Xamarin-based Android app, you need to replace class, methods, and activities with their MAM equivalent based on the table included in the guide. If your app doesn’t define an android.app.Application
class, you need to create one and ensure that you inherit from MAMApplication
.
For Xamarin Forms and other UI frameworks, we have provided a tool called MAM.Remapper
. The tool accomplishes the class replacement for you. However, you need to do the following steps:
Add a reference to the
Microsoft.Intune.MAM.Remapper.Tasks
NuGet package version 0.1.0.0 or greater.Add the following line to your Android csproj:
<Import
Project="$(NugetPack)\\Microsoft.Intune.MAM.Remapper.Tasks.0.1.X.X\\build\\MonoAndroid10\\Microsoft.Intune.MAM.Remapper.targets" />
- Set the build action of the added
remapping-config.json
file to RemappingConfigFile. The includedremapping-config.json
only works with Xamarin.Forms. For other UI frameworks, refer to the Readme included with the Remapper NuGet package.
Next steps
You have completed the basic steps of building the component into your app. Now you can follow the steps included in the Xamarin Android sample app. We have provided two samples, one for Xamarin.Forms and another for Android.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on Microsoft.Intune.MAM.Remapper.Tasks:
Repository | Stars |
---|---|
dotnet/android
.NET for Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#
|
|
Azure-Samples/active-directory-xamarin-native-v2
This is a simple Xamarin Forms app showcasing how to use MSAL.NET to authenticate work or school and Microsoft personal accounts with the Microsoft identity platform, and access the Microsoft Graph with the resulting token.
|
Version | Downloads | Last updated |
---|---|---|
0.1.4635.1 | 16,447 | 12/16/2019 |
0.1.4547.1 | 1,369 | 9/20/2019 |
0.1.4500.1 | 899 | 8/2/2019 |
0.1.4428.1 | 1,245 | 5/28/2019 |
0.1.4119.2 | 8,363 | 8/10/2018 |
0.1.4036.2 | 2,067 | 4/27/2018 |
0.1.4007.1 | 1,838 | 4/2/2018 |
0.1.3863.2 | 1,981 | 11/20/2017 |
0.1.3838.2 | 1,301 | 10/11/2017 |
0.1.3362.15 | 4,968 | 11/9/2016 |
0.1.3314.2 | 1,631 | 6/27/2016 |