Giter Site home page Giter Site logo

prebid-mobile-ios's Introduction

Build Status

Prebid Mobile iOS SDK

To work with Prebid Mobile, you will need accesss to a Prebid Server. See this page for options.

Use Cocoapods?

Easily include the Prebid Mobile SDK for your primary ad server in your Podfile/

platform :ios, '11.0'

target 'MyAmazingApp' do 
    pod 'PrebidMobile'
end

Build framework from source

Build Prebid Mobile from source code. After cloning the repo, from the root directory run

./scripts/buildPrebidMobile.sh

to output the Prebid Mobile framework.

Test Prebid Mobile

Run the test script to run unit tests and integration tests.

./scripts/testPrebidMobile.sh

Carthage

2.2.3 version is available to build PrebidMobile with Carthage. For that, please, put the following content to your Cartfile:

github "prebid/prebid-mobile-ios" == 2.2.3-carthage

Run this command in order to build PrebidMobile with Carthage:

carthage update --use-xcframeworks --platform ios

Note that PrebidMobileGAMEventHandlers, PrebidMobileAdMobAdapters, PrebidMobileMAXAdapters are not available to build with Carthage.

prebid-mobile-ios's People

Contributors

abrahamarmascordero avatar aifigueiredo avatar ankit-thanekar007 avatar asharmaa avatar avermaios avatar avohraa avatar bretg avatar bszekely1 avatar eros902002 avatar huanzhinb avatar jovencinho avatar jsligh avatar kowshickkarthick avatar macmark avatar makspetrukhnopi avatar marcelklinek avatar matrad avatar nhedley avatar olenapostindustria avatar ppuviarasu avatar qkzhu avatar randeepsiddhu avatar sandraleon avatar shinwan2 avatar ton-impalastudios avatar vadimkhohlovopenx avatar weibel avatar willychenchen avatar yoalex5 avatar yuriyvelichkopi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

prebid-mobile-ios's Issues

New release - 5.2.3

Hi @ppuviarasu , can we please make a new release to have the current fix available on cocoapods?
All is ready for the new version 5.2.3 as pushed in the commit:
b47e2ff

Thanks,

ios Bundle field should be itunes id

The current bundle pass to prebid server is the bundleIdentifier. It is all good for android however for iOS as stated in the openRTB doc, the bundle should be the itunes ID.

There are 2 potentials ways of solve this:

  • on prebid server by adding the correct bundle in the store request but won’t be correct as it will replace both ios or android -> NOK
  • in the prebid SDK (iOS) by either hardcoding the bundle with itunes id (means the app should have been push at least one) or getting it with an api call (http://itunes.apple.com/lookup?bundleId=)

I think hardcode is the best solution as I would like to avoid any loop and call to a the itunes Api.
@mjacobsonny what is your tough about it?
We could create prebidMobile.bundle = "AppStoreId"

Device pixel ratio support

Device pixel ratio is used by DSPs to respond with ads that will render properly due to the variety of mobile devices and screen capabilities.

0.3 does not build on Xcode 10 beta (10L176w)

hey @ppuviarasu

Can you please take a look at the error that I'm receiving while compiling 0.3 with Xcode 10 beta (10L176w)? Seems to be an issue with the new Xcode 10 build system.

error: Multiple commands produce '/.../Debug-iphoneos/PrebidMobile/PrebidMobile.framework/Headers/PrebidMobile-umbrella.h':
1) Target 'PrebidMobile' has copy command from '/.../Pods/PrebidMobile/sdk/PrebidMobile/PrebidMobile-umbrella.h' to '/.../Developer/Xcode/DerivedData/xxx-biwlmbnzlziimjdmmfuhrsqpkfic/Build/Products/Debug-iphoneos/PrebidMobile/PrebidMobile.framework/Headers/PrebidMobile-umbrella.h'
2) Target 'PrebidMobile' has copy command from '/.../Pods/Target Support Files/PrebidMobile/PrebidMobile-umbrella.h' to '/.../Developer/Xcode/DerivedData/xxx-biwlmbnzlziimjdmmfuhrsqpkfic/Build/Products/Debug-iphoneos/PrebidMobile/PrebidMobile.framework/Headers/PrebidMobile-umbrella.h'

Thanks

Server response is flaky

I'm trying to integrate this SDK into a black project.
The setup is pretty straightforward:
On the AppDelegate

PBLogManager.setPBLogLevel(.all)
        let adUnit = PBBannerAdUnit(adUnitIdentifier: "PREBID-MOBILE-SLOT-ID", andConfigId: "7486dd91-d6fc-4622-a7b9-**************")
        adUnit.add(kGADAdSizeMediumRectangle.size)
        PrebidMobile.register([adUnit], withAccountId: "bc1eac66-845e-4d8b-a274-************", with: PBServerHost.appNexus, andPrimaryAdServer: PBPrimaryAdServerType.DFP)

then when I need one ad:

        PrebidMobile.setBidKeywordsOnAdObject(bannerView,
                                              withAdUnitId: "PREBID-MOBILE-SLOT-ID",
                                              withTimeout: 10000) {

                                                  // add all the keys to the DFP 
                                                  bannerView.load(request)
}

The issue I'm finding is that I never get any winner bidder from the API response.

The response looks always like:

{
	"id": "0155E2E1-B2D5-4DE8-BF97-014CBBBAF640",
	"ext": {
		"responsetimemillis": {
			"appnexus": 140,
			"rubicon": 153
		},
		"tmaxrequest": 500
	}
}

Only once or twice in the previous days I was able to see some winner, can this be a client side integration problem?

thanks

Prebid SDK 0.3 using unexpected SDK version string in requests to server

We noticed that the data sent from SDK v0.3.0 to the server is containing unexpected SDK version string.

e.g. In requests to
https://prebid.adnxs.com/pbs/v1/openrtb2/auction

"app": { "bundle": "ch.mycompany.myapp", "ext": { "prebid": { "version": "0.2.1", "source": "prebid-mobile" } }, "publisher": { "id": "b7adad2c-e042-4126-8ca1-b3caac7d3e5c" }, "ver": "1.0" },

Seems like it should use "version": "0.3" instead of "version": "0.2.1"

Problem with setting bid keywords on DFP Interstitial

I tried the demo app for DFP Interstitial. I succeed at registering ad units. But when I set bid keywords on ad object after and call loadRequest, I had a persistent error.

[PrebidMobile setBidKeywordsOnAdObject:self.dfpInterstitial withAdUnitId:kAdUnit2Id withTimeout:600 completionHandler:^{ [self.dfpInterstitial loadRequest:[DFPRequest request]]; }];

Then using DFP Troubleshoot, I found that request key values are always empty. So I resolved it by setting a custom targeting to DFPRequest:

DFPRequest *request = [DFPRequest request];
PBAdUnit *__nullable adUnit = [[PBBidManager sharedInstance] adUnitByIdentifier:kAdUnit];
[request setCustomTargeting:[[PBBidManager sharedInstance] keywordsForWinningBidForAdUnit:adUnit]];
[self.dfpInterstitial loadRequest:request];

According to the documentation I should use setBidKeywordsOnAdObject method for setting keywords. Could you explain what is my problem?

crash in prebid v0.1.0

When we send our app build with the prebid library 0.1.0 in background and open it again we get the following crash.

Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0x183dffd38 __exceptionPreprocess
1  libobjc.A.dylib                0x183314528 objc_exception_throw
2  CoreFoundation                 0x183d98c44 _CFArgv
3  CoreFoundation                 0x183ceb074 -[__NSDictionaryM removeObjectForKey:]
4  promiflash                     0x1003b5de4 -[PBBidManager startNewAuction:] (PBBidManager.m:210)
5  promiflash                     0x1003b52dc -[PBBidManager keywordsForWinningBidForAdUnit:] (PBBidManager.m:118)
6  promiflash                     0x1003b3d34 -[NSObject(Prebid) pb_requestParameters] (NSObject+Prebid.m:85)
7  promiflash                     0x1001460f4 GADCategories_GADSDKCoreController_ActiveViewUnloadCache
8  libdispatch.dylib              0x183785088 _dispatch_call_block_and_release
9  libdispatch.dylib              0x183785048 _dispatch_client_callout
10 libdispatch.dylib              0x183791b74 _dispatch_main_queue_callback_4CF$VARIANT$mp
11 CoreFoundation                 0x183da7f20 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
12 CoreFoundation                 0x183da5afc __CFRunLoopRun
13 CoreFoundation                 0x183cc62d8 CFRunLoopRunSpecific
14 GraphicsServices               0x185b57f84 GSEventRunModal
15 UIKit                          0x18d273880 UIApplicationMain
16 promiflash                     0x1000a2c00 main (main.m:16)
17 libdyld.dylib                  0x1837ea56c start

0.4 not building due to non-public file remains

Issue 73 from 0.3 remains on 0.4.

The issue is compile error for 'PBServerRequestBuilder.h' file not found

How to replicate the issue:

  • Created a new Swift project with pod file:
target 'PrebidTest' do
  use_frameworks!
  pod 'PrebidMobile'
end
  • Import PrebidMobile in any of you Swift file: import PrebidMobile and build.

The cause

It cased by including PBServerRequestBuilder.h in umbrella header while it's not public access.

Temporary manual fix

After pod install, change PBServerRequestBuilder.h to public access.

Suggest fix

Maybe you can remove #import "PBServerRequestBuilder.h" from umbrella file as PBServerRequestBuilder seems to be only used internally.

Example app's MoPub ads render oddly

The MoPub banner and interstitial ads don't render in the center of the ad view the way the DFP ads do. See attached screenshots for details.

screen shot 2017-07-12 at 4 33 46 pm
screen shot 2017-07-12 at 4 33 55 pm

Crash in v0.0.3

You are looping over an array in your library while at the same time updating it on another threat thread. We ran into this in production and now have to deal with massive crashes thanks to this lib -.-

Crashed: NSOperationQueue 0x174a24820 :: NSOperation 0x170e5ba50 (QOS: DEFAULT)
0  libobjc.A.dylib                0x184bf4150 objc_msgSend + 16
1  CoreFoundation                 0x18605b45c -[__NSCFString isEqual:] + 56
2  CoreFoundation                 0x18607512c -[NSMutableArray removeObject:] + 152
3  promiflash                     0x1003f798c -[PBServerFetcher processData:] (PBServerFetcher.m:88)
4  promiflash                     0x1003f753c __56-[PBServerFetcher makeBidRequest:withCompletionHandler:]_block_invoke (PBServerFetcher.m:56)
5  CFNetwork                      0x186868780 __67+[NSURLConnection sendAsynchronousRequest:queue:completionHandler:]_block_invoke_2 + 180
6  Foundation                     0x186c4e854 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 16
7  Foundation                     0x186b937b0 -[NSBlockOperation main] + 96
8  Foundation                     0x186b83b68 -[__NSOperationInternal _start:] + 612
9  Foundation                     0x186c50bf0 __NSOQSchedule_f + 228
10 libdispatch.dylib              0x1850369a0 _dispatch_client_callout + 16
11 libdispatch.dylib              0x185044ad4 _dispatch_queue_serial_drain + 928
12 libdispatch.dylib              0x18503a2cc _dispatch_queue_invoke + 884
13 libdispatch.dylib              0x185046a50 _dispatch_root_queue_drain + 540
14 libdispatch.dylib              0x1850467d0 _dispatch_worker_thread3 + 124
15 libsystem_pthread.dylib        0x18523f100 _pthread_wqthread + 1096
16 libsystem_pthread.dylib        0x18523ecac start_wqthread + 4

Build warnings (OS X 10.11.6, Xcode 8.0 [8A218a])

These may just be due to not running the latest OS X and Xcode, so let me know if so!

The warnings are under Target Integrity and Dependency Analysis, and they're the same warning:

"iOS deployment target '10.2' for architecture 'x86_64' and variant 'normal' is greater than the maximum value '10.0.99' for the Simulator - iOS 10.0 SDK."

I got another warning about missing the IPA file, but I think that's because of #2 .

Client API behavior

Current version of API requires two steps for successful integration:

  1. Create a global variable to BannerAdUnit
  2. Do not forget to call bannerAdUnit.stopAutoRefresh()

Lets review corner cases

  1. A client forgot to create a variable to BannerAdUnit.
    =>
    1.1 As a result auto-refresh feature does not work
    1.2 A reference cycle Dispatcher <-> Timer
  2. A client made a global variable to BannerAdUnit but forgot to call bannerAdUnit.stopAutoRefresh()
    =>
    2.1 A reference cycle Dispatcher <-> Timer (the same as 1.2)

Support Adform Advertising in-app SDK with Prebid

We need to have the possibility to deliver ads via Prebid when it is integrated into Adform Advertising in-app SDK. Currently it is not possible to deliver inline ads through prebid and Adform SDK and issues cannot be solved by utilizing already existing adapters of DFP and MoPub.

#107

404 errors noticed in server communication

We such network calls invoked by the prebid SDK 0.3:

Example request:
GET /pbc/v1/cache?uuid=EDE22F50-5F9A-48C8-B5B6-93C69D638C48 HTTP/1.1 Host: prebid.adnxs.com Origin: https://pubads.g.doubleclick.net Connection: keep-alive Accept: */* User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15F79;native-20minDE;app-ios-smartphone-1

Respective Response:
`HTTP/1.1 404 Not Found
Server: nginx/1.11.10
Date: Tue, 19 Jun 2018 11:46:12 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 64
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: https://pubads.g.doubleclick.net
Vary: Origin
X-Content-Type-Options: nosniff
X-Rate-Limit-Duration: 1s
X-Rate-Limit-Limit: 100
X-Rate-Limit-Request-Forwarded-For: 185.9.18.84
X-Rate-Limit-Request-Remote-Addr: 172.16.91.0:49026
Connection: keep-alive

No content stored for uuid=EDE22F50-5F9A-48C8-B5B6-93C69D638C48`

The question now is, are such 404 server errors intended?
Are cache misses intentionally returned as 404 errors or does this require adjustments on either SDK or server side?

Memory leaks found II

As we mentioned in #50 the memory leaks are still reproducible.
Since the issue #50 won't be reopened anymore, lets use this issue here then instead.

Leaks instrument reports memory leaks related to Prebid SDK code. See below for stack traces.
Can these leaks be fixed?

Stack traces from 0.3.0: prebid-leaks-0.3.0.txt

Intent to Implement -- Prebid Mobile 1.0 (iOS)

Background

Prebid Mobile SDKs for iOS and Android were released to GitHub in August 2017 with the intention of providing an end-to-end open-source header bidding solution for mobile app publishers. Over a year of alpha testing, we have worked closely with early adopters to understand major friction points, gaps in understanding, design flaws, and areas for improvement.

Observations from the Past Year

  • It is taking publishers far too long to integrate Prebid Mobile
  • Prebid Mobile has suffered from stability issues
  • The ad unit creation/ registration/ bid keyword association workflow is too complicated, and is difficult to implement correctly
  • Interstitial ad units in Prebid Mobile do not work the way that publishers expect
  • When experiencing issues during implementation, publishers are unable to troubleshoot them effectively

Goals

  • Simplify Prebid Mobile implementation workflow for publishers
  • Eliminate inconsistencies between the iOS and Android SDK APIs
  • Eliminate inconsistencies between DFP and MoPub ad server behavior
  • Eliminate "secret" backend processes which cause publisher confusion and unexpected behavior
  • Eliminate Prebid Mobile stability issues and reduce Prebid Mobile bug index

Proposed Design

Global Settings

Global settings will be associated with a PrebidMobile object.

  • setPrebidServerHost
    Define the Prebid Server host with which Prebid Mobile will communicate. Choose from system-defined Prebid Server hosts or define your own custom Prebid Server host.

  • setPrebidServerAccountId
    Define the Prebid Server account ID provided by your Prebid Server host.

  • setShareGeoLocation
    Boolean flag. If this flag is True AND the app collects the user's geographical location data, Prebid Mobile will send the user's geographical location data to Prebid Server. If this flag is False OR the app does not collect the user's geographical location data, Prebid Mobile will not populate any user geographical location information in the call to Prebid Server.

  • setApplicationContext
    For Android only. Prebid Mobile will use the application context to retrieve metadata needed for targeting such as user agent, location, device information, connectivity information, etc.

Android Example

PrebidMobile.setPrebidServerHost(Prebid.Host.APPNEXUS);
PrebidMobile.setPrebidServerAccountId("PREBID_SERVER_ACCOUNT_ID");
PrebidMobile.setShareGeoLocation(true);
PrebidMobile.setApplicationContext(getApplicationContext());

iOS Example

let prebidMobile = PrebidMobile()
prebidMobile.prebidServerAccountId = "PREBID_SERVER_ACCOUNT_ID"
prebidMobile.prebidServerHost = Host.appnexus
prebidMobile.shareGeoLocation = true

Banner Ad Unit

  • BannerAdUnit
    Create a new Banner Ad Unit associated with a Prebid Server configuration ID and a banner size (width and height).

  • addAdditionalSize
    Add an additional banner size to the Prebid Mobile ad unit. Banner ad units must be associated with one or more sizes.

  • fetchDemand
    Trigger a call to Prebid Server to retrieve demand for this Prebid Mobile ad unit.

  • addUserKeyword
    Add a key-value pair to a given Prebid Mobile ad unit. One key may correspond to one or more values.

  • removeUserKeyword
    Remove a key and all its associated values from a given Prebid Mobile ad unit.

  • clearUserKeywords
    Remove all keys and all values from a given Prebid Mobile ad unit.

  • setAutoRefreshMillis
    If set on a given Prebid Mobile ad unit, the fetchDemand function will be called every periodMillis until stopAutoRefresh is called. Each call to fetchDemand will invoke the onComplete function.

  • stopAutoRefresh
    Halts the auto-refresh behavior for a given Prebid Mobile ad unit. If no auto-refresh behavior has been set, stopAutoRefresh will be ignored.

Android Example

PublisherAdView dfpAdView = new PublisherAdView(context);
dfpAdView.setAdUnitId("/12345/foo");
dfpAdView.setAdSizes(new AdSize(300, 250));
final PublisherAdRequest.Builder builder = new PublisherAdRequest.Builder();
final PublisherAdRequest request = builder.build();

BannerAdUnit bannerAdUnit = new BannerAdUnit("PREBID_SERVER_CONFIGURATION_ID", 300, 250);
bannerAdUnit.addUserKeyword("my_key", "my_value");
bannerAdUnit.fetchDemand(request, new onCompleteListener() {
    @Override
    public void onComplete(ResultCode resultCode) {
        dfpAdView.loadAd(request);
    }
});

iOS Example

var dfpBannerView = DFPBannerView(adSize: GADAdSizeFromCGSize(CGSize(width: 300, height: 250)))
dfpBannerView.adUnitID = "/12345/foo"
dfpBannerView.rootViewController = self;
dfpBannerView.delegate = self

let bannerAdUnit = BannerAdUnit(configId: "PREBID_SERVER_CONFIGURATION_ID", size: CGSize(width: 300, height: 250))
bannerAdUnit.addUserKeyword(key: "my_key", value: "my_value")
bannerAdUnit.fetchDemand(adObject: dfpBannerView) { (resultCode) in
        //Load the dfp request
        dfpBannerView.load(GADRequest())
}

Interstitial Ad Unit

  • InterstitialAdUnit
    Create a new Interstitial Ad Unit associated with a Prebid Server configuration ID.

  • fetchDemand
    Trigger a call to Prebid Server to retrieve demand for this Prebid Mobile ad unit.

  • addUserKeyword
    Add a key-value pair to a given Prebid Mobile ad unit. One key may correspond to one or more values.

  • removeUserKeyword
    Remove a key and all its associated values from a given Prebid Mobile ad unit.

  • clearUserKeywords
    Remove all keys and all values from a given Prebid Mobile ad unit.

  • setAutoRefreshMillis
    If set on a given Prebid Mobile ad unit, the fetchDemand function will be called every periodMillis until stopAutoRefresh is called. Each call to fetchDemand will invoke the onComplete function.

  • stopAutoRefresh
    Halts the auto-refresh behavior for a given Prebid Mobile ad unit. If no auto-refresh behavior has been set, stopAutoRefresh will be ignored.

Android Example

InterstitialAdUnit interstitialAdUnit = new InterstitialAdUnit("PREBID_SERVER_CONFIGURATION_ID");
interstitialAdUnit.addUserKeyword("my_key", "my_value");
interstitialAdUnit.fetchDemand(publisherAdRequest, new onCompleteListener() {
    @Override
    public void onComplete(ResultCode resultCode) {
        dfpInterstitial.loadAd(publisherAdRequest);
    }
});

iOS Example

let dfpInterstitialView = DFPInterstitial(adUnitID: "/12345/foo")
dfpInterstitialView.delegate = self
 
let interstitialAdUnit = InterstitialAdUnit(configId: "PREBID_SERVER_CONFIGURATION_ID")
interstitialAdUnit.addUserKeyword(key: "my_key", value: "my_value")
interstitialAdUnit.fetchDemand(adObject: dfpInterstitialView) { (resultCode) in
         //Load the dfp request
        interstitialAdUnit.load(GADRequest())
}

Result Codes

  • Success
    Prebid Mobile received at least one valid bid from Prebid Server and successfully associated Prebid key-values with the appropriate ad server request.

  • Prebid Server Error
    General result code for an unknown error returned from Prebid Server. The actual Prebid Server error message will be exposed to the developer.

  • Invalid account ID
    Prebid Server did not recognize the account ID.

  • Invalid configuration ID
    Prebid Server did not recognize the configuration ID.

  • Invalid size
    Attempted to add an invalid size to a banner ad unit.

  • Network error
    Request to Prebid Server resulted in a network error.

  • Timeout
    Request to Prebid Server resulted in a timeout.

  • No bids
    Prebid Server responded without returning any valid bids.

  • Empty host URL
    Attempted to define a custom Prebid Server host without providing a host URL.

  • Invalid ad object
    Ad object passed to fetchDemand is not supported.

Global Targeting Parameters

Prebid Mobile will support the following global targeting parameters. These targeting parameters are set only once and apply to all Prebid Mobile ad units. They do not change for a given user session.

Global User Targeting

  • Year of birth
  • Gender

Global Application Targeting

  • Bundle ID
  • Domain
  • Store URL

Global GDPR Targeting

  • Flag to indicate if the user is subject to GDPR
  • GDPR consent string

bid requests by default set the user gender to "F"

According to the logs bid requests by default set the user gender to F. I believe the default should be O for unknown.

Easily fixed by setting [[PBTargetingParams sharedInstance] setGender:PBTargetingParamsGenderUnknown]; however based on the docs I'd expect this to be the default.

How Prebid is working internally ?

As I am implementing Prebid SDK in my app. Before this we were also showing ad so We were already using DFPBannerView . So just want to understand in implemetation we just set up sdk in Appdelegate after that I didn't find any call back from prebid side which It give us after getting the winning bid. Rather it simply load request

self.banner.load(GADRequest())

and there is no such call back while It provide call back in android.Please advise on this.

Build issue on travis-ci with 0.3

I'm trying to upgrade to 0.3. I'm having an issue with getting this pod to build on travis-ci.

Warning: Multiple build commands for output file /Users/travis/Library/Developer/Xcode/DerivedData/epxvguudllrmhdayahonuxcmvthc/Build/Products/Debug-iphonesimulator/PrebidMobile/PrebidMobile.framework/Headers/PrebidMobile-umbrella.h

I see a similar warning locally, however it still builds. In the pod, it looks like there are two PrebidMobile-umbrella.h files, one in the root and one under Supporting Files.

On travis-ci it throws the warning then fails to build with the following. It's possible it is something specific to my setup in which case you can ignore this, however I'm posting in case this does sound familiar and is something wrong with the pod itself. Thanks!

<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/PrebidMobile-umbrella.h"
        ^
/Users/travis/Library/Developer/Xcode/DerivedData/epxvguudllrmhdayahonuxcmvthc/Build/Products/Debug-iphonesimulator/PrebidMobile/PrebidMobile.framework/Headers/PrebidMobile-umbrella.h:14:9: error: 'PBServerRequestBuilder.h' file not found
#import "PBServerRequestBuilder.h"
        ^
/Users/travis/build/SDMopubAdView.swift:11:8: error: could not build Objective-C module 'PrebidMobile'
import PrebidMobile

Error when trying to get latest PrebidMobile SDK

Installing PrebidMobile 0.3 (was 0.1.1 and source changed to `https://github.com/CocoaPods/Specs.git` from `https://github.com/cocoapods/specs.git`)

[!] Error installing PrebidMobile
[!] /usr/bin/git clone https://github.com/prebid/prebid-mobile-ios.git /var/folders/6j/dj7s5j716nbd_v09v3cl6_nm0000gn/T/d20180517-34803-1qt9lgl --template= --single-branch --depth 1 --branch 0.3

Cloning into '/var/folders/6j/dj7s5j716nbd_v09v3cl6_nm0000gn/T/d20180517-34803-1qt9lgl'...
warning: Could not find remote branch 0.3 to clone.
fatal: Remote branch 0.3 not found in upstream origin

Seems there is no branch 0.3?

MoPub Banner & Interstitial Ads Not Rendering Properly in iOS Demo

Downloaded the iOS Demo App.

Tried to render an ad from "MoPub + Banner" & "MoPub + Interstitial" combinations, but the ads are not displaying properly as using the DFP ad server:

  • MoPub Banner,

screen shot 2018-03-22 at 5 21 33 pm

  • MoPub Interstitial,

screen shot 2018-03-22 at 5 22 11 pm

Whereas DFP ones are working as expected:

  • DFP Banner,

screen shot 2018-03-22 at 5 23 29 pm

  • DFP Interstitial,

screen shot 2018-03-22 at 5 23 41 pm

Add RubiconProject account to tests

There are a lot of integration/end-to-end tests that have checks based on AppNexus's stubbed responses(e.g. comparing key/value mapping) or verify AppNexus's mocked behaviors (e.g. PBS response codes)

Add prebid server host option in SDK

Instead of defaulting to AppNexus' hosted version of prebid server, we want to give the devs an option of using another prebid server host, such as Rubicon's.

0.3 not building due to non-public file

hi @ppuviarasu !

on 0.3 PBServerRequestBuilder.h was made public but it can't be found when pulling in the project as a pod. After a bit more digging, turns out that the imported pod project has PBServerRequestBuilder.h set to project scope.
I think since PBServerRequestBuilder.h is referencing PBAdUnit.h which was not changed from public to project, PBServerRequestBuilder.h can't be public and therefore is set to project when used with cocoapods.
Can we roll back the PBAdUnit.h access change and make it public again?

thanks

Server error

I was receiving a server error which read: Invalid request format: request.imp[0].ext contains unknown bidder: districtm. Did you forget an alias in request.ext.prebid.aliases?

In order to get around this error, I had to manually go into PBServerRequestBuilder.m and uncomment the section //to be used when openRTB doesnt support storedRequests and comment out the section where it does support requests. This occurs in the method - (NSArray *)openrtbImpsFromAdUnits:(NSArray<PBAdUnit *> *)adUnits withSecureSettings:(BOOL) isSecure

please help make this easier and not so hack-y

[API 1.0] [DFP] Interstitial ad is not rendered properly

Reproduction route: run PrebidDemo -> DFP -> Simple Interstitial
Expected result: rendered ad
Actual result: "Prebid Line Items Didn't Serve."
Cause: Keys/Values from PrebidServer response are not passed to DFP ad request

img_609ed0a3759e-1

screen shot 2019-03-04 at 3 50 23 pm

[API 1.0] [MoPub] Banner ad is not rendered properly

Reproduction route: run PrebidDemo -> MoPub -> Simple Banner
Expected result: rendered ad
Actual result: "Hello, I'm not a Prebid ad."
Cause: Keys/Values from PrebidServer response are not passed to MoPub ad request

img_5d4580aca730-1

screen shot 2019-03-04 at 1 30 50 pm

Example app fails to serve video ads

The following ad types in the example app in the iPhone 5 simulator (running 10.0) fail to serve:

  • DFP Video 300x250: blank screen, and no call/response output in Xcode

  • MoPub Video 300x250: blank screen, and no call/response output in Xcode

Memory leaks found III

Hello team,

We checked our app for leaks and Instruments reported some leaks in

[PrebidMobile setBidKeywordsOnAdObject: withAdUnitId: withTimeout: completionHandler:]
method.
Here is the stack trace:

  0 libsystem_malloc.dylib malloc_zone_malloc
  1 libsystem_malloc.dylib malloc
  2 libsystem_blocks.dylib _Block_copy
  3 App_Name +[PrebidMobile setBidKeywordsOnAdObject:withAdUnitId:withTimeout:completionHandler:] /path/Pods/PrebidMobile/sdk/PrebidMobile/PrebidMobile.m:47
   ....
  11 UIKit -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:]
  12 UIKit -[UITableView _createPreparedCellForGlobalRow:willDisplay:]
  13 UIKit -[UITableView _updateVisibleCellsNow:isRecursive:]
  14 UIKit -[UITableView layoutSubviews]
  15 UIKit -[UIView(CALayerDelegate) layoutSublayersOfLayer:]
  16 QuartzCore -[CALayer layoutSublayers]
  17 QuartzCore CA::Layer::layout_if_needed(CA::Transaction*)
  18 QuartzCore CA::Context::commit_transaction(CA::Transaction*)
  19 QuartzCore CA::Transaction::commit()
  20 UIKit _UIApplicationFlushRunLoopCATransactionIfTooLate
  21 UIKit __handleEventQueueInternal
  22 UIKit __handleEventQueueInternal
  23 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
  24 CoreFoundation __CFRunLoopDoSources0
  25 CoreFoundation __CFRunLoopRun
  26 CoreFoundation CFRunLoopRunSpecific
  27 GraphicsServices GSEventRunModal
  28 UIKit UIApplicationMain
  29 20 Minuten Deutsch IMA main /path/main.m:14
  30 libdyld.dylib start

What can be done to avoid such leaks?

Local Cache storage issue + React native crash

Hi team,

There are a few issues with current iOS code:
1- no possibility to use the local caching instead of server caching
2- when forcing and testing local caching, many time KV are passed but not line items is displayed as the local storage hasn't cache the creative when the line is trying to call it.
3- High % of crash in React as the UA is relying on having main thread active which is not the case with react native.
4- WebView is being deprecated and some alert has raised (future issue as still supported in ios12)

Here is the PR with all the fix for the 3 third points.

#102

This issue has been flagged with Appnexus for a long time and we may force to create our own version as several clients are impacted or blocked because of it...

@mjacobsonny and @ppuviarasu , can you please have a look and review it.

Thanks,

Inventoy Keywords are not present

When looking at the current adUnit api there is a method addUserKeyword (or addUserKeywords) to pass the user targeting to Prebid Server that will passed it to the different bidder as user.keywords

Prebid server is also built to pass inventory keyword to bidder as app.keywords (or site.keywords). However the method in not present in the current adUnit class.

I have run some test with curl and appending the app.keywords and all is working fine, the key value are being passed to Appnexus and Rubicon. So we only need to add the method.

This is important as some publishers want to use inventory targeting to classify their config.

Do notice that it is part of the PR: 164 that I have proposed.

@mjacobsonny , can you please confirm it is fine to add this method.

Thanks

readme build don't work

The build steps in the readme don't work. Looks like the build script expects a cert that is missing. We just run the build in Xcode and it works. Maybe it would be a good idea to ad a prebuilt framework file to the releases page for convenience?

Build settings from command line:
    ARCHS = arm64 armv7 armv7s
    defines_module = yes
    only_active_arch = no
    SDKROOT = iphoneos11.0

=== BUILD TARGET PrebidMobile OF PROJECT PrebidMobile WITH CONFIGURATION Release ===

Check dependencies
2017-09-29 17:36:36.811 xcodebuild[9125:2018466]  iPhoneConnect: ## Unable to mount developer disk image, (Error Domain=com.apple.dtdevicekit Code=-402652958 "Development cannot be enabled while your device is locked." UserInfo={NSLocalizedDescription=Development cannot be enabled while your device is locked., com.apple.dtdevicekit.stacktrace=(
	0   DTDeviceKitBase                     0x0000000118b11a0d DTDKCreateNSError + 113
	1   DTDeviceKitBase                     0x0000000118b12251 DTDK_AMDErrorToNSError + 1135
	2   DTDeviceKitBase                     0x0000000118b531b7 -[DTDKMobileDeviceToken mountDeveloperDiskImage:withError:] + 782
	3   DTDeviceKitBase                     0x0000000118b53a6e -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 488
	4   IDEiOSSupportCore                   0x0000000118a37495 __37-[DVTiOSDevice(Connect) hasConnected]_block_invoke_2 + 133
	5   DVTFoundation                       0x000000010cc870eb __DVTDispatchGroupAsync_block_invoke + 806
	6   libdispatch.dylib                   0x00007fff5552b7a2 _dispatch_call_block_and_release + 12
	7   libdispatch.dylib                   0x00007fff55523f64 _dispatch_client_callout + 8
	8   libdispatch.dylib                   0x00007fff55537110 _dispatch_continuation_pop + 599
	9   libdispatch.dylib                   0x00007fff5552e8e0 _dispatch_async_redirect_invoke + 703
	10  libdispatch.dylib                   0x00007fff55525b56 _dispatch_root_queue_drain + 515
	11  libdispatch.dylib                   0x00007fff55525902 _dispatch_worker_thread3 + 101
	12  libsystem_pthread.dylib             0x00007fff557e71ca _pthread_wqthread + 1387
	13  libsystem_pthread.dylib             0x00007fff557e6c4d start_wqthread + 13
), NSLocalizedRecoverySuggestion=Please unlock your device and reattach. (0xE80000E2)., NSLocalizedFailureReason=Please unlock your device and reattach. (0xE80000E2).}) {
    NSLocalizedDescription = "Development cannot be enabled while your device is locked.";
    NSLocalizedFailureReason = "Please unlock your device and reattach. (0xE80000E2).";
    NSLocalizedRecoverySuggestion = "Please unlock your device and reattach. (0xE80000E2).";
    "com.apple.dtdevicekit.stacktrace" = (
	0   DTDeviceKitBase                     0x0000000118b11a0d DTDKCreateNSError + 113
	1   DTDeviceKitBase                     0x0000000118b12251 DTDK_AMDErrorToNSError + 1135
	2   DTDeviceKitBase                     0x0000000118b531b7 -[DTDKMobileDeviceToken mountDeveloperDiskImage:withError:] + 782
	3   DTDeviceKitBase                     0x0000000118b53a6e -[DTDKMobileDeviceToken mountDeveloperDiskImageWithError:] + 488
	4   IDEiOSSupportCore                   0x0000000118a37495 __37-[DVTiOSDevice(Connect) hasConnected]_block_invoke_2 + 133
	5   DVTFoundation                       0x000000010cc870eb __DVTDispatchGroupAsync_block_invoke + 806
	6   libdispatch.dylib                   0x00007fff5552b7a2 _dispatch_call_block_and_release + 12
	7   libdispatch.dylib                   0x00007fff55523f64 _dispatch_client_callout + 8
	8   libdispatch.dylib                   0x00007fff55537110 _dispatch_continuation_pop + 599
	9   libdispatch.dylib                   0x00007fff5552e8e0 _dispatch_async_redirect_invoke + 703
	10  libdispatch.dylib                   0x00007fff55525b56 _dispatch_root_queue_drain + 515
	11  libdispatch.dylib                   0x00007fff55525902 _dispatch_worker_thread3 + 101
	12  libsystem_pthread.dylib             0x00007fff557e71ca _pthread_wqthread + 1387
	13  libsystem_pthread.dylib             0x00007fff557e6c4d start_wqthread + 13
);
}
Code Signing Error: No signing certificate "iOS Development" found:  No "iOS Development" signing certificate matching team ID "HR94J6TSB3" with a private key was found.

** BUILD FAILED **


The following build commands failed:
	Check dependencies
(1 failure)

Memory leaks found

While profiling our app, we have detected a few potential memory leaks in frames
+[PrebidMobile setBidKeywordsOnAdObject:withAdUnitId:withTimeout:completionHandler:] .../Pods/PrebidMobile/sdk/PrebidMobile/PrebidMobile.m:44
and __24+[NSObject(Prebid) load]_block_invoke_2 .../Pods/PrebidMobile/sdk/PrebidMobile/Categories/NSObject+Prebid.m:33

No specific reproduction steps, just standard usage

Code signing is enabled by default in example project build

Hey, thanks for writing a nice Makefile setup for the example project - makes things super convenient! I think it would be a little bit nicer if there were a make target for building the example that didn't require code signing/an Apple Developer account on the machine (e.g., something targeting the iphonesimulator scheme or whatever makes sense).

(Although this did remind me that I need to update my Apple account. :-) )

Output below:

$ make
/Applications/Xcode.app/Contents/Developer/usr/bin/make ipa
bin/make/ipa.sh

######## Preparing #######

INFO: Prepared install directory Products/ipa
INFO: Prepared archive directory

######## Building PrebidMobileDemo.ipa #######

▸ Building PrebidMobile/PrebidMobile [Debug]
▸ Check Dependencies
▸ Processing Info.plist
▸ Compiling NSTimer+Extension.m
▸ Compiling PBServerReachability.m
▸ Compiling PrebidMobile.m
▸ Compiling NSDictionary+Extension.m
▸ Compiling PBServerAdapter.m
▸ Compiling PBServerGlobal.m
▸ Compiling PBInterstitialAdUnit.m
▸ Compiling PBLogging.m
▸ Compiling PBTargetingParams.m
▸ Compiling PBServerLocation.m
▸ Compiling PBBannerAdUnit.m
▸ Compiling PBAdUnit.m
▸ Compiling NSObject+Prebid.m
▸ Compiling NSString+Extension.m
▸ Compiling PBException.m
▸ Compiling PBBidResponse.m
▸ Compiling PBLogManager.m
▸ Compiling PBBidManager.m
▸ Compiling PBKeywordsManager.m
▸ Compiling PBServerFetcher.m
▸ Compiling PrebidMobile_vers.c
▸ Compiling NSTimer+Extension.m
▸ Compiling PrebidMobile.m
▸ Compiling PBServerReachability.m
▸ Compiling NSDictionary+Extension.m
▸ Compiling PBServerAdapter.m
▸ Compiling PBServerGlobal.m
▸ Compiling PBInterstitialAdUnit.m
▸ Compiling PBLogging.m
▸ Compiling PBTargetingParams.m
▸ Compiling PBServerLocation.m
▸ Compiling PBBannerAdUnit.m
▸ Compiling PBAdUnit.m
▸ Compiling NSObject+Prebid.m
▸ Compiling NSString+Extension.m
▸ Compiling PBException.m
▸ Compiling PBBidResponse.m
▸ Compiling PBLogManager.m
▸ Compiling PBBidManager.m
▸ Compiling PBKeywordsManager.m
▸ Compiling PBServerFetcher.m
▸ Compiling PrebidMobile_vers.c
▸ Compiling NSTimer+Extension.m
▸ Compiling PrebidMobile.m
▸ Compiling PBServerReachability.m
▸ Compiling NSDictionary+Extension.m
▸ Compiling PBServerAdapter.m
▸ Compiling PBServerGlobal.m
▸ Compiling PBInterstitialAdUnit.m
▸ Compiling PBLogging.m
▸ Compiling PBTargetingParams.m
▸ Compiling PBServerLocation.m
▸ Compiling PBBannerAdUnit.m
▸ Compiling PBAdUnit.m
▸ Compiling NSObject+Prebid.m
▸ Compiling NSString+Extension.m
▸ Compiling PBException.m
▸ Compiling PBBidResponse.m
▸ Compiling PBLogManager.m
▸ Compiling PBBidManager.m
▸ Compiling PBKeywordsManager.m
▸ Compiling PBServerFetcher.m
▸ Compiling PrebidMobile_vers.c
▸ Copying PBException.h
▸ Copying PBBannerAdUnit.h
▸ Copying PBBidResponse.h
▸ Copying PBBidResponseDelegate.h
▸ Copying PBTargetingParams.h
▸ Copying PBLogging.h
▸ Copying PBKeywordsManager.h
▸ Copying PBLogManager.h
▸ Copying PBAdUnit.h
▸ Copying PBServerAdapter.h
▸ Copying PrebidMobile.h
▸ Copying PBBidManager.h
▸ Copying PBInterstitialAdUnit.h
▸ Touching PrebidMobile.framework
▸ Building PrebidMobileDemo/PrebidMobileDemo [Debug]
▸ Check Dependencies

❌  Code signing is required for product type 'Application' in SDK 'iOS 10.0'



❌  Code signing is required for product type 'Application' in SDK 'iOS 10.0'


** BUILD FAILED **


The following build commands failed:
	Check dependencies
(1 failure)
ERROR: Building ipa failed.
make[1]: *** [ipa] Error 65
make: *** [all] Error 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.