My app wants to connect to devices!!

Jassim Al Rahma 1,526 Reputation points
2021-10-26T17:11:09.613+00:00

Hi,

Why my app wants to connect to devices on the local network as you can see in the below screenshot? and how can I disable this?

143893-image.png

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,294 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,260 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 26,416 Reputation points Microsoft Vendor
    2021-10-27T03:16:59.513+00:00

    Hello,

    Welcome to our Microsoft Q&A platform!

    This alert means that your app has triggered the Local Network Privacy. Apple adds a privacy setting related to local network usage in iOS 14.0, this alert can't be removed if your app do some operations required local network access. If you want to disable it, I 'm afraid you have to remove all operations about local network. It may not be used in your code, however, it will be used in some third-party tools.
    In addition, your app needs to obtain the Privacy - Local Network Usage Description permission from the user to access the user's local network device, the default prompt is displayed as you provided, you could modify the description according to your business requirements. You could Open the info.plist in your iOS project, and add the following key

    <key>NSLocalNetworkUsageDescription</key>  
    <string>xxxxxxxxxx</string>  
    

    For more information, you could refer to
    https://stackoverflow.com/questions/63525026/what-triggers-the-would-like-to-find-and-connect-to-devices-on-your-local-netwo
    Best Regards,
    Wenyan Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.