I'm converting my android app to ios and am using wifi to share data between phones. The first code shown below works on android to get my ip address but on ios if says that "Server NewConnection Sub not found." It wasn't necessary to have one in this case on android but I went ahead and added one in the ios app but the sub is never triggered. How do I get my ip address in ios?
B4X:
'This works on android
Server.initialize(5500,"Server")
MyIP = Server.GetMyWifiIP
log("MyIP = " & MyIP)
Server.close
B4X:
Server.initialize(5500,"Server")
...
'I added this sub in ios but it is never triggered
Sub Server_NewConnection (Successful As Boolean, NewSocket As Socket)
If Successful = True Then
Log("WIFI connection successful")
MyIP = Server.GetMyWifiIP
Log("MyIP = " & MyIP)
Server.close
Else
Log("WIFI connection FAILED")
End If
End Sub