Skip to content

Commit

Permalink
[FIX] Removed Mixpanel SDK.
Browse files Browse the repository at this point in the history
  • Loading branch information
Renemari Padillo committed Jul 20, 2016
1 parent b7e70c7 commit c1e8c2c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
2 changes: 0 additions & 2 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ SOFTWARE.
</intent-filter>
</config-file>
<source-file src="src/android/io/branch/BranchSDK.java" target-dir="src/io/branch" />
<framework src="com.mixpanel.android:mixpanel-android:4.+" type="gradleReference" />
<framework src="com.google.android.gms:play-services:3.1+" type="gradleReference" />
<framework src="io.branch.sdk.android:library:1+" />
</platform>

Expand Down
8 changes: 1 addition & 7 deletions src/android/io/branch/BranchSDK.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
import io.branch.referral.SharingHelper;
import io.branch.referral.util.ShareSheetStyle;

import com.mixpanel.android.mpmetrics.MixpanelAPI;

public class BranchSDK extends CordovaPlugin
{

Expand Down Expand Up @@ -585,11 +583,7 @@ private void setIdentity(String newIdentity, CallbackContext callbackContext)
private void getMixpanelInstance(String token, CallbackContext callbackContext)
{

Log.d(LCAT, "Getting Mixpanel instance");

MixpanelAPI mp = MixpanelAPI.getInstance(this.activity.getApplicationContext(), token);

Branch.getInstance().setRequestMetadata("$mixpanel_distinct_id", mp.getDistinctId());
Branch.getInstance().setRequestMetadata("$mixpanel_distinct_id", token);

callbackContext.success("Success");

Expand Down
4 changes: 3 additions & 1 deletion src/ios/BranchSDK.m
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ - (void)initSession:(CDVInvokedUrlCommand*)command

- (void)getMixpanelInstance:(CDVInvokedUrlCommand*)command
{
[[Branch getInstance] setRequestMetadataKey:@"$mixpanel_distinct_id" value:[Mixpanel sharedInstance].distinctId];

[[Branch getInstance] setRequestMetadataKey:@"$mixpanel_distinct_id" value:[command.arguments objectAtIndex:0]];

}

- (void)setDebug:(CDVInvokedUrlCommand*)command
Expand Down

0 comments on commit c1e8c2c

Please sign in to comment.