iosobjective-ciphonelocal-networknmssh

SSH connection to Raspberry Pi on Local network failing with iPhone


My iOS app, 'QuickSupport' connects with Local IoT Wi-Fi network and executes some SFTP Commands on the click of a button. I have used Obj C based NMSSH Library for this. It works fine with Simulator but when I test on Real Device using Testflight by clicking that button, it crashes and I get a pop-up message:

enter image description here

When I allow this and try again it works.

I tried to give permissions through my iPhone by going to Settings --> Privacy --> Local Networks but my app's name didn't appear. It appears after the crashes when the pop-up appears to Allow connection to Local Networks. Experts, How can I give permission to my app to be able to access Local networks or is there any other workaround?


Solution

  • I was able to resolve this issue. With iOS 14, there is a Security and privacy concern that is why it doesn't allow connection to Local network by default. But we can manually trigger it. Below is the link:

    https://www.iosapplication.net/2020/12/22/local-network-in-ios-14/