Skip to content

Instantly share code, notes, and snippets.

@ydn
ydn / flurry_analytics.swift
Created July 13, 2015 20:04
Blog Post Gist
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Start Flurry session
Flurry.startSession("YOUR_FLURRY_API_KEY");
// A basic Flurry Event
Flurry.logEvent("Started Application");
return true;
}
@ydn
ydn / FlurryNativeAdsView.swift
Created June 24, 2015 16:59
Flurry Native Ads View
@IBOutlet weak var streamTitleLabel: UILabel!
@IBOutlet weak var streamDescriptionLabel: UILabel!
@IBOutlet weak var streamImageView: UIImageView!
@IBOutlet weak var streamSponsoredLabel: UILabel!
@IBOutlet weak var streamSponsoredImageView: UIImageView!
@IBOutlet weak var streamSourceLabel: UILabel!
@ydn
ydn / configure_when_data_is_sent_2.mm
Created June 22, 2015 21:13
Configure when data is sent to Flurry 2
[Flurry setSessionReportsOnPauseEnabled:(BOOL)sendSessionReportsOnPause];
@ydn
ydn / configure_when_data_is_sent.mm
Created June 22, 2015 21:12
Configure when data is sent to flurry
[Flurry setSessionReportsOnCloseEnabled:(BOOL)sendSessionReportsOnClose];
@ydn
ydn / track_page_views_2.mm
Created June 22, 2015 21:10
Track Page Views 2
[Flurry logPageView];
@ydn
ydn / track_page_views.mm
Created June 22, 2015 21:08
Track Page Views 1
[Flurry logAllPageViews:navigationController];
@ydn
ydn / track_application_errors.mm
Created June 22, 2015 21:07
Track Application Errors
[Flurry logError:@"ERROR_NAME" message:@"ERROR_MESSAGE" exception:e];
@ydn
ydn / track_user_id.mm
Created June 22, 2015 21:03
Track User ID
[Flurry setUserID:@"USER_ID"];
@ydn
ydn / set_gender.mm
Created June 22, 2015 21:01
Set Gender
[Flurry setGender:@"m"];