WidgetKit.WidgetCenterProxy
9.0.3
dotnet add package WidgetKit.WidgetCenterProxy --version 9.0.3
NuGet\Install-Package WidgetKit.WidgetCenterProxy -Version 9.0.3
<PackageReference Include="WidgetKit.WidgetCenterProxy" Version="9.0.3" />
paket add WidgetKit.WidgetCenterProxy --version 9.0.3
#r "nuget: WidgetKit.WidgetCenterProxy, 9.0.3"
// Install WidgetKit.WidgetCenterProxy as a Cake Addin #addin nuget:?package=WidgetKit.WidgetCenterProxy&version=9.0.3 // Install WidgetKit.WidgetCenterProxy as a Cake Tool #tool nuget:?package=WidgetKit.WidgetCenterProxy&version=9.0.3
WidgetCenterProxy
Description
Call WidgetCenter methods from iOS .NET (MAUI).
Usage
Add package reference in project file
<PackageReference Include="WidgetKit.WidgetCenterProxy" Version="9.0.3" />
new WidgetKit.WidgetCenterProxy().ReloadAllTimeLines();
Known problems
On Windows you might get problems with very long directory names. This is a known issue with xcframeworks. The causes and possible solutions are described here: https://github.com/AdamEssenmacher/GoogleApisForiOSComponents
Package nuget location:
https://www.nuget.org/profiles/jeroenber
Git repository
https://github.com/JeroenBer/WidgetCenterProxy
To build:
Run script:
./clean.sh
Run script:
./build.sh
Goto .NET Project directory:
cd WidgetCenterProxyBinder/WidgetCenterProxyBinder
Create the package:
dotnet pack
History
Changes 2025
- Upgraded to .NET9. Build with XCode 16.2.
- Upgraded to xcframework (to be able to support M processor), "lipo" command no longer necessary
- Added support for Arm64 (M processor) simulator
- Shorten file paths (abbreviated to WCP (=WidgetCenterProxy)) due too long paths with xcframework
- Add license/readme to package
- Changed to a more logical package name "WidgetKit.WidgetCenterBinder" "com.hcsaba.WidgetCenterBinder.Net8"
Some help from the following examples: https://medium.com/@tema.denisoff/how-to-use-swiftui-components-in-maui-f43c54d2173c https://github.com/temamarvel/SwiftUI_To_MAUI/blob/main/Scripts/build.sh Fix xcframework: Set BUILD_LIBRARY_FOR_DISTRIBUTION to Yes in project settings: https://stackoverflow.com/questions/58805812/xcframework-does-not-contain-internal-frameworks
Original source
Call WidgetCenter.shared methods from Xamarin.
Created it based on the binding-swift walkthrough.
Forked from:
If you run build.sh you'll get WidgetCenterProxy framework, which will be used by WidgetCenterProxyBinder project. You can use WidgetCenterProxyBinder in your app to handle iOS14 widgets.
var s = CultureInfo.CurrentCulture.Name;
var x = "";
var i = x.IndexOf(" ");
Console.WriteLine(i);
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0-ios18.0 is compatible. |
-
net9.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 |
---|---|---|
9.0.3 | 48 | 2/15/2025 |
9.0.2-alpha | 38 | 2/15/2025 |