Do they belong to you? Claim these comments.
Lieven Gekiere
Is this you? Claim Profile »
10 months ago
in Extending PhoneGap to Return the iPhone’s Unique Identifier on britg
I tried implementing this again in the latest build ... but with no success. All other GAP functions do not react anymore ...
Maybe you need to explain this to Sintaxi, so he can build it in in the next master.
L.
Maybe you need to explain this to Sintaxi, so he can build it in in the next master.
L.
1 reply
10 months ago
in Extending PhoneGap to Return the iPhone’s Unique Identifier on britg
Could this be linked to the fact i'm using a 1st generation iPhone ? Is that not supported on them ?
1 reply
britg
From everything I've read I assumed that the ID is available to all iphones
and ipod touches. I can't find a case in my limited searching where the
first gen iphones done return a unique Identifier, but I don't have one
myself.
and ipod touches. I can't find a case in my limited searching where the
first gen iphones done return a unique Identifier, but I don't have one
myself.
10 months ago
in Extending PhoneGap to Return the iPhone’s Unique Identifier on britg
Here's the JS part
*************
var Device = {
available: false,
model: "",
version: "",
isIPhone: null,
isIPod: null,
init: function(model, version) {
try {
Device.available = __gap;
Device.model = __gap_device_model;
Device.version = __gap_device_version;
Device.gapVersion = __gap_version;
Device.uniqueIdentifier = __gap_device_uniqueid;
} catch(e) {
alert("GAP is not supported!")
}
},
*************
and in my page i have :
*************
window.onload = function()
{
Device.init();
$('infomodel').innerHTML = Device.model;
$('infoversion').innerHTML = Device.version;
$('infouniqueid').innerHTML = Device.uniqueIdentifier;
Device.Location.callback = updateLocationCallback;
Device.Image.callback = 'image.lasso?data=';
}
....
*************
*************
var Device = {
available: false,
model: "",
version: "",
isIPhone: null,
isIPod: null,
init: function(model, version) {
try {
Device.available = __gap;
Device.model = __gap_device_model;
Device.version = __gap_device_version;
Device.gapVersion = __gap_version;
Device.uniqueIdentifier = __gap_device_uniqueid;
} catch(e) {
alert("GAP is not supported!")
}
},
*************
and in my page i have :
*************
window.onload = function()
{
Device.init();
$('infomodel').innerHTML = Device.model;
$('infoversion').innerHTML = Device.version;
$('infouniqueid').innerHTML = Device.uniqueIdentifier;
Device.Location.callback = updateLocationCallback;
Device.Image.callback = 'image.lasso?data=';
}
....
*************
1 reply
britg
Hmm, that all looks solid. Here's a silly question - you've compiled and re-run the phonegap app in xcode, correct? also, are you using your physical iphone or the simulator?
10 months ago
in Extending PhoneGap to Return the iPhone’s Unique Identifier on britg
I get an "undefined" after adding all this to my project ... any idea's ?
1 reply
britg
Hmm, when and where are you getting undefined? i.e. what's the context? Are you doing something like alert(Device.uniqueIdentifier) ?
If you can pastie your javascript code, maybe I can weed out the issue.
If you can pastie your javascript code, maybe I can weed out the issue.
problems you're running into as I didn't see those. If you can pastebin
your code somewhere I will try to find some time to look at it in the next
couple days.