Skip to content

Latest commit

 

History

History
40 lines (26 loc) · 1.27 KB

File metadata and controls

40 lines (26 loc) · 1.27 KB

MacAddress plugin for Phonegap (Cordova)

By Joey Wong (Huang Jun Yan) Updated for Cordova 2.4.0

This is the plugins to help you get the iOS WIFI MAC address

The UDID API is deprecated in iOS 5. To get a unique identifier, maybe you need to turn to iPhones/iPad/iPod touch' MAC address instead.

INSTALL

=========================
  1. Drag the Macaddress.h, Macaddress.m into the "Plugins" folder in Xcode.

  2. Attach the "macaddress.js" to your www folder

  3. Don't forget to enable the plugins in Cordova config.xml (for Cordova 2.3 or higher)

Add this:

<plugin name="Macaddress" value="Macaddress" />

For older version, please modify the PhoneGap.plist file of your application. Under the key "Plugins" add another one with key name Macaddress and value Macaddress.

How to use

========================================== Get the WIFI MAC address by following script :
plugins.macaddress.getMacAddress(function(response){
                                    alert('MAC Address:'+response);
                                  },function(errorMsg){
                                    alert('Error:'+errorMsg);
                                  });

Voila !~