I'm not sure if this is at all possible or not.
A client of our company would like to have the following:
The client is a large retailer and has many shops.
Each shop has a dedicated WLan
When a customer enters a shop and the App is running it should recognize the network and connect to it.
The customer can then use certain web services which are only available on this dedicated WLan.
The App is written in Monotouch on iOS.
This sounds like what CaptiveNetwork offers. The bindings for this are available in recent versions of MonoTouch (5.2+).
UPDATE: I updated the answer to MonoTouch WIFI SSID to show how to use CaptiveNetwork (a single call) from MonoTouch (but it's a bit different, subset, from what you're looking to do with the API).
Related
I want to use the CNCopySupportedInterfaces API to get the SSID of Wifi interface. But I just have doubt about the API CNCopySupportedInterfaces. Will this API provide a list of all configured Wifi interfaces or only one which is currently active or info about all access points that are reachable (but not configured) at that moment?
CNCopySupportedInterfacesand CNCopyCurrentNetworkInfo of CaptiveNetwork, will gives only your connected wifi name and detail, Without the use of private library (Apple80211) it will not provide you other reachable wifi list or other info.
You can refer to: How do I use CaptiveNetwork to get the current WiFi Hotspot Name for more information.
You could have a look at iphone-wireless project if you are interested in Apple80211. There exists a sample app "Stumber" which does exactly what you want. But you cannot use this in your app if you want to publish to App Store because as it uses private APIs. Apple rejects apps those use private APIs.
As of iOS 9 Beta 4 CNCopySupportedInterfaces is deprecated. Much pain ensuing....
https://forums.developer.apple.com/message/31340#31340
I know it is possible to list the available Wifi networks on iPhone using the CaptiveNetwork API from official Apple SDK.
I was wondering if there is a way to auto connect to a specific SSID programmatically as long as I can find it in the list returned by CaptiveNetwork ?
Apple would not like you to do such things. Connecting to Wifi Stations is the responsibility of the user, so don't expect a public API. See e.g. here. Probably the makers of this app also would like to do it automatically.
Peter
First of all, I don't think you will be able to get the list of available WiFi networks on iPhone using Captive network API. It will just give you the details of your connected wifi. And though there is private APIs to do this, Apple doesn't approve the apps that use them.
As I know, you only could get the current-connected wifi without using private api, but what confusing me is Nest iOS App do could get a list of available wifi, and Apple didn't reject it!!!
I have found a few samples on how to use GameKit for bluetooth communication and even accessing bluetooth functionality using native code but no example on how to use the MonoTouch.CoreBluetooth namespace.
Seems a shame using hacks when the full implementation is just waiting to be used.
Can anyone please share a sample or source (a link to a book would work as well) for the new MonoTouch.CoreBluetooth.
CoreBluetooth is just for communicating with devices that utilise the Bluetooth Low Energy Profile, such as watches, heart rate monitors etc.. It is not possible to use any other profiles with CoreBluetooth, so not possible to connect to another phone, a computer etc...
(Although given the name, I hope in future apple will provide lower level access to bluetooth comms in this framework)
I'm trying to write a simple chat application for the iPhone (as an experiment). Is there a simple way for two devices to discover each others' IP addresses, and given the addresses is there a simple API or protocol that would let me send text messages back and forth?
I've investigated SIP (specifically Sofia and eXosip), but these tools exist as C libraries and are beyond my current ability to port them to the iPhone.
Update: I'm trying to connect two devices over the Internet (i.e. not over Bluetooth or a local wireless network, which is what GameKit does).
You're going to need a server that provides the match making service. Game Center makes this pretty easy, but your users will have to have Game Center accounts.
Alternatively, you can set up an XMPP (formerly Jabber, it's what powers Google Chat) server (I've never done this, but there are several available) and use the XMPP Framework for Cocoa. There are instructions for using it in iPhone apps here.
I'm sure there are other chat servers and client source also available. IRC and Mobile Colloquy come to mind.
Finally, you could write your own server using your favorite server language / framework. This isn't too hard (I've done it myself), but it's far from what I'd call simple, and I wouldn't use it for a production system.
There is support for exactly this kind of ad-hoc peer-to-peer networking in GameKit. Have a look at the second half of the GameKit documentation for details:
http://developer.apple.com/library/ios/#documentation/...
NSNetService is a good option.
Take a look at WebRTC Datachannels. WebRTC is a newer option with native iOS support a standard that is still being finalized, but it is more flexible should the iOS app need to communicate with browser or even android peers
i saw one application in App store.(files lite by olive toast). inwhich they have used
web server(webDAV url) to transfer file from PC to ipod or iphone and also another option bonjour.how can i use bonjour (what is it ?)..how can i do for my application?
internally how they have done?any help please?
Bonjour is Apple's "Zero-configuration networking". Essentially it allows you to advertise a service on the network by name, allowing other machines on the local network to discover it. There's plenty of high quality documentation available from Apple. Just google it.
Bonjour is just a way for your desktop application to discover the ip address of the iPhone. To actually transfer data to or from your device, you need to write that code yourself. Unfortunately Apple doesn't provide a framework to do this.
Some people use WebDAV, implemented with an open source framework.
Another option is to use ZSync, if you are using Core Data:
http://www.zarrastudios.com/ZSync/ZSync.html