Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added fix for empty strings as cta urls #107

Closed
wants to merge 2 commits into from
Closed

Conversation

malectro
Copy link
Contributor

No description provided.

@@ -5,7 +5,7 @@
#import "ViewController.h"

// IMPORTANT!!! replace with you api token from https://mixpanel.com/account/
#define MIXPANEL_TOKEN @"YOUR_MIXPANEL_PROJECT_TOKEN"
#define MIXPANEL_TOKEN @"metrics-1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert

fixed cta_url string parsing and added extra testing
@@ -59,17 +59,19 @@ + (MPNotification *)notificationWithJSONObject:(NSDictionary *)object
}

NSURL *callToActionURL = nil;
NSObject *URLString = object[@"cta_url"];
NSString *URLString = object[@"cta_url"];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started calling this NSObject just to make clear that we don't know what type it is until we check isKindOfClass. But maybe its just more confusing and adds a ton of casts throughout the code. It can stay this way.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figured that if we went that route, we'd have to play the same way with all the other values we're parsing. It might actually merit its own pull request in the future.

@malectro malectro closed this Mar 20, 2014
gmorning pushed a commit to gmorning/mixpanel-iphone that referenced this pull request Apr 28, 2020
…el#107)

* persist identity in UserDefaults in case archive is corrupt. also some Xcode9 warning fixes

* more xcode9 fixes and unit test for persistent identity

* revert token
@zihejia zihejia deleted the inapp-fixes branch April 1, 2021 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants