Capture: UDID & Apple ID

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Tester2
Posts: 102
Joined: Wed May 18, 2011 7:02 pm

Capture: UDID & Apple ID

Post by Tester2 » Fri Apr 26, 2013 1:56 am

Is there a way to capture/display a user's device UDID and/or their Apple ID from within a LiveCode iOS app?

Thanks so much.

-Tester2

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Capture: UDID & Apple ID

Post by Mark » Thu May 02, 2013 5:01 pm

Hi,

There might be a way to retrieve the UDID, but Apple doesn't accept apps that do this. You can only ask the user for an Apple ID.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Tester2
Posts: 102
Joined: Wed May 18, 2011 7:02 pm

Re: Capture: UDID & Apple ID

Post by Tester2 » Thu May 02, 2013 8:31 pm

Hey Mark,

I found the "iphoneSystemIdentifier()" handler that actually returns the device UDID properly.

Are you saying that if I use this in my app then it will not get approved?

Thanks.

-Tester2

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Capture: UDID & Apple ID

Post by Mark » Thu May 02, 2013 10:39 pm

Hi,

Currently, I don't know the exact answer to this because I haven't used this function on a device recently. If RunRev did this the right way, the function should now return a string that is unique to both the device and the app, i.e. it shouldn't be returning the old UDID anymore or a new function should have been added to comply with Apple's new rules. You'd better just give this a try, run iphoneSystemIdentifier() on a device and see what it returns. If it returns something different from the UDID, then it is probably alright but if it really still returns the UDID then Apple won't approve your app.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Tester2
Posts: 102
Joined: Wed May 18, 2011 7:02 pm

Re: Capture: UDID & Apple ID

Post by Tester2 » Fri May 03, 2013 4:47 pm

I tried this - iphoneSystemIdentifier() - and it DOES return the exact device UDID :(

You had mentioned the Apple ID. Is that something that I can trap for in the background or do I have to ask the user to type it in?

Tester2
Posts: 102
Joined: Wed May 18, 2011 7:02 pm

Re: Capture: UDID & Apple ID

Post by Tester2 » Thu May 09, 2013 6:14 pm

Any idea of a unique identifier that I can trap for??

Thanks.

-M

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Capture: UDID & Apple ID

Post by Mark » Thu May 09, 2013 6:33 pm

Hi,

What is the purpose of the ID?

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Tester2
Posts: 102
Joined: Wed May 18, 2011 7:02 pm

Re: Capture: UDID & Apple ID

Post by Tester2 » Thu May 09, 2013 6:38 pm

I need something that will be unique to each device. I am having the user submit a form, and they can only do this submission once.

So I need to check what their device is to make sure they are not submitting multiple times.

Thanks.

CALL-151
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 206
Joined: Wed Oct 20, 2010 11:00 am

Re: Capture: UDID & Apple ID

Post by CALL-151 » Thu May 09, 2013 11:12 pm

I've made a unique identifier by running a handler like this the first time an app is launched:

Code: Select all

command makeUniqueID
   put the milliseconds into tUniqueID --Grab a POSIX timestamp
   wait random(50) milliseconds -- wait from 0-50 random msecs
   put the milliseconds & tUniqueID into tUniqueID --grab another POSIX timestamp and concat the two of them
end makeUniqueID -- tUniqueID will be unique unless 1) two users launch the app for the first time at precicesly the same time, AND 2) the random # is the same for both users
You can then save this to a file the first time the app is run.

Tester2
Posts: 102
Joined: Wed May 18, 2011 7:02 pm

Re: Capture: UDID & Apple ID

Post by Tester2 » Tue May 14, 2013 8:47 pm

CALL-151,

This works great, but the user could still delete/reinstall the app and then get a new identifier.

Any other ideas? :/

Thanks so much for all your guys' help!

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Capture: UDID & Apple ID

Post by Mark » Tue May 14, 2013 9:06 pm

Hi,

Again, what would be the purpose of a UDID? Probably, what you want is simply not allowed by apple. No go. Nada.

As I suggested, you should try to tie the ID to the person rather than the device.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Tester2
Posts: 102
Joined: Wed May 18, 2011 7:02 pm

Re: Capture: UDID & Apple ID

Post by Tester2 » Tue May 14, 2013 9:15 pm

Mark,

Yes, I've realized that a UDID cannot be used (legally) and also that just a device ID would not solve my issue.

Do you have a way or an idea of what to use for an ID attached to the user? Maybe an Apple ID or something?

Thanks.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Capture: UDID & Apple ID

Post by Mark » Tue May 14, 2013 9:32 pm

Hi,

Make a website where people can create an account. Make your app support that website. Make sure it is a really cool an smart app, or Apple will reject it for being "solely a marketing app".

Why don't you tell the purpose of all this? Is it a secret?

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Tester2
Posts: 102
Joined: Wed May 18, 2011 7:02 pm

Re: Capture: UDID & Apple ID

Post by Tester2 » Wed May 15, 2013 8:16 pm

Mark,

Sorry; I didn't mean for it to be secretive :)

Our app is a training app.

Upon training completion, there is one card where the user can submit their contact info (entered into fields, they press a button and then it goes out and is handled via PHP pages).

They then receive an email with a coupon (as a sort of congratulations).

We do not want a user to be able to enter fake data and receive multiple coupons.

So I was looking for a way to trap whom the user is.

If I tell them to just create an account on the website then they can use fake data on there as well.

***********
SIDE NOTE: I read in the App Store Review Guidelines that "Apps that require users to share personal information, such as email address and date of birth, in order to function will be rejected". Does this mean we cannot ask a user to provide us their name and email?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Capture: UDID & Apple ID

Post by Mark » Wed May 15, 2013 11:37 pm

Hi,

Attach a code to the coupon, based on user's e-mail address and the account's ID number. This way, you make sure that each coupon can only be used for one particular account. If you allow people to download a statement of accomplishment at the end of the training, you take away the incentive to create multiple accounts, because if people use multiple accounts for their training, they won't get the statement.

You can't do much more than that, because people can have multiple devices, do trainings multiple times and get multiple coupons and certificates etc. Oh, and people can have multiple Apple ID's as well :-)

You can ask people to log in with a user name and password, but you can't ask them to create a new account. You´d better rely on the guidelines than on me though.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply