jcesarmobile / my-phonegap-plugins

here I will upload all the phonegap plugins I develop
8 stars 11 forks source link

iOS7 MAC Address deprecated #1

Open ArjanL opened 11 years ago

ArjanL commented 11 years ago

From Apple:

"In iOS 7 and later, if you ask for the MAC address of an iOS device, the system returns the value 02:00:00:00:00:00. If you need to identify the device, use the identifierForVendor property of UIDevice instead. (Apps that need an identifier for their own advertising purposes should consider using the advertisingIdentifier property of ASIdentifierManager instead."

Can you help me to update this plugin to use the identifierForVendor instead of the MAC address so it will work on iOS7?

jcesarmobile commented 11 years ago

Did you try on an iOS 7 device? As it is a MAC address plugin I'm not going to update it to use the udentifierForVendor, but I can create an identifierForVendor plugin

ArjanL commented 11 years ago

Yes tried it on a iOS7 device, in iOS6 it works fine but in iOS7 the MAC address for all devices is 02:00:00:00:00:00. If you could? That would be really nice, since the use of "device.uuid" from Phonegap would be rejected by Apple when you sumbit your app to the AppStore.

jcesarmobile commented 11 years ago

The device.uuid won't be rejected if you use a phonegap versión greater than 2.5, they changed the code so it isn't use the real uuid, but I don't know how do they generate the uuid.

mirko77 commented 10 years ago

what is the status of the identifierForVendor plugin?

jcesarmobile commented 10 years ago

I can release it this afternoon, but it isn't as good as it seems, the identifierForVendor deppends on the bundle identifier, so all your apps should have the same bundle identifier structure (e.g, com.yourcompany.app1, com.yourcompany.app2 will have the same identifierForVendor, but com.yourcompany.app1 and com.yourcompany.subapp.app2 will not), and it seems it changes sometimes with app updates

More info here: http://tinymission.com/post/ios-identifierforvendor-frequently-changing On that post they propose to store on the keychain the first identifierForVendor you get, this solution could take some more time to be implemented on the plugin, but if you just want the value of the identifierForVendor I'll release it this afternoon (in 4-5 hours from this comment).

mirko77 commented 10 years ago

So basically there is not a reliable way to uniquely identify a device running iOS...I bet things will change again when Apple releases iOS 8...

jcesarmobile commented 10 years ago

The plugin is here https://github.com/jcesarmobile/IDFVPlugin

mirko77 commented 10 years ago

Perfect. I did a manual installation on Cordova 2.9, all good.

Many thanks