-
Notifications
You must be signed in to change notification settings - Fork 549
Closed
Labels
good first issueThis is a good first issue for someone to start working with our codeThis is a good first issue for someone to start working with our code
Milestone
Description
Steps to Reproduce
- Implement the method as defined in networkextension.cs
- Attempt to pass a null value to the completion handler.
Expected Behavior
Null values should be able to be passed to the completion handler. This is implied in the Obj-C declaration, but is explicit in the swift declaration.
func handleAppMessage(
_ messageData: Data,
completionHandler: ((Data?) -> Void)? = nil
)
Actual Behavior
If implement as defined in the C# NETunnelProvider interface null values are not allowed to be passed to the competition handler.
This can be worked around by modifying the overridden method signature (below) to allow null values to be passed, but this results in a compiler warning.
public override void HandleAppMessage(NSData messageData, Action<NSData?>? completionHandler)
{
}
Environment
Version information
Visual Studio for Mac
17.5 Preview (17.5 build 437)
Build Logs
<redacted>/PacketTunnelProvider.cs(91,26): warning CS8610: Nullability of reference types in type of parameter 'completionHandler' doesn't match overridden member. [<redacted>.csproj::TargetFramework=net7.0-ios]
Metadata
Metadata
Assignees
Labels
good first issueThis is a good first issue for someone to start working with our codeThis is a good first issue for someone to start working with our code