question

AnilM2021 avatar image
0 Votes"
AnilM2021 asked RobCaplan edited

How can I check Local Network permission status on iOS 14

My app uses local network, Can we check Local network permission status whether Allowed/NotAllowed for my App.
109923-img-0229.png

I have tried to Connectivity.NetworkAccess Property but it returns NetworkAccess.Internet for Local network as well. I want to check Local Network permission status while using app.
Please let me know is there any way to accomplish it?


dotnet-xamarin
img-0229.png (416.9 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

JarvanZhang-MSFT avatar image
0 Votes"
JarvanZhang-MSFT answered

I have tried to Connectivity.NetworkAccess Property but it returns NetworkAccess.Internet for Local network as well.

Hi,AnilM2021. Connectivity.NetworkAccess is just to monitor the device's network conditions, the function doesn't require addition set up on iOS such as permission. The api cannot used to check the Network permission status.

I want to check Local Network permission status while using app.

There is no API that directly returns your local network access state from Apple.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Is there any other API to get this information for iOS in Xamarin forms?

0 Votes 0 ·

Hi, AnilM

Xamarin.Essentials.Permissions support to check the permissions in Xamarin.Forms, but it doesn't involve the network permission. And Xamarin.Forms is just UI framework, it will call the native api to achieve the functions on each platform. If the platform doesn't provide the api, the function will not be able to be done.

0 Votes 0 ·