B4i Library Leadbolt Ads

Discussion in 'iOS Libraries' started by Erel, Dec 1, 2014.

  1. Erel

    Erel Administrator Staff Member Licensed User

    This library allows you to show and play Leadbolt ads.
    You need to first register with Leadbolt: www.leadbolt.com

    To show an ad:
    1. Add this line to disable https limitations:
    Code:
    #PlistExtra:<key>NSAppTransportSecurity</key><dict><key>NSAllowsArbitraryLoads</key><true/></dict>
    2. Initialize LeadBolt object with your key.
    3. Call LoadModuleToCache to load an ad (module should be inapp or video).
    4. Call ShowModule to show a previously loaded ad.

    Monitor the logs for relevant messages.

    Code:
    #PlistExtra:<key>NSAppTransportSecurity</key><dict><key>NSAllowsArbitraryLoads</key><true/></dict>
    Sub Process_Globals
       
    Public App As Application
       
    Public NavControl As NavigationController
       
    Private Page1 As Page

       
    Private lb As Leadbolt
    End Sub

    Private Sub Application_Start (Nav As NavigationController)
       NavControl = Nav
       Page1.Initialize(
    "Page1")
       NavControl.ShowPage(Page1)
       Page1.RootPanel.LoadLayout(
    "1")
       lb.Initialize(
    "lb""xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxbXNCRKiQGgP")
       lb.LoadModuleToCache(
    "inapp")
    End Sub

    Private Sub Page1_Click
       lb.ShowModule(
    "inapp", Page1)
    End Sub

    Private Sub lb_Loaded

    End Sub

    Private Sub lb_Failed

    End Sub

    Private Sub lb_Closed

    End Sub

    Private Sub lb_Clicked

    End Sub

    Private Sub lb_Cached

    End Sub

    Private Sub lb_MediaFinished

    End Sub
    Library installation

    The zip file contains three files with the following extensions: .xml, .a and .h.
    You need to copy the xml file to the internal libraries folder on the Windows computer.
    If you are using a local Mac builder then you need to
    - Copy the .a and .h files to the Mac Libs folder.
    - Download Leadbolt SDK and copy libAppTracker.a to the Mac Libs folder.
     

    Attached Files:

    Last edited: Sep 16, 2015
    luke2012, highflyer and ilan like this.
  2. Erel

    Erel Administrator Staff Member Licensed User

    The source code of this library is attached.
    This is a simple example of wrapping a third party SDK.

    Edit: The updated source is available in post #8.
     
    Last edited: Sep 17, 2015
    JanPRO, gudino jose luis and ilan like this.
  3. fifiddu70

    fifiddu70 Well-Known Member Licensed User

    i try but not see the intersistial, one help?
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Are you using an interstitial key?
     
  5. ilan

    ilan Expert Licensed User

    file: libLeadboltOverlay.a does not exists in the SDK zip.
    i am not able to load any ads...
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    They changed the API. I will release a new library next week.
     
  7. ilan

    ilan Expert Licensed User

    Thank you very much. Could you please include video ads?
     
  8. susu

    susu Well-Known Member Licensed User

    @ilan , AirPush just released wrapper for their iOS SDK, give it a try.
     
  9. ilan

    ilan Expert Licensed User

    but they need tax information, i dont have any...
     
  10. susu

    susu Well-Known Member Licensed User

    Me too. I just fill the form for non-US resident and it's ok.
     
    ilan likes this.
  11. Erel

    Erel Administrator Staff Member Licensed User

    A new version was uploaded to the first post.

    The library Objective C source code is attached.
     

    Attached Files:

    ilan likes this.
  12. Erel

    Erel Administrator Staff Member Licensed User

    A new iLeadbolt.a was uploaded to the first post. The previous one was not compatible with Xcode 6.
     
  13. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

    I need a problem with event in my library:

    In a event of my library started by

    in ObjectiveC (library)
    Code:
    [B4IObjectWrapper raiseEventFromDifferentThread:self :@"_onselected:" :@[pRet];
    in B4i
    Code:
    Sub omyobj_onSelected(ItemName As String)

       hd.ProgressDialogShow(
    "Downloading Messages...")

    EndSub

    Problem: The HUD and TOAST not appear, but if is out of this event the HUD appear normally.

    Obs: The event _onSelected works perfectly
     
  14. Erel

    Erel Administrator Staff Member Licensed User

    How is it related to this thread?
     
  15. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

    Ohh Erel, was resolved this problem...

    I put in callsubdelay and works now, because the my library is still processing..
     
  16. fishwolf

    fishwolf Active Member Licensed User

    I have download last LeadBold sdk (7.0 ver.) i don't find libAppTracker.a file

    i have try to copy framework folder (like admob) but don't compile
     
    Last edited: May 20, 2016
  17. Erel

    Erel Administrator Staff Member Licensed User

    This means that this wrapper is no longer usable. You can send them an email. In the past they did maintain a library for B4i.
     
  18. fishwolf

    fishwolf Active Member Licensed User

    i have write them, but they haven't a b4i library (only b4a).

    can you post here the libAppTracker.a compatible with iLeadbolt library b4i (Ver.1.32 with last b4i Ver. 2.51)
    I have a mac builder, i suppose the remote builder work fine.

    Or update iLeadbolt library b4i to last sdk, 7.0 support also the native.

    Thanks
     
  19. Erel

    Erel Administrator Staff Member Licensed User

  20. fishwolf

    fishwolf Active Member Licensed User

    Sorry....

    Now i can compile, but if i run the example with my LeadBolt key, i have this error

    Code:
    Copying updated assets files (1)
    Application_Start
    Error occurred on line: 
    29 (Main)
    +[AppTracker loadModuleToCache:]: unrecognized selector sent 
    to class 0xba1c0
    Stack Trace: (
      CoreFoundation       <redacted> + 
    150
      libobjc.A.dylib      objc_exception_throw + 
    38
      CoreFoundation       <redacted> + 
    0
      CoreFoundation       <redacted> + 
    702
      CoreFoundation       _CF_forwarding_prep_0 + 
    24
      B4i Example          -[b4i_main _application_start:] + 
    2004
      CoreFoundation       <redacted> + 
    68
      CoreFoundation       <redacted> + 
    292
      B4i Example          +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 
    1786
      B4i Example          -[B4IShell runMethod:] + 
    574
     B4i Example          -[B4IShell raiseEventImpl:method:args::] + 
    2212
     B4i Example          -[B4IShellBI raiseEvent:
    event:params:] + 1442
     B4i Example          __
    33-[B4I raiseUIEvent:event:params:]_block_invoke + 74
     libdispatch.dylib    <redacted> + 
    10
     libdispatch.dylib    <redacted> + 
    22
     libdispatch.dylib    _dispatch_main_queue_callback_4CF + 
    1532
     CoreFoundation       <redacted> + 
    8
     CoreFoundation       <redacted> + 
    1590
     CoreFoundation       CFRunLoopRunSpecific + 
    516
     CoreFoundation       CFRunLoopRunInMode + 
    108
     GraphicsServices     GSEventRunModal + 
    160
     UIKit                UIApplicationMain + 
    144
     B4i Example          main + 
    108
     libdyld.dylib        <redacted> + 
    2
    )
    Application_Active
     
Loading...
  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