How to set wifi option in the iPhone UIRequiredDeviceCapabilities plist? - iphone

My app uses an internet connection. I think I need to set the UIRequiredDeviceCapabilities in the plist with some sort of wifi/cellular property.
Does anyone know the correct keys I need to add?
Thanks in advance.

Sounds like you might be after the "UIRequiresPersistentWiFi" key.
See the Information Property List Key Reference document for the full list of keys.

Reference this tech document
http://developer.apple.com/library/ios/#qa/qa2010/qa1397.html

This should be done in code. Look at the Reachability.h libraries. As far as I know all the iOS devices have WiFi so this would be a pointless key.

All current (and past) shipping iOS devices have internet capability. So no such key exists.
Whether the user has turned one or more of them on is something an installed app has to determine at run-time.

Related

Is there a way to get list of devices that scanned for WiFi on the Access Point?

I hope I've posted the question on the right place. Not so sure if it should be here or in ServerFault.Nonetheless thank you for those who will answer.
So we have this project where we want to get the SSIDs and/or MAC addresses of scanned WiFi Networks available via the iPhone (can't change devices now, so no do it on Android answers please). Since via iOS5 it has become completely impossible for non-jailbroken iPhones to do so (not sure) because of new security restrictions, I want to know if the opposite is possible. That is, is there any Access Point available that can record the information of the devices that did a scan, and put it in the syslog?
Or can you please suggest another way? The basic idea is that the iPhone must get a data from another device (in this case WiFi, and we're also thinking about bluetooth) and send it to a server.
EDIT:
I've read that it's possible to get the current SSID using CaptiveNetwork.h, can someone provide me information about this? Thanks.
iphone-wireless project looks like it might fit the bill. Specifically Apple80211GetInfoCopy

The iOS 5 changed the uniqueIdentifier code?

The function
[[UIDevice currentDevice] uniqueIdentifier]
Is deprecated in iOS 5 and I found the solution in this project using the MAC address: https://github.com/gekitz/UIDevice-with-UniqueIdentifier-for-iOS-5
Ok, it is solved. But now I discovery that iOS 5 CHANGED the format of code that uniqueIdentifier return.
In iOS 4.x it is in this format:
93F38DEB-3C0B-5C09-B746-0DFDFDDB297C
Now the iOS 5, the same function return in this format:
93f38deB3c0b5c09b7460dfdfddb297c
Anyone know if the code changed at all? It is different only is format or the code in really different for the same device?
A MAC Address is a (supposedly) globally unique identifier attached to a network interface, though they can be changed in many ways.
The uniqueidentifier that Apple used to provide access to was attached to the device hardware and not changeable, which made it excellent for tracking a user across apps and sessions. That's also the reason Apple is removing it, if I had to guess. Not having a way to track users across apps and sessions increases a user's privacy on their devices.
I wouldn't be surprised if Apple removes access to the MAC Address eventually for the same reasons, so it might benefit you to examine other options for tracking devices.
[[UIDevice currentDevice] uniqueIdentifier] will still give you the same result as before. The project that you link to is not a 1:1 replacement, it is an alternative that gives you a similar solution using a different implementation, thus the two string are different.
You shouldn't use unique identifier on iOS 5. That's all you need to know.
The unique identifier on iOS was always something redundant and a big security threat. Other operating systems don't have unique identifiers and they can live without them.
You can always generate unique identifiers on your server and send them to your device.
You can always generate them from some unique system property (e.g. MAC), using system functions. On iOS you can create a unique identifier using CFUUIDCreate. This identifier is unique across devices and across time (you'll get a different identifier every time you call it) but you can save them (e.g. into keychain).
The code CHANGED!!!!!
UniqueIdentifier is no more UNIQUE!!!
The first format have 36 hexa lenght
93F38DEB-3C0B-5C09-B746-0DFDFDDB297C
The second have 40 hexa!!!!!
Because this, it changed. I don't know if it append more hexa to identifier, but the bigger size changed al all.

Check a Server for a matching UDID and autofill UITextField with matching Username

This is my first post on here so be nice :) I am new to coding iOS and currently coding an app which uses a login system which communicates with the server and saves a users UDID. I need to app to check the UDID is on the server and if it matches to auto fill the Username UITextField in the login form.
Please could someone help me out or point me in the right direction.
Mike
Welcome to SO.
I assume you know how to get the UDID? If not, you get it as this
NSString *udid = [[UIDevice currentDevice] uniqueIdentifier];
Send this to your server (where you have a table with UDIDs and corresponding user information). Using PHP (or whatever language you are using), check if there is an entry for this UDID on the server. If yes, get the corresponding username and set it in the text field as
[textField setText:theUserName];
If you don't know how to send requests and get response from iOS apps, ASIHTTPRequest would be a good and easy way to begin.
If you need any other specific help, I would suggest updating the question.
Welcome to both iOS and Stackoverflow!
You could build a PHP service which would verify the UDID of your device and check if this device and username are already registered at your site, asuming you are keeping track of these registrations using a MySQL database, PHP could most certainly do the trick.
After verifying the existence of this device, you could use a JSON callback to send the UDID of the device to the iPhone.
As for parsing this JSON check out SBJSONParser.
It might be hard to pull this off in 2 languages, asuming you are new to both. This task is possibly completed in more secure or easier methods, but this might be a consideration to check every part of web communication that the iPhone has to offer
Good luck!
Bryan
Mike, Apple will be phasing out UDID so you should really look at a new approach to this. I would suggest a combination of app.domain and the device MAC number.
Then, have your app talk to your server using HTTPRequest and return the data as JSON and parse that on the app side.
GitHub already has a solution to UIDevice uniqueidentifier being dropped:
https://github.com/gekitz/UIDevice-with-UniqueIdentifier-for-iOS-5
Project Description:
Description
Apple stopped supporting a unique identifier for iOS. This
source code solves the problem. It generates a unique identifier based
on the mac address of the device in combination with the bundle
identifier.
What you need to do:
copy NSString+MD5Addition and UIDevice+IdentifierAddition to your
project.
use [[UIDevice currentDevice] uniqueDeviceIdentifier] to retrieve the
unique identifier or
use [[UIDevice currentDevice] uniqueGlobalDeviceIdentifier] to
retrieve a global unique identifier (used for tracking between
different apps).
have fun and follow twitter.com/gekitz ;)
//Thanks to Erica Sadun for her UIDevice+Hardware Addition (used for
the mac address retrieval).

connect non iPhone Device using bluetooth in iPhone to display data

Is it possible to connect non iPhone device (like Blood sugar monitoring) with the iPhone to display its data.
So my First Question is:
1.Is it possible
2.If yes can you provide some links for development or Example codes.
Thanks for any kind of help in advance...
You can get the answer of your question here
P.S. The link is same as it is on the comment of the answer.. But since I didnt noticed the comment and was searching for the long time. So for the ones who havent seen Brads comment in the question. I have passed the link in answer.
Thanks
Do you want code or an application? Search for Bump on the AppStore. If you want code, I'd suggest looking at the GameKit framework however I don't know if you can use that to talk to other devices or not...
I would imagine it's definitely possible. A protocol like Bluetooth or WIFI would be device-agnostic. I guess it would depend on the device that you want to interface with your iPhone. Do you have a device in mind?

Path for info plist in case of device?

Can any one tell in case of device path of info plist,& where our own phone number is stored ?
You can ref to this post for the answer.
Programmatically get own phone number in iOS
Not sure why you need the Info.plist. You probably don't want to be accessing anything of that sort at runtime. It is indeed possible to retrieve the phone number from NSUserDefaults, but I recommend that you just ask the user to select his own contact, or even just enter in his own phone number. That's a little bit less surprising and scary, security-wise.