Recently I start to work with network extension in Objective C for iOS develop.
I have already had entitlement provided for apple to use Network extension, so I can connect to wifi network using NEHotspotHelper with this links:
https://forums.developer.apple.com/message/46924#46924
NEHotspotHelper NetworkExtension API iOS9.0
How to get Wifi SSID in iOS9 after CaptiveNetwork is deprecated and calls for Wifi name are already blocked
https://forums.developer.apple.com/message/31150#31150
Now I want to connect to wifi WPA2 enterprise network (this network needs "user name" and "password" to authenticate).
My question: is posible connect to WPA2 network using network extension or NEHotspotHelper?
If it is posible, could you help me with a example? please..
Thanks for your time.
Related
I´m developing an iOS App using Texas Instruments Launchpad CC3200. But the awesome SmartConfig feature is only working for 2,4Ghz WiFi Network connections.
Users trying to do SmartConfig on hybrid or 5Ghz only WiFi connections are failing.
Does anybody know if it is possible to programmatically determine what type of WiFi connection (2,4Ghz or 5Ghz) an iOS device currently has?
Unfortunately, this is not possible unless your device is jailbroken or if you have access to private headers in the API.
The only thing you can do is tell the difference between cellular and WiFi connection using the Reachability class by Apple. The networking tools are very limited in this case.
I want to use Wi-Fi Direct in a solution, but I'm unsure which platforms support it.
Does Wi-Fi Direct depend on iPhone/iOS version?
Can I develop an application with Wi-Fi Direct feature on a iPhone 4s with iOS 8.
It took me a while to find out what is going on, but here is the summary. I hope this save people a lot of time.
Apple are not playing nice with Wi-Fi Direct, not in the same way that Android is. The Multipeer Connectivity Framework that Apple provides combines both BLE and WiFi Direct together and will only work with Apple devices and not any device that is using Wi-Fi Direct.
https://developer.apple.com/library/ios/documentation/MultipeerConnectivity/Reference/MultipeerConnectivityFramework/index.html
It states the following in this documentation - "The Multipeer Connectivity framework provides support for discovering services provided by nearby iOS devices using infrastructure Wi-Fi networks, peer-to-peer Wi-Fi, and Bluetooth personal area networks and subsequently communicating with those services by sending message-based data, streaming data, and resources (such as files)."
Additionally, Wi-Fi direct in this mode between i-Devices will need iPhone 5 and above.
There are apps that use a form of Wi-Fi Direct on the App Store, but these are using their own libraries.
The official list of current iOS Wi-Fi Management APIs
There is no Wi-Fi Direct type of connection available. The primary issue being that Apple does not allow programmatic setting of the Wi-Fi network SSID and password. However, this improves substantially in iOS 11 where you can at least prompt the user to switch to another WiFi network.
QA1942 - iOS Wi-Fi Management APIs
Entitlement option
This technology is useful if you want to provide a list of Wi-Fi networks that a user might want to connect to in a manager type app. It requires that you apply for this entitlement with Apple and the email address is in the documentation.
NEHotspotHelper
MFi Program options
These technologies allow the accessory connect to the same network as the iPhone and are not for setting up a peer-to-peer connection.
Wireless Accessory Configuration (WAC)
HomeKit
Peer-to-peer between Apple devices
These APIs come close to what you want, but they're Apple-to-Apple only.
NSNetService
Multipeer Connectivity
WiTap Example Code
iOS 11 NEHotspotConfiguration
Brought up at WWDC 2017 Advances in Networking, Part 1 is NEHotspotConfiguration which allows the app to specify and prompt to connect to a specific network.
According to this thread:
The peer-to-peer Wi-Fi implemented by iOS (and recent versions of OS
X) is not compatible with Wi-Fi Direct.
Note Just as an aside, you can
access peer-to-peer Wi-Fi without using Multipeer Connectivity. The
underlying technology is Bonjour + TCP/IP, and you can access that
directly from your app. The WiTap sample code shows how.
I am developing an iOS accessory. I want to connect this accessory with the iPhone. I have read that Bluetooth Classic solution requires MFI. Also Bluetooth Low Energy solution is not a great choice for me because of the limitations in data transfer speed. Can i use WiFi ad-hoc (peer to peer) connection without a MFI approval via bonjour? And if yes, can i distribute the app to the App Store? Thanks in advance!
Information on what is and isn't covered by the MFi program is available here but in summary an IP connection over WiFi isn't covered by MFi.
Bonjour and TCP/UDP networking is a standard part of iOS so you should have no issues with app store approval on that basis.
If you use an ad-hoc WiFi network you will need to consider how you will get the user to connect to your WiFi network as you cannot make the connection through APIs. You may want to consider the Wireless Accessory Configuration (WAC) feature in order to simplify the process of connecting your peripheral to an existing WiFi network; this does require MFi membership.
That's the question, but here's the long version: I'm working on a project that needs to mimic the connection workflow of the Belkin Wemo. The Wemo is a physical switch that can be controlled from an iOS app.
This is how the setup works:
The Wemo acts as a wifi router, it broadcasts an SSID, and you
choose it from the list of available networks in your iPhone
settings.
You then choose your home wi-fi network from within the wemo app, given a list of available networks.
and enter your network password. Presumably so the Wemo device can
connect to your wi-fi router.
The Wemo app then announces it is connecting, and then that it is
setting up remote access.
Which brings me to: How does the Wemo app check for available networks -- aka, Is there an iOS API for scanning available networks, displaying them and working with them?
There is no public API in iOS currently that can do this (used to be available pre iOS 5). You can check out a third party library like Stumbler which should help you achieve the viewing of networks: http://code.google.com/p/iphone-wireless/wiki/Stumbler
As question is very old and Apple has come with new advances in iOS.
It is now possible to scan the wi-fi using NEHotspotHelper (Apple Doc). But you still need permission from Apple to use this extension as NEHotspotHelper is special API with some guidelines (link).
Apple TQ & A
I want to connect a specific wifi network programatically using the ssid name, password and network type. For Android I found a solution: How do I connect to a specific Wi-Fi network in Android programmatically?
But for BlackBerry I can't find any solution.
If you are programming for BlackBerry OS 5 or above you may be able to use the HotspotClientRegistry.