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.


    iAd and in-app purchases

    Pythonista
    pythonista in-app purchase iad xcode appstore
    4
    8
    6551
    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.
    • krizex
      krizex last edited by

      Is it possible to add iAd banners and in-app purchases to app developed in Pythonista?

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

        https://forum.omz-software.com/topic/1109/need-help-with-ads

        Does the addition of objc_util make this possible?

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

          @ccc said:

          https://forum.omz-software.com/topic/1109/need-help-with-ads

          Well, all iAd classes are included in iAd.framework, not the Objective C standard library. Because I tried to run
          ADBanner = objc_util.ObjCClass('ADBannerView')
          And got an error
          "no Objective-C class named 'b'ADBannerView'' found"
          So is there any ways to use this framework classes? Or my problem is in something else?
          (In fact I'm new to objc_util and Objective C at all, so excuse me if I'm asking for something evident or doing silly things))

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

            @krizex Pythonista itself doesn't use the iAd framework, so you'd have to load it first:

            objc_util.load_framework('iAd')
            

            I think this function is undocumented, it's equivalent to:

            objc_util.ObjCClass('NSBundle').bundleWithPath_('/System/Frameworks/iAd.framework').load()
            
            1 Reply Last reply Reply Quote 2
            • krizex
              krizex last edited by

              @omz thank you for feedback, it works now. So, can I integrate this into Scene somehow?

              1 Reply Last reply Reply Quote 0
              • krizex
                krizex last edited by ccc

                Anybody? I think this will be quite useful for developers using pythonista to know, how to use these utilities in their apps, because this is the most used way of making money on apps. I'm not so good in objective-C and pythonista, so any ideas anybody (how to use created ObjCClass of ADBannerView in Scene and how to add in-app purchases)?

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

                  from what I gather, you won't be able to test this in pythonista, since the app was not deployed with iAd, or omz is nit a member of iAds. I tried creating an ADBannerView and adding to a ui.View, and the banner never loaded.

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

                    ADBannerView is now deprecated. https://developer.apple.com/reference/iad

                    Wikipedia says the iAd network shutdown in June 2016 https://en.m.wikipedia.org/wiki/IAd in this Apple announcement https://developer.apple.com/support/iad

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