I have added a Flurry logevent when the ok button of the alertView is clicked.
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex;
{
if (buttonIndex == 1)
{
NSString *start = #"Start";
NSString* myLogEvent = [start stringByAppendingString:title.text];
NSLog(#"%#",myLogEvent);
[Flurry logEvent:myLogEvent];
}
}
I have logged the event like 2 hours ago. It is still not appearing in my Flurry Login Page. Did i do something wrong?
I know the analytics takes time to appear but the event name should appear in the login page after 45 minutes or so. Am i right? Worried I did something wrong..
Usage data from Flurry may take up to 7 hours to get reflected on the developer portal. First time Events may take slightly longer.
Edit: If you're using the simulator, please ensure that you press the home button before closing the app. This is required in order to complete the Flurry reporting lifecycle.
(Full disclosure: I work in the Support team at Flurry)
Flurry proved to work for me including events, so it should work for you, too. I'd check with the debugger that the Flurry session was started ([Flurry startSession:#"YOUR_API_KEY"]) and your event code got really executed. And that you have internet connection, otherwise all events will get saved locally and transfered to Flurry on the next occasion.
Than wait some more, it takes time at times for the analytics results to show...
Related
I have searching how to add event t users google calendar. In my project I have database with events(title,startDate,endDate etc). When user clicks sync button all this events should be add to users google calendar.
I downloaded api from here. But its for MAC OS. Since I never worked on MAC OS application I cant understand how to use it in IOS app.
Please help me and tell which view controller to use asking for username and password, then login to google calendar service and add event in it.
Thank you.
I got http://code.google.com/p/google-api-objectivec-client/. But its difficult to understand. It takes username and password from preferences. Then gets calendars and adds events, but to add we need ticket and some more things. This code did some things.
In their add event method I wrote my own event object and tried to add that, but its not working. Here is the code:
- (void)insertCalendarEvent:(GDataEntryCalendarEvent *)event toCalendar:(GDataEntryCalendar *)calendar
{
NSLog(#"adding event");
GDataDateTime *time = [GDataDateTime dateTimeWithDate:[NSDate date] timeZone:(NSTimeZone*)[NSTimeZone timeZoneForSecondsFromGMT:0]];
GDataEntryCalendarEvent *newEntry = [GDataEntryCalendarEvent calendarEvent];
[newEntry setTitleWithString:#"title"];
[newEntry addLocation:[GDataWhere whereWithString:#"pune"]];
[newEntry addTime:[GDataWhen whenWithStartTime:time endTime:time]];
[googleCalendarService fetchEntryByInsertingEntry:newEntry
forFeedURL:[[calendar alternateLink] URL]
delegate:self
didFinishSelector:#selector( insertTicket:finishedWithEntry:error: )];
}
My requirement is simple. I just want add my custom events to google calendar. Get calendar, get ticket, and in for loop add all my events.
Instead of using Google API and a new window where the user needs to be login again, you should use the EventKit, it's pretty easy stuff and you could sync to the Calendar where the user wants, not only Google cal.
I have the same requirement like yours to integrate google calendar and syncing events. I researched and found documentation from here but I didn't understand it clearly, so later I found another good tutorial for accessing google calendar API's. You can try this for your requirement.
As #Tuss Laszlo mentioned, the Google API Client library is your best option to add events only to a Google Calendar. Google has a calendar sample in their example code. See the example for the full implementation of adding calendar events.
I'm using the latest version of Google analytics for iOS (up to this post date).
The pageViews are logged and reported correctly but the events and social events aren't. Here are some snippets of my code:
#interface RootViewController : GAITrackedViewController
All my ViewControllers inherit the GAITrackedViewController
[self.tracker sendEventWithCategory:#"Twitter" withAction:#"Tweet" withLabel:#"Tweet App Info" withValue:nil];
[self.tracker sendSocial:#"Twitter" withAction:#"Tweet App Info" withTarget:nil];
I call this from my view controller to log an event of sending a tweet, but when I check my Google analytics (Engagement->Events->OverView) no events are logged. This is not real time data, I'm talking about 3 days of testing without events reported.
I'm following this guide by Google Mobile App Analytics, but when using
[tracker sendEvent]
I get errors so I use
[self.tracker sendEvent]
and I think it uses the default tracker of the app.
Any help with this problem ?
for me, the [self.tracker ...] or [tracker ...] calls did not work. I ended up using the shared instance default tracker as follows:
[[GAI sharedInstance].defaultTracker sendEventWithCategory:#"TAC_Agree" withAction:#"buttonClick" withLabel:#"" withValue:[NSNumber numberWithInt:0]];
This definitely works for me.
Integrated chartoost sdk in to iPhone game. (Landscape game)
#define CHARTBOOST_ID #"55c9f216f6cd4572f3975566"
#define CHARTBOOST_SIG #"9cc8122cfb05bfe0e171f46990180147e8b6f23c"
[Chartboost startWithAppId:CHARTBOOST_ID appSignature:CHARTBOOST_SIG delegate:self];
[Chartboost showInterstitial:CBLocationHomeScreen];
But it is not displaying any ads. Help me to find what's wrong with settings in Xcode or account in chart boost.
Notes_Warning :
Hi All, don't use Chartboost, instead try google Admob or other ads network. Because Chartboost - a cheater! I used Chartboost in my games, game got good ranking in Cambodia - reached #1 in Racing/games. Game got good downloads too...But Chartboost said we used many device in Cambodia and downloaded game...its not true...we are not from Cambodia...I tried to send message to Chartboost many times...but they didn't respond and suspended my account. They even didn't pay my 7463$. Really its a heart attack for us. Now we removed Chartboost and used Admob and earned our development cost from Admob easily. So avoid Chartboost avoid getting cheated!!! Truth always wins...Always do good.
Be a good person but don't try to prove it. Just go away from bad cheaters!!!!
Notes_Warning :
Hi All, don't use Chartboost, instead try google Admob or other ads network. Because Chartboost - a cheater! I used Chartboost in my games, game got good ranking in Cambodia - reached #1 in Racing/games. Game got good downloads too...But Chartboost said we used many device in Cambodia and downloaded game...its not true...we are not from Cambodia...I tried to send message to Chartboost many times...but they didn't respond and suspended my account. They even didn't pay my 7463$. Really its a heart attack for us. Now we removed Chartboost and used Admob and earned our development cost from Admob easily. So avoid Chartboost avoid getting cheated!!! Truth always wins...Always do good. Be a good person but don't try to prove it. Just go away from bad cheaters!!!!
Now its working fine. We need to add publishing campaign in our chartboost account. Here
UPDATES:
[Chartboost startWithAppId:CHARTBOOST_APP_ID appSignature:CHARTBOOST_APP_SIGNATURE delegate:self];
[Chartboost showInterstitial:CBLocationHomeScreen];
Some other way to see test Ads:
Add your device UDID in publishing campaign
Enable test mode in App settings.
Perhaps there has been an error in loading them. I would implement the delegate methods as described in the docs, particularly the didFail method:
// Called before requesting an interstitial from the back-end
- (BOOL)shouldRequestInterstitial:(NSString *)location;
// Called when an interstitial has been received, before it is presented on screen
// Return NO if showing an interstitial is currently inappropriate, for example if the user has entered the main game mode
- (BOOL)shouldDisplayInterstitial:(NSString *)location;
// Called when the user dismisses the interstitial
- (void)didDismissInterstitial:(NSString *)location;
// Same as above, but only called when dismissed for a close
- (void)didCloseInterstitial:(NSString *)location;
// Same as above, but only called when dismissed for a click
- (void)didClickInterstitial:(NSString *)location;
// Called when an interstitial has failed to come back from the server
// This may be due to network connection or that no interstitial is available for that user
- (void)didFailToLoadInterstitial:(NSString *)location;
It may also be because the Campaign is not filling adverts and you have not added the devices as test devices to force the adverts to be filled.
This is easily missed since at first adverts may be filled - only during testing they'll just stop mysteriously.
There is a setting in Chartboost:
Edit the Campaign you are using for testing
Under "Campaign Logic" click the "Show Test Devices" button.
Click "Add Test Device" to add each device.
Enable each device and Save the Campaign.
(Don't forget to un-tick them when live - since I assume that missing that will mean those devices keep seeing adverts but you probably want to see how the app really behaves)
You need to set
cb.delegate = self;
I'm using MKStoreKit to implement an IAP into my application. Everything does as expected when purchasing the product, no error messages at all. The product is purchased using the following code..
[[MKStoreManager sharedManager] buyFeature:#"pro_upgrade"
onComplete:^(NSString* purchasedFeature)
{
NSLog(#"Purchased: %#", purchasedFeature);
// provide your product to the user here.
// if it's a subscription, allow user to use now.
// remembering this purchase is taken care of by MKStoreKit.
}
onCancelled:^
{
// User cancels the transaction, you can log this using any analytics software like Flurry.
}];
After the product has been purchased I recieve the notification (via the code below) which confirms the purchase..
[[NSNotificationCenter defaultCenter] addObserver:self
selector:#selector (subscriptionPurchased:)
name: kSubscriptionsPurchasedNotification
object:nil];
After the purchase I execute the following code (as documented) to determine if the product has been purchased..
if([MKStoreManager isFeaturePurchased:#"pro_upgrade"]) {
NSLog(#"This feature is purchased.");
} else {
NSLog(#"This feature is not purchased");
}
It constantly returns NO for the product ID. This happens when running the app in the same instance as when the product was purchased as well as closing the app and opening it. Running the app using Development or Distribution certificates make no difference at all. Further more I can't find where exactly MKStoreKit stores the product purchased BOOL that it seems to be looking for (it's pretty deep in the code so i'm not saying it does or doesn't, i just can't find it). My app is storing other information using NSUserDefaults so that isn't the issue.
Any help you can offer will be extremely appreciated, thanks for your time.
MKStoreKit doesn't store in NSUserDefaults.
I use keychain instead. Place a breakpoint in the method
storeData:forKey: (writing this method name straight from my head
without looking at code, search for similarly named methods) and try
debugging it. This is the place I save your purchases.
Do remember that purchases are remembered even after deleting and
reinstalling the app.
I'm trying to post a link + status through my app, using this "popup" facebook window where the user is asked to log in, then asked to allow my app to his profile. Then I want him to be able to write a status, with a link I specify attached. This facebook popup would be triggered by a button, not at start of my app (in the documentation I found that they want me to implement it in the appDidFinish launching method...) But I don't want that, I want it like the popup facebook window is only triggered per button tap.
I'm trying to figure this out for a few days now, but finding that all tutorials are out-dated and the Facebook Developer documentation is very weak- atleast for for me. I already downloaded the Facebook-iOS-SDK with the API and JSON included from GitHub. I already did a few attempts, but the furthest I got is that the user was asked to log in, but not through my app, instead Safari opened and the log in field were there, not in my app.
Could someone please post some code, a basic tutorial I might find helpful, or point me to a good online tutorial? I already tried to post to iPhone Dev SDK forums, where other people also asked for this, but never got any help. So could someone out here please put together something that would help out all the newbies?
I want my login screen look like this, and the rest should be in a popup too:
http://www.facebook.com/photo.php?pid=439332&l=c04b210914&id=100001688115647
Thanks a lot in advance!
There is already a sample code in facebook-ios sdk you can see that there are already the code available for some things. Here is a code snippet from the older facebook API but this should work with the newer graph api too
- (void)setStatus:(id)target {
NSString *statusString = #"Testing iPhone Connect SDK";
NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys:
statusString, #"status",
#"true", #"status_includes_verb",
nil];
[[FBRequest requestWithDelegate:self] call:#"facebook.users.setStatus" params:params];
}
WHat you can do is create a controller to handle all the facebook requests like a singleton class and on tap of button do something like this
- (IBAction)showFBLoginDialog:(id)sender {
if(LoggedInFacebook == NO) {
FBLoginDialog *dlg = [[[FBLoginDialog alloc] initWithSession:faceBookController._session] autorelease];
[dlg show];
}
else {
[faceBookController logoutUser];
}
}
If you need further help search on google and stackoverflow you will find a bunch of.