{"action":"opened","issue":{"url":"https://api.github.com/repos/segment-integrations/analytics-ios-integration-mixpanel/issues/37","repository_url":"https://api.github.com/repos/segment-integrations/analytics-ios-integration-mixpanel","labels_url":"https://api.github.com/repos/segment-integrations/analytics-ios-integration-mixpanel/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/segment-integrations/analytics-ios-integration-mixpanel/issues/37/comments","events_url":"https://api.github.com/repos/segment-integrations/analytics-ios-integration-mixpanel/issues/37/events","html_url":"https://github.com/segment-integrations/analytics-ios-integration-mixpanel/issues/37","id":305648059,"number":37,"title":"Support initializing Mixpanel with signal handlers, crash tracking","user":{"login":"marsepu","id":210459,"avatar_url":"https://avatars0.githubusercontent.com/u/210459?v=4","gravatar_id":"","url":"https://api.github.com/users/marsepu","html_url":"https://github.com/marsepu","followers_url":"https://api.github.com/users/marsepu/followers","following_url":"https://api.github.com/users/marsepu/following{/other_user}","gists_url":"https://api.github.com/users/marsepu/gists{/gist_id}","starred_url":"https://api.github.com/users/marsepu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marsepu/subscriptions","organizations_url":"https://api.github.com/users/marsepu/orgs","repos_url":"https://api.github.com/users/marsepu/repos","events_url":"https://api.github.com/users/marsepu/events{/privacy}","received_events_url":"https://api.github.com/users/marsepu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-15T17:26:21Z","updated_at":"2018-03-15T17:26:21Z","closed_at":null,"author_association":"NONE","body":"Currently the Mixpanel shared instance object is created using the function `[sharedInstanceWithToken: launchOptions:]` which applies default values of YES to `trackCrashes` and `automaticPushTracking` but Crashlytics sometimes  complains about multiple signal handlers in play at once. Since Mixpanel's library (MixpanelExceptionHandler class) does not support removing a handler after added could a new method be added ?\r\n\r\nCurrent:\r\n```\r\n-(instancetype)initWithSettings:(NSDictionary *)settings andLaunchOptions:(NSDictionary *)launchOptions\r\n{\r\n\r\n    if (self= [super init]) {\r\n        self.settings = settings;\r\n        NSString *token = [self.settings objectForKey:@\"token\"];\r\n        self.mixpanel = [Mixpanel sharedInstanceWithToken:token launchOptions:launchOptions];\r\n    }\r\n    return self;\r\n}\r\n```\r\n\r\nProposed:\r\n```\r\n-(instancetype)initWithSettings:(NSDictionary *)settings andLaunchOptions:(NSDictionary *)launchOptions trackCrashes:(BOOL) trackCrashes automaticPushTracking: (BOOL)automaticPushTracking\r\n{\r\n\r\n    if (self= [super init]) {\r\n        self.settings = settings;\r\n        NSString *token = [self.settings objectForKey:@\"token\"];\r\n        self.mixpanel = [Mixpanel sharedInstanceWithToken:token launchOptions:launchOptions trackCrashes: trackCrashes automaticPushTracking: automaticPushTracking];\r\n    }\r\n    return self;\r\n}\r\n\r\n-(instancetype)initWithSettings:(NSDictionary *)settings andLaunchOptions:(NSDictionary *)launchOptions\r\n{\r\n    return [self initWithSettings:settings andLaunchOptions:launchOptions trackCrashes:YES automaticPushTracking:YES];\r\n}\r\n```\r\n"}}
{"actor":{"display_login":"marsepu"}}