Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 19    Views: 2079

elaine
buzztouch Evangelist
Profile
Posts: 385
Reg: Dec 26, 2010
Ireland
3,850
06/13/12 08:49 AM (11 years ago)

Integrating Chartboost (good for nag screens & to cross promote your apps)

Hello, I'm trying to integrate Chartboost into my app, using these instructions: https://s3.amazonaws.com/chartboost/docs/ChartboostSetupGuide.pdf Having problems finding the 'applicationdidbecomeactive' part.. Any ideas? Thanks :) Elaine.
 
edzme
Aspiring developer
Profile
Posts: 7
Reg: Jun 13, 2012
San Francisco
70
like
06/13/12 12:31 PM (11 years ago)
Hey Elaine, applicationDidBecomeActive is usually in your app delegate. Go to the file named something like MyCoolGameAppDelegate.m, and search (cmd+f) for applicationDidBecomeActive. If you can't locate the file, try a project-wide search (command+shift+f) and find applicationDidBecomeActive. Hope that helps! -Ed
 
elaine
buzztouch Evangelist
Profile
Posts: 385
Reg: Dec 26, 2010
Ireland
3,850
like
06/13/12 12:35 PM (11 years ago)
OK an update!! :) Yes in BT_Config > MyCoolGameAppDelegate.m if you scroll down about half way you will see: - (void) applicationdidbecomeactive........ OK you need to post this code: // Configure ChartBoost ChartBoost *cb = [ChartBoost sharedChartBoost]; cb.appId = @"APP_ID"; cb.appSignature = @"APP_SIGNATURE"; // Notify the beginning of a user session [cb startSession]; // Show an interstitial [cb showInterstitial]; just before the last '}' associated with the "- (void) applicationdidbecomeactive........" code block (which is about 14 lines long). Then you need to put in your APP_ID and APP_SIGNATURE into this code you just pasted in. You get this info from chartboost website as per instructions (easy to find).
 
elaine
buzztouch Evangelist
Profile
Posts: 385
Reg: Dec 26, 2010
Ireland
3,850
like
06/13/12 12:36 PM (11 years ago)
The next challenge: INSTRUCTIONS: 5) Add the required frameworks to your project: SystemConfiguration.framework and QuartzCore.framework -In the project navigator, select your project -Select your target -Select the 'Build Phases' tab -Open the 'Link Binaries With Libraries' expander -Click the '+' button -Select each framework and add it to your project No idea how to do this, I have an old version of xcode ... :( THANKS AGAIN (hope this helps others as well) Elaine
 
edzme
Aspiring developer
Profile
Posts: 7
Reg: Jun 13, 2012
San Francisco
70
like
06/13/12 12:41 PM (11 years ago)
Hey again, You may need to upgrade to the latest (non-beta) version of Xcode. The Chartboost SDK requires iOS SDK v5.0 to work, and unless that is in your version of Xcode -- it won't behave properly. -Ed
 
elaine
buzztouch Evangelist
Profile
Posts: 385
Reg: Dec 26, 2010
Ireland
3,850
like
06/13/12 12:43 PM (11 years ago)
oh no... xcode scares me a bit lol. I have xcode v. 3.2.5. Any good? Elaine.
 
edzme
Aspiring developer
Profile
Posts: 7
Reg: Jun 13, 2012
San Francisco
70
like
06/13/12 12:48 PM (11 years ago)
I don't believe so. You may need v4.0 - v4.3. If you have Lion you can get it here: http://itunes.apple.com/us/app/xcode/id497799835?mt=12 Or if you don't have lion, you can grab the Leopard compatible version from the apple developer site. -Ed
 
elaine
buzztouch Evangelist
Profile
Posts: 385
Reg: Dec 26, 2010
Ireland
3,850
like
06/13/12 12:49 PM (11 years ago)
thank you :) will install. Elaine
 
elaine
buzztouch Evangelist
Profile
Posts: 385
Reg: Dec 26, 2010
Ireland
3,850
like
06/13/12 02:40 PM (11 years ago)
So.. I've downloaded xcode 4.2 and the above instructions are fine to follow :) Next steps to do (not sure where to put these): The Chartboost SDK provides a built in apps wall. Display the more apps page with the following code: [cb showMoreApps]; You may want to show interstitials at different points in your app. Name each location like this: [cb showInterstitial:@"App launch"]; Also - do I have to anything with the cache instructions? :) THANKS AGAIN!! Elaine.
 
edzme
Aspiring developer
Profile
Posts: 7
Reg: Jun 13, 2012
San Francisco
70
like
06/13/12 03:24 PM (11 years ago)
Hey Elaine, Developers often connect [cb showMoreApps] to a button, or action somewhere in the app. We recommend named locations so you can fine tune interstitial behavior directly from the dashboard. Some examples are given in the setup guide like launch, after level one, pause menu, etc. You don't _have_ to cache anything, but we highly recommend it. Cacheing interstitials & the more apps page provides the best user experience so that everything is snappy and fast. -Ed
 
elaine
buzztouch Evangelist
Profile
Posts: 385
Reg: Dec 26, 2010
Ireland
3,850
like
06/13/12 03:33 PM (11 years ago)
Hi Ed, Thanks for the reply :) I have a HTML (standard buzz touch screen) in my app I'd like to put the 'more apps' content into. Not sure where to put the chartboost code above to do this though.... Also for the nag screen at the start, would you or anyone know where in the buzztouch app to put that code? Thanks again! Elaine.
 
edzme
Aspiring developer
Profile
Posts: 7
Reg: Jun 13, 2012
San Francisco
70
like
06/13/12 05:19 PM (11 years ago)
Yea sorry I'm not familiar with buzztouch so I don't know how to hook that up. Hopefully some other developers around here might be able to help out! -Ed
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
06/14/12 09:05 AM (11 years ago)
@edzme, I presume you're with chartboost? If so, do you have a html solution? @elaine, from my understanding to use chartboost you must add the code to a .m or .h file. (I'm not iOS yet, so I forget which is which.) You can't add it to a html screen (doc). You'll need to add to existing screen (plugin) and it will appear every time you use the screen. Fred
 
edzme
Aspiring developer
Profile
Posts: 7
Reg: Jun 13, 2012
San Francisco
70
like
06/14/12 09:11 AM (11 years ago)
Hey Fred -- Yep I'm with Chartboost :) Unfortunately we don't (yet) have a pure html solution. We're compatible with Android (Java), iOS (obj-c), and Unity (with a plugin). -Ed
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
06/14/12 09:24 AM (11 years ago)
So, is my analysis above correct? Fred
 
elaine
buzztouch Evangelist
Profile
Posts: 385
Reg: Dec 26, 2010
Ireland
3,850
like
06/14/12 11:59 AM (11 years ago)
An iOS dev friend of mine looked over the buzztouch code to try & integrate ChartBoost & said this: "It looks like Buzztouch have constructed a project where the view controllers are maintained dynamically in some kind of list, rather than all being separate as in a conventional hand-written iOS application. This all seems to happen in a file called BT_viewControllerManager.m in the BT_Layout folder. I guess this is because the project itself it just a huge bunch of template that get filled in when you design the application and then sent 'over the air' - that thing where you can change your app without having people download an update-kind-of-thing. It's a great flexible framework, but it makes it incredibly difficult to debug and find out where to place your interstitials! You'd have to write code to intercept the flow of control of the view controllers and insert them when a certain view is loaded by the looks of it. It's hard to see what the names of the views are. Best thing, I reckon is to ask Buzztouch, as if we play with the code too much it may inadvertently cause bits of it to stop working the way it's supposed to. Sorry about that, but let me know what they say - maybe they have a method / option for inserting this kind of ad that's native to their framework or something?"
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
06/14/12 12:12 PM (11 years ago)
Playing with the code is standard and expected. Suggest you read the how-to for inserting iAds. this is because the project itself it just a huge bunch of template that get filled in when you design the application and then sent 'over the air' Actually it's contained in the Config file. - that thing where you can change your app without having people download an update-kind-of-thing. That's what the Control Panel is about. It's a great flexible framework, but it makes it incredibly difficult to debug and find out where to place your interstitials! I wrote an article, Buzztouch Source Code (Android) to help decphire this. Am working on the iOS version, but you might wish to read the Android version to get a heads up for iOS. Fred Fred
 
elaine
buzztouch Evangelist
Profile
Posts: 385
Reg: Dec 26, 2010
Ireland
3,850
like
06/15/12 05:59 AM (11 years ago)
Right!! Well I had to give up on the Chartboost integration into Buzztouch as it was getting a bit too complicated for me - but good news!!! One of the things I wanted to do was have a 1 page list of all my app icons & names, in all my active apps, so when you click on any app icon, you get sent to the app store. This is now done via a HTML page (put your pics of the apps up on a server and link to them in the HTML page)... looks great & I even integrated linkshare! Thanks everyone. Hope it helps others as well! :) Nag screens I'll have to postpone to another day.
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
06/15/12 06:52 AM (11 years ago)
@elaine no question learning to navigate thru the BT code to customize your app is a tough task. your iOS dev guy is dead on and you understand why BT does it they way the do in regard to updates. but you can make Chartboost work! try reading the integrating Scringo thread or MGOblues GameCenter tutorial. These will show you how to import other frameworks in your app. adding Scringto to iOS is pretty straightforward. one key file is the YOURAPPNAME_appdelegate.m you will make a few changes in there. that's what i did and now i'm able to add lots of other Frameworks and features to my apps based off their tips in those tutorials. don't give up, you're way too good at this!
 
elaine
buzztouch Evangelist
Profile
Posts: 385
Reg: Dec 26, 2010
Ireland
3,850
like
06/15/12 07:01 AM (11 years ago)
lol I'l try thanks Atrain53 :)
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.