TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | Commercial |
ReleasedLast Release | Dec 2014 |
Maintained by Unclaimed.
Depends on: | |
MKNetworkKit | ~> 0.87 |
SDWebImage | ~> 3.5 |
MobSDK includes a software development kit (SDK) that enables you to promote other applications inside your app. This framework runs from iOS 5 onwards and supports the retina and non-retina iPhone/iPod resolutions.
Three distinct components are available in this SDK:
A banner that is presented as part of an app. It can appear once the app has been launched.
An interstitial that present an app. It can be launched when the app start or at any point during the app experience.
A MobWall a component that will present applications grouped by categories with a detail mode. This can be used as a modal view or include it in a tabbar.
The preferred way of installation is via CocoaPods. Just add
platform :ios, '5.0'
pod 'MobPartneriOSPublisherSDK'
and run pod install
. It will install the most recent version of Mobpartner iOS Publisher SDK.
You will find a demo project with pod installation: SDKPublisherDemoWithPod
Add MobPartneriOSPublisherSDK.framework
and MobPartneriOSPublisherSDK.bundle
to your project.
In Build Phases
, make sure its listed in Link Binary With Libraries
, along with:
UIKit.framework
CoreFoundation.framework
Foundation.framework
In Build Settings
:
Framework Search Paths
make sure the (parent) directory to MobPartneriOSPublisherSDK.framework
is listed.Other Linker Flags
in your target, add -ObjC
and -all_load
You just need to import the files coming from the following projects:
MKNetworkKit ~> 0.87 here
SDWebImage ~> 3.5 here
You will find a demo project with normal installation: SDKPublisherDemoNoPod
#import <MobPartneriOSPublisherSDK/MobPartner.h>
[[MobPartner sharedManager] setPoolID:@"12345"];
[[MobPartner sharedManager] createBannerWithCompletion:^(UIView *bannerView) {
// add the bannerView where you want
} error:^(NSError *error) {
// No network or server unavailable, we do not display the banner
}];
[[MobPartner sharedManager] createInterstitialViewWithDelegate:self
completion:^(UIView *interstitialView) {
// add the interstitialView where you want
}
error:^(NSError *error) {
// No network or server unavailable, we do not display the interstitial
}];
By using UIView you will need to import
#import <MobPartneriOSPublisherSDK/MobPartnerInterstitialViewDelegate.h>
and call the delegate method
- (void)closeInterstitialView {
// call when user click on the interstitial close button.
}
[[MobPartner sharedManager] createInterstitialViewControllerWithCompletion:^(UIViewController *interstitialViewController) {
// Present the interstitial when you are ready in our case with a presentViewController:
[self presentViewController:interstitialViewController animated:YES completion:nil];
} error:^(NSError *error) {
// No network or server unavailable, we do not display the interstitial
}];
You need to use presentViewController: animated: completion:
because when the user taps on the interstitial close button dismissViewControllerAnimated: completion:
is called.
To implement the MobWall call this method.
[[MobPartner sharedManager] createMobwallViewWithDelegate:self
completion:^(UIView *mobwallView) {
// add the mobwallView where you want
} error:^(NSError *error) {
// No network or server unavailable, we do not display the mobwall
}];
You can import
#import <MobPartneriOSPublisherSDK/MobPartnerMobwallViewDelegate.h>
and call the delegate method to know why the webview doesn't load.
- (void)mobwall:(MobPartnerMobwallView *)mobwall didFailLoadWithError:(NSError *)error {
// do something
}
To display log you need to have the flag DEBUG=1
in your Preprocessor Macros in your Build settings.
An iOS demo project is available to test the different usages and check the configuration.
The framework's headers are documented and self explanatory.