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.


    Questions about objc_util

    Pythonista
    3
    5
    3044
    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.
    • chibill
      chibill last edited by

      Okay. I have a few questions. When I look at the examples for using the objc_util once you load the objc class you can use it. But all the times I try to load a class (after loading the needed framework) I can't call any methods till I call .alloc() and then the functions still don't output the expected output. I have even tried calling .init() but that does not help.

      Any idea where I am going wrong. I will attach some code I am trying in a little bit. (At school and have to take a test.)

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

        every objc class is a little different. generally you have to do something like

        obj=ObjCClass('SoMeClass').alloc().init()

        then you can call instance methods on obj. You probably should discuss specifics, which class is giving you trouble?

        1 Reply Last reply Reply Quote 0
        • chibill
          chibill last edited by

          Well I have been trying to use CUTWiFiManager with I can get an instance of just fine. But nothing returns as it should. Most output defaults that don't reflect what the values are. Like a call to .wifiDevice(). At first I believed that was because as it turns out that class is part of apples private framework. I am now trying with ones from the normal framework I will be back in a bit.

          1 Reply Last reply Reply Quote 0
          • chibill
            chibill last edited by

            Okay well it was just my error. Appearantly you can't load the private frameworks and expect them to work. (But you can load them just fine..)

            1 Reply Last reply Reply Quote 0
            • omz
              omz last edited by

              For a lot of private frameworks, the app using them needs special entitlements (part of the code's cryptographic signature) that basically only Apple's own apps (Settings etc.) have.

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