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:
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?
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/
Related
I'm working on a Flutter app for Philips Hue lights, so I obviously need to connect to the local network. I'm using discover.quickDiscoverClients() method from upnp plugin: https://pub.dev/packages/upnp Everything is working like a charm until I started Beta testing. None of my beta testers get the Local Network permission alert:
nor Local Network privacy permission in iPhone Settings -> app
I've already added NSLocalNetworkUsageDescription in plist file as well as BonjourServices and the Local Network Permission dialog is still NOT showing up for my beta users.
Also, the weird thing is it works on my phone and on my wife's phone as we are internal testers, however it does NOT pass for beta testers.
What shall I do, please to allow Local Networks for beta testers?
Could requesting multicast entitlement help? https://developer.apple.com/contact/request/networking-multicast
It looks like the reason was that there was a router in the local network that does NOT support UPnP => Therefore, this dialog will NOT even be triggered.
I have been working on a react native project in Windows 10 for a while now using Expo to scan the given QR code and test the app on my IOS device. The other day I ran $expo start and everything seemed to go fine until I tried to load the app on my IOS device. I received this message:
Could not connect to server
I then "Run in Web Browser" which worked fine, so I tried accessing 127.0.0.1:19000 in my Iphone's browser (firefox) and it as well could not connect to server. My phone is connected via wifi which is 2.4 or 5g. I wasn't sure how this would effect this so I used a wifi adapter on PC to match which wifi connection phone and PC were on and that didn't help.
I am using react version 17.0.1, expo version 3.28.5, and "react-native": "https://github.com/expo/react-native/archive/sdk-38.0.0.tar.gz"
I have tried:
Turning off windows firewall
Using different Iphones to connect
npm install --global expo-cli
Changing Connection from "LAN" to "Local"
Reinstalling Node
Creating a System Variable called: "REACT_NATIVE_PACKAGER_HOSTNAME" with the value "192.168.2.108". This did change the LAN IP address as intended but it did not resolve the problem. I just got the same message with the new IP address.
This problem just started happening out of the blue and I'm not really sure what to do next. If you need any additional information I'd be happy to give it.
try to use
expo start --tunnel
When you get the message:
"Error loading DevTools ValidationError: "urlType" must be one of [exp, http, redirect, no-protocol]"
Just wait for a bit and the QR code for tunnel will appear. It does the same for me as well.
I'm trying to connect apple tv with my xcode to debug my app. But I'm getting below dialog and it will never go. So I tried following steps to fix but no use.
Waited for 10 mins and checked but still the same.
I restarted/reset apple tv and checked but no use.
Tried with different versions of xcode but no use.
Tried using wifi, mobile hotspot with different networks.
Some times I will get this dialog and it will never go.
If I try to run app in this state then I will get this alert in xcode
So I'm not understanding the why its behaving like this. And how to fix this issue ?
Wireless Debugging on Apple TV
Dive has some great recommendations about using Apple TV with your machine, connected via Ethernet. So far this is also my preferred way to connect, develop and deploy to Apple TV, however debugging on Wifi isn't the best experience.
Here are a few things you could try.
Remove current pairing by using Device and Simulator window.
Try downloading Apple Configurator 2 and use that to first pair your Apple TV to your machine. This is great tool to ensure you can connect to your iOS/tvOS devices for some super user type setup. ( Main Menu -> Paired Devices)
For this to work you have to be on a specific screen on your Apple TV.
Settings -> Remote and Devices -> Remote App and Devices ( This uses multipeer connectivity)
If you are successful pairing your TV using apple configurator then it's a good sign as you can rule our networking issues with your Wifi.
Try pairing with Xcode after it's paired with your machine in the step above. The dialog window you see above is expected and takes some time ( longer in some cases) but should eventually complete.
If step 3 wasn't a success, unpair from Xcode and Apple Configurator ( if they show as connected but not aren't really paired), restart your machine and Apple TV and start the same steps again.
Lan Set up :
You can connect to your Apple TV via a switch or usually Modem/Routers have inbuilt switch ( extra ethernet ports).
Try the same steps and you should be able to pair with Xcode.
Troubleshooting: Try using Console app on your machine if you still can not figure out the root cause and this should help you debug the pairing issue.
There is a helpful instruction from Apple - Pair a wireless device with Xcode (iOS, tvOS) and I assume that you did as they recommend.
Such issues usually appear due to the following reasons:
Something is wrong with your network configuration. The easiest way to check is to try to wirelessly connect your iPhone to be sure that you do not have the same problem. If this is the case then try to white-list the IP address for the Apple TV on your router and open necessary ports;
About port, Apple recommends the following configuration: Communication to network devices uses port 62078. Some networks block specific ports. You may need to check your network settings or ask your system administrator to open this port;
Your Xcode version has to be in sync with tvOS. From the screenshots, I see that you have tvOS 13.3.1. It means that it is better to use Xcode 11.3.1 in this configuration. But you mentioned that you already tried this.
The option that always works to me is to use an Ethernet connection. I connect my AppleTV via the ethernet cable to my router and access it from my MacBook without problems:
Connect the device to the same network using an Ethernet cable.
For an Apple TV, connect using the Ethernet port in the back of the device.
I have made the simplest app possible to connect to a Mavic Pro (basically the Swift version of this code (which comes from the Aircraft Binding and Activation demo on DJI's website.
My setup is as follows: iPhone running the App is connected via lightning cable to the main USB port on the RC (between the two joysticks on the bottom). The switch on the Mavic is set to "RC" (not Wifi).
When I run the app, the aircraft binding state is unknown and the DJISDKManager.product() returns nil, even though registration of the app completed successfully.
Here are some strange but helpful pieces of information:
With the same setup as above, running the DJI Go App from the same device works perfectly.
Using either the wireless bridge app or the wifi connections works perfectly and I'm able to connect with the aircraft no problem.
Is there some setting I'm missing? I looked at all of DJI's documentation very carefully, and have found no solutions.
The hardware accessory (the remote controller) may be associated with DJI Go now. With your app open, un-plug the lightening cable, and plug it back in. Now it will be associated with your app. With iOS 11 apps sharing hardware devices got a bit challenging.
(but thanks for mentioning DJI Go did work, then we don't have to worry the microUSB in the upper left corner of the RC was activated. Leaving the pigtail connector in will block the USB port you are using.)
I almost had the same problem. Here is the fix that worked for me.
Make sure in your info.plist file you have the following.
DJI-SDK
Also I am assuming that you calling DJISDKManager.startConnectionToProduct() after appRegisteredWithError(_ error: Error?) is called.
Yesterday, I submitted my app for review, but I got this message from Apple:
We discovered one or more bugs in your app when reviewed on iPad iPhone running iOS 9.3.2 on Wi-Fi connected to an IPv6 network.
Specifically, upon review we have found the application still experiences a loading issue and unable to review the application content.
My app uses ionic framework, how can I fix this problem?
I already used domain to access my server, but this problem still exists.
Yes. According to apple's policy , your application must supports IPV6. so, please check your application supports IPV6. Supporting IPv6 in iOS 9
To test, if your application supports IPV6 or not please check this ,
Supporting IPv6 DNS64/NAT64 Networks
To check with creating follow this steps , which indicate on apple's page .
To set up a local IPv6 Wi-Fi network using your Mac
1) Make sure your Mac is connected to the Internet(with ethernet), but not through Wi-Fi.
2) Launch System Preferences from your Dock, LaunchPad, or the Apple menu.
3) Press the Option key and click Sharing. Don’t release the Option key yet. (don't forget to press option key)
4)Select Internet Sharing in the list of sharing services.
5)Release the Option key.
6)Select the Create NAT64 Network checkbox.
7)Choose the network interface that provides your Internet connection, such as Thunderbolt Ethernet or Only Ethernet.
8)Select the Wi-Fi checkbox.
9)Click Wi-Fi Options, and configure the network name and security options for your network.
10) Select the Internet Sharing checkbox to enable your local network.
11)When prompted to confirm you want to begin sharing, click Start
12) Now your mac mini is working as a hotspot and useing IPv6 NAT64 network
(looks like above image when hotspot created)
Now connect your iphone with your mac mini's hotspot. and Test your Application it's working properly or not.
I hope this answer is helpful you.
Edit :- Don't forget to add below frameworks.
1) WebKit
2) CFNetwork
You will find all the information on this link related to ipv6 policy. Supporting IPv6 DNS64/NAT64 Networks
We also faced the same issue.
Just registered your website with any CDN like cloudFlare and your app will be approved next time no need to shift the whole site to any other server. This is the easiest way to get approval from app store.
I think Apple has something wrong with this error!
I have an app (ionic app) rejected 3 times (during Nov 2016) for the same error and lastly accepted without making any change related to IPv6!
You may need to check your app for startup errors if you think that you have nothing to do with IPv6.
By the way: I did not check IPv6 compatibility on my app, and even more the app - in its inner views - has a connection to a webpage that hosted on a shared host with no IPv6 support!!
Please note that sometimes the mobile app works in the test environment but not in the Apple own test environment. Following this and this link can be very helpful in determining what's the problem with apple rejections.
It is clearly stated that the test environment is not exactly the same