5

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.

thomaux
  • 19,133
  • 10
  • 76
  • 103
Paul Sinnema
  • 2,534
  • 2
  • 20
  • 33

1 Answers1

3

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).

Community
  • 1
  • 1
poupou
  • 43,413
  • 6
  • 77
  • 174
  • Yep, looks like what i need. Are there any examples available? What do I need to reference the assebly? I constantly get EntryPointNotFoundException. I did the DllImport but it very well possible I generate a signature that can not be found. Any help appreciated. – Paul Sinnema Mar 20 '12 at 12:20
  • This is not something very commonly used AFAIK so there are no C# sample (that I know of). OTOH the API is very small/simple and MonoTouch 5.2+ has a `CaptiveNetwork` class under the `MonoTouch.SystemConfiguration` namespace (so you should not need your own `[DllImport]` declarations, see: http://docs.go-mono.com/index.aspx?link=C%3AMonoTouch.SystemConfiguration.CaptiveNetwork – poupou Mar 20 '12 at 12:43
  • Yes I know I need my own. And I already found the documentation on the subject. But I have no clue what to declare. There are variables in there I can't find anywhere and they are not documented. – Paul Sinnema Mar 21 '12 at 05:19
  • I've tried this too with the same result MonoTouch.SystemConfiguration.CaptiveNetwork.SetSupportedSSIDs(new string[] { "MyNet" }); System.EntyPointNotFoundException Message: CNSetSupportedSSIDs – Paul Sinnema Mar 21 '12 at 05:32
  • You misread me :) *so you should* **not** *need your own* `[DllImport]` means **everything** is already provided in MonoTouch, including the constants. `EntryPointNotFoundException` should **only** occurs on the simulator (since this API works only on devices). – poupou Mar 21 '12 at 12:13
  • Aha, ok, yes I misread. Thanks, I'll try it out on the device. – Paul Sinnema Mar 21 '12 at 13:49