omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    uuid?

    Pythonista
    uuid
    3
    4
    2687
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ellie_ff1493
      ellie_ff1493 last edited by

      is there any unique identifier in pythonista i can use to identify devices? im making a game with lan multiplayer and want the sever to remember the device

      cvp 1 Reply Last reply Reply Quote 0
      • JonB
        JonB last edited by

        One approach would be to have the server generate a uuid (using uuid module), then have client store that in the keychain module, or as a file.

        There are also ways to get a device specific uuid, but it is not guaranteed to be persistent.

        1 Reply Last reply Reply Quote 0
        • cvp
          cvp @ellie_ff1493 last edited by cvp

          @ellie_ff1493 perhaps use this

          from objc_util import *
          device = ObjCClass('UIDevice').currentDevice()
          print(device.name())
          

          Édit: if I correctly undersand here, this should be unique per device

          print(device.identifierForVendor())
          
          1 Reply Last reply Reply Quote 1
          • ellie_ff1493
            ellie_ff1493 last edited by

            thx you two, will look in to them

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB Forums | Contributors