iOS Question How to generate random UUID?

Discussion in 'iOS Questions' started by klarsys, May 28, 2015.

  1. klarsys

    klarsys Active Member Licensed User

    I used following code in B4A:
    Dim r As Reflector
    r.Target = r.RunStaticMethod(
    UUID = r.RunMethod(
    How do I generate such in B4i?
  2. Erel

    Erel Administrator Staff Member Licensed User

    Sub RandomUUID As String
    Dim no As NativeObject
    Return no.Initialize("NSUUID").RunMethod("UUID"Null).RunMethod("UUIDString"Null).AsString
    End Sub
    klarsys likes this.
  3. klarsys

    klarsys Active Member Licensed User

    Thank you!
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice