Questions tagged [nsuuid]

21 questions
11
votes
3 answers

How to convert NSUUID to NSData

I need to get NSData from vendorIdentifier without converting to NSString, clear bytes. How to convert NSUUID using getUUIDBytes: to NSData?
rowwingman
  • 5,589
  • 7
  • 33
  • 50
8
votes
4 answers

How to compare NSUUID

What is the best (least code, fastest, most reliable) way to compare two NSUUIDs? Here is an example: -(BOOL)isUUID:(NSUUID*)uuid1 equalToUUID:(NSUUID*)uuid2 { return ... // YES if same or NO if not same }
Joshcodes
  • 8,513
  • 5
  • 40
  • 47
7
votes
1 answer

How do I retrieve the name of participants in MSConversation?

MSConversation gives us the local participant and remote participants. However, I am unable to retrieve the display name of self or other. How do I get these names? https://developer.apple.com/reference/messages/msconversation let ids =…
user3774630
  • 256
  • 2
  • 10
4
votes
1 answer

How to convert String to NSUUID in Swift?

I am developing iOS Swift. I have convert the NSUUID to String like the following: var bdAddr: NSUUID? var text: String = bdAddr!.UUIDString But how to convert String to NSUUID in Swift?
Wun
  • 6,211
  • 11
  • 56
  • 101
3
votes
3 answers

Whats this difference between [[NSUUID new] UUIDString] & CFUUIDRef

Can Anyone let me know what is the difference between creating the Unique Id by these two implementations give below 1) CFUUIDRef cfuuid = CFUUIDCreate(kCFAllocatorDefault); NSString *udidString =…
codelover
  • 1,113
  • 10
  • 28
2
votes
2 answers

Convert NSUUID to UnsafePointer

Following the update to Swift 3, it appears both getUUIDBytes and getBytes are not available on the UUID object. let uuid = UIDevice.current.identifierForVendor let mutableUUIDData =…
ray
  • 1,966
  • 4
  • 24
  • 39
2
votes
1 answer

NSUUID duplication chance form different device.

I need to generate Unique ID for the device when the application installed, and store this value on the device, then need to communicate with server using this UUID. And it seems NSSUUD suit for the sitiation, but I am confused is there any chance…
Haris
  • 13,645
  • 12
  • 90
  • 121
2
votes
2 answers

I put NSString in NSUUID and I log an wrong UUID iOS

I work with iBeacon and I want to monitor many beacons together. I make a for(NSDictionary *iBeacon in iBeacons) to have all iBeacons I need. In each loop, I try to put NSString into an NSUUID like this : NSString *uuid = [[NSString alloc]…
QuentindQ
  • 23
  • 6
2
votes
3 answers

NSUUID lowercase characters

I am using NSUUID for unique ids in my app like so: [[NSUUID UUID] UUIDString] and as is the expected result I get an id like this one: 102A21AD-7216-4517-8A79-39776B767E72 For backend reasons I need the letters in the uuid to be lowercase. I tried…
LOP_Luke
  • 3,150
  • 3
  • 22
  • 25
1
vote
1 answer

Is it possible to declare one's own [mini] namespace within an NSUUID?

The Wikipedia page https://en.wikipedia.org/wiki/Universally_unique_identifier states that in version 3 (and therefore presumably 5) of the UUID spec: "Six bits are replaced by fixed values" I am working on an iPhone app that utilises the NSUUID…
Joseph Beuys' Mum
  • 2,395
  • 2
  • 24
  • 50
1
vote
1 answer

storing NSUUID in Core Data causing error

i'm currently trying to save bluetooth device's NSUUID into core data with my code as follow: let appDel: AppDelegate = UIApplication.sharedApplication().delegate as! AppDelegate let context = appDel.managedObjectContext let newDevice =…
wes. i
  • 627
  • 9
  • 26
1
vote
1 answer

NSUUID as Unique ID as replacement to NSManagedObjectID

I've run into some problems using NSManagedObjectID and it changing depending on it's saved state. As such I've decided to use my own UniqeIDs as recommended in the docs and by others. I've seen many examples here on Stack Overflow and on other…
George Brown
  • 1,134
  • 10
  • 25
1
vote
2 answers

Will iOS's device identifierForVendor UUID always be the same?

if ([[UIDevice currentDevice] respondsToSelector:@selector(identifierForVendor)]) { return [[[UIDevice currentDevice] identifierForVendor] UUIDString]; } Will this ever change? I originally wanted to use MAC address, but apparently 7+…
Simon.
  • 1,886
  • 5
  • 29
  • 62
1
vote
2 answers

Can NSUUID be extended by inheritance? How?

Recently (reviewing some code) I stumbled upon an oddity that results in a bug in our program. An API we are using has the following implementation (that I am going to write in Swift, even though the original code is in Objective-C) internal class…
rodrigoelp
  • 2,550
  • 1
  • 19
  • 29
0
votes
0 answers

Error after update to tns-core-modules to 5.4.2

Everything was fine before I updated nativescript core modules. Now I'm getting some errors ERROR in ./app/routes/user/login/login.component.ts Module not found: Error: Can't resolve 'nativescript-ios-uuid' in…
Faabass
  • 1,394
  • 8
  • 29
  • 58
1
2