A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
Thanks for reaching out.
From the log you shared, the reason your existing Xamarin.OpenTok.iOS package is incompatible with MAUI is due to target framework differences.
- In your MAUI project you have already added a .NET Class Library and a .NET MAUI Class Library projects. Should you add the .NET 8 iOS Binding Library as a 4th project?
Yes, you should add it as a separate project. The iOS Binding Library needs to be its own project with a specific project type: ios binding library. Your solution structure should look like this:
YourSolution/
├── YourApp.MauiApp (main MAUI project)
├── YourApp.ClassLibrary (.NET Class Library)
├── YourApp.MauiClassLibrary (.NET MAUI Class Library)
└── YourApp.iOS.Bindings (iOS Binding Library) ← NEW 4th project
- Where to get the OpenTok.framework?
The reason you’re unable to find OpenTok.framework is because the Vonage iOS SDK no longer distributes the SDK as a .framework.
Starting from version 2.25.1+, the SDK is provided only as an XCFramework (OpenTok.xcframework). The older fat framework format (OpenTok.framework) has been discontinued.
For .NET 8 / .NET MAUI iOS binding projects, this is expected behavior. Modern .NET for iOS fully supports binding against .xcframework artifacts.
To proceed:
- Download the latest iOS SDK from the Vonage Video API iOS SDK page (Release Notes section).
- Extract the package.
- Locate
OpenTok.xcframeworkinside the archive. - Add
OpenTok.xcframeworkto your .NET 8 iOS Binding Library project. - Set its Build Action to NativeReference.
- What about the remaining process like Build Action, Set properties and Reference it to the MAUI project.
Once you have the framework and create the binding project, I recommend follow these steps:
- Add
OpenTok.xcframeworkinto your .NET 8 iOS Binding Library project. Then select it in Solution Explorer. Set Build Action to NativeReference.
Set:
Smart Link = True and Force Load = True
These settings ensure the native symbols are correctly linked and not stripped by the iOS linker.
- In your binding project, you’ll need:
-
ApiDefinition.cs -
(Optional) Metadata.xml
If you previously had a Xamarin binding project, you can reuse most of that API definition code, but you may need to fix:
- Nullability annotations
- Deprecated attributes
- Any APIs that changed in newer SDK versions.
- Build the binding project first. If it succeeds, it will generate a managed .NET assembly exposing types like:
- OTSession
- OTPublisher
- OTSubscriber
At this point, the native SDK is successfully wrapped for .NET 8 iOS.
- In your MAUI project:
- Add a Project Reference to the iOS Binding Library.
- Make sure both projects target net8.0-ios.
Your existing OpentokStreamingService can then use the bound types just like before.
- Since your OpentokStreamingService directly uses
UIView,AVFoundation, andiOS-specific APIs, it should live underPlatforms/iOS/.
Hope this helps. If you found my response helpful or informative, I would greatly appreciate it if you could follow this guidance provide feedback. Thank you.