B4i Library iAdMob

Status
Not open for further replies.

Pendrush

Well-Known Member
Licensed User
Longtime User
Just tried, you are right. Unzipping on Mac solve the problem. Thank you.
 

Jack Cole

Well-Known Member
Licensed User
Longtime User
On a PC with Windows 8, I'm using the hosted builder. I did update the iAdmob library to the latest version, but that didn't help. Any ideas?

B4X:
Ld Payload/Minesweeper.app/Minesweeper normal armv7
    cd /Users/administrator/Documents/UploadedProjects/art2huz
    export IPHONEOS_DEPLOYMENT_TARGET=7.0
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk -L/Users/administrator/Documents/UploadedProjects/art2huz/Payload -L../../Libs -F/Users/administrator/Documents/UploadedProjects/art2huz/Payload -F../../Libs -filelist /Users/administrator/Documents/UploadedProjects/art2huz/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/Minesweeper.LinkFileList -ObjC -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=7.0 -lCore -framework Foundation -framework CoreGraphics -framework UIKit -liHttp -liSQL -liAdMob -liJSON -framework AVFoundation -lsqlite3 -framework AudioToolbox -framework AdSupport -framework CoreGraphics -framework CoreTelephony -framework EventKit -framework EventKitUI -framework MessageUI -framework StoreKit -framework SystemConfiguration -lGoogleAdMobAds -framework GoogleMobileAds -liDebug -Xlinker -dependency_info -Xlinker /Users/administrator/Documents/UploadedProjects/art2huz/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/Minesweeper_dependency_info.dat -o /Users/administrator/Documents/UploadedProjects/art2huz/Payload/Minesweeper.app/Minesweeper
ld: library not found for -lGoogleAdMobAds
clang: error: linker command failed with exit code 1 (use -v to see invocation)


Error: ** BUILD FAILED **


The following build commands failed:
    Ld Payload/Minesweeper.app/Minesweeper normal armv7
(1 failure)
 

susu

Well-Known Member
Licensed User
Longtime User
I'm using iAdMob v1.2 and hosted builder. I got this error when try to load ad:

<Google:HTML> You are currently using version 7.0.0 of the SDK. Please consider updating your SDK to the most recent sdk version to get the latest features and bug fixes. The latest SDK can be downloaded from http://goo.gl/iGzfsP. A full list of release notes is available at https://developers.google.com/mobile-ads-sdk/docs/admob/ios/rel-notes

Do I need to wait for @Erel to update the SDK?
 

susu

Well-Known Member
Licensed User
Longtime User
@Erel I'm waiting for updated lib to publish my app. Thank you.
 

salvadoro

Member
Licensed User
Longtime User
Hi i'm already copy libGoogleAdMobAds.a to the libs directory, but i get this error:

ld: framework not found GoogleMobileAds

i'm using B4i v2 and macserverv2

Regards,

Salvador.
 

ilan

Expert
Licensed User
Longtime User
B4X:
Sub Process_Globals
   Dim adview1 As AdView
End Sub

'...

Private Sub Application_Start (Nav As NavigationController)
'...
    adview1.Initialize("Ad","ca-app-pub-xxxxx",Page1, adview1.SIZE_SMART_BANNER_PORTRAIT)
    adview1.LoadAd 
End Sub

Private Sub Page1_Resize(Width As Int, Height As Int)
        Dim height As Int = 50
        Page1.RootPanel.AddView(adview1, 0,Page1.RootPanel.height-height, Page1.RootPanel.Width, height)
        adview1.BringToFront
End Sub
'...
 
Last edited by a moderator:

abhishek007p

Active Member
Licensed User
Longtime User
ReceiveAd event was fired but no Ad was displayed. i found the problem and fixed it, ads was appearing but outside the screen area. so we have resize the adview in the page resize event.

there is a difference of 64px in the height of page if we get the value outside of page resize event. (strange)

B4X:
Private Sub Page1_Resize(Width As Int, Height As Int)
    If AdView1.IsInitialized = True Then
        AdView1.SetLayoutAnimated(0, 1, 0, 100%y - GetAdHeight, 100%x, GetAdHeight)
    End If
End Sub

Here is how to get the device ID:
First run the code using any dummy text as publisher id, it will produce an error but shows the device id in log like this.
<Google> To get test ads on this device, call: request.testDevices = @[ @"<DeviceID>" ];

Copy the Device ID and get sample publisher ID from links below.
https://developers.google.com/admob/ios/quick-start
 
Last edited:

abhishek007p

Active Member
Licensed User
Longtime User
Image 1 - Test Banner Ads 50px height


Image 2 - Test Banner 200px height ad (non standard height)


Image 3 - ilan's pub id, banner ad 32px height


Image 4 - Test Interstitial Ads


All Test Done using B4I 1.80 and AdMob 1.21
 
Last edited:

ilan

Expert
Licensed User
Longtime User
yes you are right, i copy/past the part from page resize sub to app start sub... sorry
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…