Skip to content

Commit

Permalink
mixpanel removal on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasMassart committed Mar 4, 2024
1 parent 330f415 commit b325747
Show file tree
Hide file tree
Showing 10 changed files with 174 additions and 438 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "ios/mixpanel-iphone"]
path = ios/mixpanel-iphone
url = https://github.com/metamask/mixpanel-iphone
[submodule "ios/branch-ios-sdk"]
path = ios/branch-ios-sdk
url = https://github.com/metamask/ios-branch-deep-linking-attribution
169 changes: 9 additions & 160 deletions ios/MetaMask.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

10 changes: 4 additions & 6 deletions ios/MetaMask/AppDelegate.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#import "AppDelegate.h"
#import <Mixpanel/Mixpanel.h>
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
Expand All @@ -25,14 +24,13 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
NSString *mixPanelTokenFromBundle = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"mixpanel_token"];

NSString *foxCode;

if(foxCodeFromBundle != nil){
foxCode = foxCodeFromBundle;
[Mixpanel sharedInstanceWithToken:mixPanelTokenFromBundle];
} else {
foxCode = @"debug";
}

// Uncomment this line to use the test key instead of the live one.
// [RNBranch useTestInstance];
[RNBranch initSessionWithLaunchOptions:launchOptions isReferrable:YES];
Expand All @@ -58,12 +56,12 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
UIView* launchScreenView = [[[NSBundle mainBundle] loadNibNamed:@"LaunchScreen" owner:self options:nil] objectAtIndex:0];
launchScreenView.frame = self.window.bounds;
rootView.loadingView = launchScreenView;

[self initializeFlipper:application];

//Uncomment the following line to enable the splashscreen on ios
//[RNSplashScreen show];

return YES;
}

Expand Down
26 changes: 12 additions & 14 deletions ios/MetaMask/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>branch_universal_link_domains</key>
<array>
<string>metamask.app.link</string>
<string>metamask-alternate.app.link</string>
<string>metamask.test.app.link</string>
<string>metamask-alternate.test.app.link</string>
</array>
<array>
<string>metamask.app.link</string>
<string>metamask-alternate.app.link</string>
<string>metamask.test.app.link</string>
<string>metamask-alternate.test.app.link</string>
</array>
<key>CFBundleURLTypes</key>
<array>
<dict>
Expand Down Expand Up @@ -128,16 +128,14 @@
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>branch_key</key>
<dict>
<key>live</key>
<string>$(MM_BRANCH_KEY_LIVE)</string>
<key>test</key>
<string>$(MM_BRANCH_KEY_TEST)</string>
</dict>
<dict>
<key>live</key>
<string>$(MM_BRANCH_KEY_LIVE)</string>
<key>test</key>
<string>$(MM_BRANCH_KEY_TEST)</string>
</dict>
<key>fox_code</key>
<string>$(MM_FOX_CODE)</string>
<key>mixpanel_token</key>
<string>$(MM_MIXPANEL_TOKEN)</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>twitter</string>
Expand Down
42 changes: 20 additions & 22 deletions ios/MetaMask/MetaMask-Flask-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@
<string>$(MARKETING_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>branch_universal_link_domains</key>
<array>
<string>metamask.app.link</string>
<string>metamask-alternate.app.link</string>
<string>metamask.test.app.link</string>
<string>metamask-alternate.test.app.link</string>
</array>
<key>CFBundleURLTypes</key>
<array>
<dict>
Expand All @@ -43,6 +36,11 @@
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>twitter</string>
<string>itms-apps</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
Expand All @@ -64,12 +62,12 @@
<string>MetaMask needs Bluetooth access to connect to external devices.</string>
<key>NSCameraUsageDescription</key>
<string>MetaMask needs camera access to scan QR codes</string>
<key>NSMicrophoneUsageDescription</key>
<string>MetaMask needs microphone access to record audio</string>
<key>NSFaceIDUsageDescription</key>
<string>$(PRODUCT_NAME) needs to authenticate</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<key>NSMicrophoneUsageDescription</key>
<string>MetaMask needs microphone access to record audio</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Allow MetaMask to save an image to your Photo Library</string>
<key>NSPhotoLibraryUsageDescription</key>
Expand Down Expand Up @@ -128,20 +126,20 @@
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>branch_key</key>
<dict>
<key>live</key>
<string>$(MM_BRANCH_KEY_LIVE)</string>
<key>test</key>
<string>$(MM_BRANCH_KEY_TEST)</string>
</dict>
<key>fox_code</key>
<string>$(MM_FOX_CODE)</string>
<key>mixpanel_token</key>
<string>$(MM_MIXPANEL_TOKEN)</string>
<key>LSApplicationQueriesSchemes</key>
<dict>
<key>live</key>
<string>$(MM_BRANCH_KEY_LIVE)</string>
<key>test</key>
<string>$(MM_BRANCH_KEY_TEST)</string>
</dict>
<key>branch_universal_link_domains</key>
<array>
<string>twitter</string>
<string>itms-apps</string>
<string>metamask.app.link</string>
<string>metamask-alternate.app.link</string>
<string>metamask.test.app.link</string>
<string>metamask-alternate.test.app.link</string>
</array>
<key>fox_code</key>
<string>$(MM_FOX_CODE)</string>
</dict>
</plist>
Loading

0 comments on commit b325747

Please sign in to comment.