fabiocaccamo / FCUUID

:iphone: :id:  iOS UUID / Universally Unique Identifiers library as alternative to UDID and identifierForVendor.
MIT License
1.61k stars 226 forks source link

Crash on uuid for device #9

Closed hamdshah closed 8 years ago

hamdshah commented 8 years ago

"uuidForDeviceInMemory" is nil and calling "isEqualToString" on it causing crash.

line number in code

screen shot 2016-03-02 at 9 54 21 am

EDIT:

So here the scenario to generate Use the UUIDForDevice, and then delete the app and reinstall it again,

fabiocaccamo commented 8 years ago

I fixed it and I'm going to release 1.2.0 version.

hamdshah commented 8 years ago

Is it the correct way to fix ? https://github.com/fabiocaccamo/FCUUID/pull/10

fabiocaccamo commented 8 years ago

Yes, it's correct, but I will not merge your PR because in the next version I did some code refactoring and fixed this bug differently. Thanks anyway! :)

icoco commented 8 years ago

looks need identify which app used ... like code below

NSString* _deviceKeyGenerate(NSString* suffix){ NSBundle* bundle = [NSBundle mainBundle]; NSString* identifier = [bundle objectForInfoDictionaryKey:@"CFBundleIdentifier"]; return [NSString stringWithFormat:@"%@-%@",identifier,suffix]; }

define _uuidForInstallationKey _deviceKeyGenerate(@"i")

define _uuidForDeviceKey _deviceKeyGenerate(@"d")

define _uuidsOfUserDevicesKey _deviceKeyGenerate(@"u")

define _uuidsOfUserDevicesToggleKey _deviceKeyGenerate(@"t")

fabiocaccamo commented 8 years ago

Just released 1.2.0 pod, check it.

fabiocaccamo commented 8 years ago

@icoco it's an interesting request, but this is the wrong place, open another issue please.