FAFA.MAUI.IOS.IQKeyboardManager 1.0.5

dotnet add package FAFA.MAUI.IOS.IQKeyboardManager --version 1.0.5
                    
NuGet\Install-Package FAFA.MAUI.IOS.IQKeyboardManager -Version 1.0.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FAFA.MAUI.IOS.IQKeyboardManager" Version="1.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FAFA.MAUI.IOS.IQKeyboardManager" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="FAFA.MAUI.IOS.IQKeyboardManager" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FAFA.MAUI.IOS.IQKeyboardManager --version 1.0.5
                    
#r "nuget: FAFA.MAUI.IOS.IQKeyboardManager, 1.0.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=FAFA.MAUI.IOS.IQKeyboardManager&version=1.0.5
                    
Install FAFA.MAUI.IOS.IQKeyboardManager as a Cake Addin
#tool nuget:?package=FAFA.MAUI.IOS.IQKeyboardManager&version=1.0.5
                    
Install FAFA.MAUI.IOS.IQKeyboardManager as a Cake Tool

IQKeyboardManager MAUI Bindings

original library creator

YOU MAY GENERATE A NEW FRAMEWORK BY DOING THE FOLLOWING

  1. Clone the original creators repository
  2. Open terminal inside the root directory of the project
  3. Run a pod install (assumption is you had cocoapods installed)
  4. Run the following commands
    1. xcodebuild -target IQKeyboardManager -configuration Release -sdk iphoneos BUILD_DIR=output
    2. xcodebuild -target IQKeyboardManager -configuration Release -sdk iphonesimulator BUILD_DIR=output
    3. xcodebuild -create-xcframework -framework output/Release-iphoneos/IQKeyboardManager.framework -framework output/Release-iphonesimulator/IQKeyboardManager.framework -output output/IQKeyboardManager.xcframework
  5. There will now be an output folder which will have the updated .xcframework
  6. Copy over the generated .xcframework into the .net project, rebuild the library
  7. Bindings may change, so you will have to update ApiDefinition.cs and StructsAndEnums.cs manually (recommended to do manually).

YOU MAY TRY TO AUTO REGENERATE THE BINDING FILES USING SHARPIE

download sharpie

  • run sharpie bind -sdk iphoneos -scope IQKeyboardManager.framework/Headers/*.h;
  • this generates a ton of garbage, find IQKeyboardManager in ApiDefinitions.cs, delete the rest.
  • same deal with StructsAndEnums.cs

It may not work as expected, I'm not an expert, in the end I took the ApiDefinitions.cs from here

USAGE

// in MauiProgram.cs
#if IOS

using Maui.IQKeyboardManager;
using Microsoft.Maui.Platform;
using UIKit;

#endif
...
public static MauiApp CreateMauiApp()
{
    var builder = MauiApp.CreateBuilder();
    builder
        .UseMauiApp<App>()
        .ConfigureLifecycleEvents(events =>
        {
            #if IOS
            events.AddiOS(ios =>
            {
                ios.FinishedLaunching((a, b) =>
                { 
                    // disable MS Version so it doesn't interfere with IQKeyboardManager 
                    KeyboardAutoManagerScroll.Disconnect();
                    IQKeyboardManager.SharedManager.Enable = true;
                    IQKeyboardManager.SharedManager.EnableAutoToolbar = false;
                    
                    return true;
                });
            });
            #endif
        });
    ...
    return builder.Build();
}
...
Product Compatible and additional computed target framework versions.
.NET net8.0-ios18.0 is compatible.  net9.0-ios was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0-ios18.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.5 131 7 days ago
1.0.3 298 2 months ago
1.0.2 101 2 months ago
1.0.1 114 2 months ago
1.0.0 109 2 months ago

.NET MAUI Bindings for IQKeyboardManager.