Playhaven iOS SDK: Show only Casino game not works - ios

I got one requirement to use Playhaven iOS ads sdk. I used below code and set ads filter to casino games only. But its not working.
Here is my Code:
-(void) PlayHavenMoreGames
{
PHPublisherContentRequest *request = [PHPublisherContentRequest requestForApp:PLAYHAVEN_TOKEN secret:PLAYHAVEN_SECRET placement:PLACEMENT delegate:self];
[request send];
}
Anything else missing to call ?
Here is code: https://app.box.com/s/t212o8axqc75fzqiz3dm
How can I fix this problem ?

I don't believe the issue is in your code.
You should email support#playhaven.com with this question. They are pretty responsive usually.
Good luck!

Related

How to use Signalr in iOS?

I have planned to use SignalR for my iOS application and searched for several hours to find a better solution but unfortunately I was not able to find a better solution for it.
Some of them where suggesting SignalR-ObjC for using SignalR in iOS but while I tried a sample with it, there were lot of issues on using SignalR-ObjC.
I'm looking forward to hear some third party plugins which makes SignalR integration possible at iOS.
Kindly advice me on how to use signalr for iOS application.
Note: Just as an additional information I'm providing the errors that I have struggled with SignalR-ObjC. If the errors are fixable then I will go ahead using the SignalR-ObjC for now.
The issues are: None of my clients are not getting invoked by server method call but SRConnectionDidOpen was getting invoked everytime.
I have mentioned by code below, kindly review it and let me know if I had done anything wrong with my code as I'm a beginner to Objective C.
hub = [connection createHubProxy:#"myHub"];
[hub on:#"addMessage" perform:self selector:#selector(addMessage:)];
connection.started = ^{
NSLog(#"started");
};
connection.received = ^(NSString * data) {
NSLog(#"%#",data);
};
[connection setDelegate:self];
[connection start];
}
- (void)addMessage:(NSString *)message{ // Print the message when it comes in
NSLog(#"message");
}
- (void)SRConnectionDidOpen:(SRConnection *)connection
{
[hub on:#"addMessage" perform:self selector:#selector(addMessage:)];
}
Thanks in advance.

Xcode - Admob banner setting with targeting and test devices

I am working on my iOS app and trying to place a banner on the bottom of the page.
First of all, I set a BOOL (BannerAd) which is initially "NO" and set to "YES" when user hits the "Submit" button. By doing this tried to avoid requesting ads eveytime the user hit "Submit". This seems to work but world be nice if you can comment on it.
My interface has a "Datepicker" where the user selects his/her Birthday. I wanted to use this information for ad targeting. Also I know my application will be used in "Germany" so I set the location manually to "Germany" since my app doesn't request location information from user. And finally I am trying to test my app on my device where I set my test device UDID in "testDevices"
My problem is, I think my requests don't work. When I enter my own "adUnitId", I get paid ads on my device (which may cause a problem). Also when I tried to change the location, for example to "France", I still get local ads. I guess my location is not working and AdMob is using the network to determine the location. Which makes me think my "Birthday" information isn't working, too.
Below is the code I use and I don't know which part is wrong. I did researched and did everything according to the guides. I am not experienced and hoped that you guys can help me out!
Appreciated!
// Show Banner Ad
if (BannerAd == NO)
{
self.bannerView.adUnitID = #"ca-app-pub-3940256099942544/2934735716"; // TEST ID
self.bannerView.rootViewController = self;
NSDate *birthday =[datepick date];
GADRequest *request = [GADRequest request];
[request setBirthday: birthday];
[request setLocationWithDescription:#"Germany"];
request.testDevices = #[ #"b23cbd41317324cd9afd14dc848f2f0e" // TEST DEVICE
];
[self.bannerView loadRequest:[GADRequest request]];
BannerAd = YES;}
I can't understand your question(s) so good. Sorry.
If you want to put your adMob banner on the bottom of the screen, just use:
bannerView = [[GADBannerView alloc] initWithFrame:CGRectMake(0.0,self.view.frame.size.height - 50, self.view.frame.size.width, CGSizeFromGADAdSize(kGADAdSizeSmartBannerPortrait).height)];

Integrate share iOS / whatsapp in my app. Share Picture and text at the same time to whatsapp

Is there already a way to share the picture and the text from my app to whatsapp in one motion?
I can only find a android solution. It must be possible with iOS? Hope anybody has got the solution!
I found the solution for both picture and text over here, but Im looking for the option which android yet provides; from my app, in one motion, send a picture and text to a whatsapp contact.
Help is very much needed, tried everything and searched everywhere! Will the expert please stand up :)! Thanks in advance, hope to hear from you!
WhatsApp has a "Custom URL Scheme" and "Document Interaction" (http://www.whatsapp.com/faq/en/iphone/23559013).
But it looks like it does not support annotions for setting the text like Instagram (http://instagram.com/developer/mobile-sharing/iphone-hooks/)
This is the way to share but WITHOUT text.
self.documentationInteractionController =[UIDocumentInteractionController interactionControllerWithURL:jpegFileURL];
self.documentationInteractionController.delegate = self;
self.documentationInteractionController.UTI = #"public.jpeg";
self.documentationInteractionController.UTI = #"net.whatsapp.image";
// NOT WORKING - Found this solution, no success
self.documentationInteractionController.annotation = #{#"message":#"Text here",#"text":#"Text here"};
// NOT WORKING - Found other solution, no success
self.documentationInteractionController.annotation = [NSString stringWithFormat:#"text=Text here"];
// WORKING - BUT only for instagram
self.documentationInteractionController.annotation = #{#"InstagramCaption":#"Text here"};
[self.documentationInteractionController presentOptionsMenuFromRect:CGRectZero inView:self.view animated:YES];
Hope someone has the complete answer to the question, i am also stuck with the image and text combo.

Gamekit / gamecenter random matchmaking programmatically

I am trying to implement random matchmaking programmatically with my own custom userinterface.
I'm kinda stuck..
using this code found at the apple site I can create a match without problems
- (void)findProgrammaticMatch
{
GKMatchRequest *request = [[GKMatchRequest alloc] init];
request.minPlayers = 2;
request.maxPlayers = 2;
[GKTurnBasedMatch findMatchForRequest: request withCompletionHandler:^(GKTurnBasedMatch *match, NSError *error)
{
if(error)
NSLog(#"ERROR");
if (match) {
NSLog(#"STARTING MATCH");
}
}];
}
and if I do match.participants.count I get the number 2...
but one participant is me and the other is null
What ive done to test is create 2 sandbox accounts and I ran the same code with my other game center account, and I got a new game created,.. but it didnt match them for some reason.. am I missing something?
ive been looking for examples on google, but I can't seem to find any.. if any of you know anywhere I can find some examples, I would be most grateful
Well, you might be missing out an essential point in turn based match making. When the user starts an automatch if he is not connected to an existing match it starts a fresh game and user takes the first turn. Only after HE COMPLETES HIS TURN, other users can connect to this game. So if you are making a 2 player match: one user should start a fresh game with the other user being null at that moment and the other user should connect to this existing game after the first one finished his turn (endTurnWithMatchData called)
This is not very clear in documentation (I despise the gamecenter documentation, unclear & incomplete) but it is the case for sdk 6. I think it will change in the near future.

Ben Gottlieb's Twitter+OAuth iOS SDK - username parameter returning nil

It seems that over the weekend, the following Delegate method
- (void)OAuthTwitterController:(SA_OAuthTwitterController *)controller authenticatedWithUsername:(NSString *)username
began returning nil for the username parameter.
I wanted to see if anyone else using Ben Gottlieb's SDK can confirm this issue.
Thanks
I had the same issue today. The app worked fine for the past 2 months.
One thing I changed was the bundle id. Maybe this has something to do with this error, because everything else is the same. Did you happen to change this too?
I changed to https the urls for twitter on SA_OAuthTwitterEngine.m and it seems to be working fine now.
Here is the code I changed:
self.requestTokenURL = [NSURL URLWithString: #"https://twitter.com/oauth/request_token"];
self.accessTokenURL = [NSURL URLWithString: #"https://twitter.com/oauth/access_token"];
self.authorizeURL = [NSURL URLWithString: #"https://twitter.com/oauth/authorize"];
This still works fine for me. Have you tried the native Twitter API (if that's an option)?

Resources