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

[MX-462] - Disable idfa access by Facebook sdk #3809

Merged
merged 4 commits into from
Sep 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Artsy/App_Resources/Artsy-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@
<string>308278682573501</string>
<key>FacebookDisplayName</key>
<string>Artsy</string>
<key>FacebookAdvertiserIDCollectionEnabled</key>
<false/>
<key>GITCommitRev</key>
<string>4f76194c</string>
<key>GITCommitSha</key>
Expand Down
10 changes: 6 additions & 4 deletions Artsy/Networking/ARAuthProviders.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

#import <AFOAuth1Client/AFOAuth1Client.h>
#import <AFOAuth1Client/AFOAuth1Token.h>
#import <FBSDKLoginKit/FBSDKLoginKit.h>
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <FBSDKLoginKit/FBSDKLoginKit.h>

#import <ARAnalytics/ARAnalytics.h>
#import "ARAnalyticsConstants.h"
Expand All @@ -18,7 +18,9 @@ + (void)getTokenForFacebook:(void (^)(NSString *token, NSString *email, NSString
NSParameterAssert(success);

FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];
[login logInWithReadPermissions:@[ @"email" ] fromViewController:nil handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
[login logInWithPermissions:@[@"email"]
fromViewController:nil
handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
if (error) {
ARErrorLog(@"Failed to log in to Facebook: %@", error.localizedDescription);
failure(error);
Expand All @@ -32,8 +34,8 @@ + (void)getTokenForFacebook:(void (^)(NSString *token, NSString *email, NSString
failure(error);

} else {
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:@"me?fields=name,id,email" parameters:nil];
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:@"me?fields=name,id,email" parameters:@{ @"message" : @"This is a status update" }];

// We need to disable FB's in-house error reporting so we can show our own
[request setGraphErrorRecoveryDisabled:YES];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, NSDictionary *user, NSError *error) {
Expand Down
13 changes: 1 addition & 12 deletions Artsy/View_Controllers/Admin/ARAdminSettingsViewController.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#import <MobileCoreServices/MobileCoreServices.h>
#import <ReplayKit/ReplayKit.h>
#import <AdSupport/ASIdentifierManager.h>

#import "ARAdminSettingsViewController.h"
#import "AREchoContentsViewController.h"
Expand Down Expand Up @@ -86,8 +85,7 @@ - (void)viewDidLoad

ARSectionData *toggleSections = [[ARSectionData alloc] initWithCellDataArray:@[
[self generateOnScreenAnalytics],
[self generateOnScreenMartsy],
[self copyAdvertisingID]
[self generateOnScreenMartsy]
]];
toggleSections.headerTitle = @"Options";
[tableViewData addSectionData:toggleSections];
Expand Down Expand Up @@ -144,15 +142,6 @@ - (ARCellData *)generateRestart
}];
}

- (ARCellData *)copyAdvertisingID
{
return [self tappableCellDataWithTitle:@"Copy Advertising ID" selectionWithCell:^(UITableViewCell *cell) {
NSUUID *adId = [[ASIdentifierManager sharedManager] advertisingIdentifier];
[[UIPasteboard generalPasteboard] setValue:[adId UUIDString] forPasteboardType:(NSString *)kUTTypePlainText];
cell.textLabel.text = @"Copied";
}];
}

- (ARCellData *)generateStagingSwitch
{
BOOL useStaging = [AROptions boolForOption:ARUseStagingDefault];
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ upcoming:
- Fix deep link handling edge case - david
- Connects new My Bids view to causality's lot standings - erik
- Removes AFNetworking/UIKit subspec - ash
- Disable facebook access to idfa - brian
- Adds lab option for new inquiry flow - lily
user_facing:
- Fix shows save button - mounir
Expand Down
4 changes: 2 additions & 2 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ target 'Artsy' do
pod 'Pulley', git: 'https://github.com/l2succes/Pulley.git', branch: 'master'

# Facebook
pod 'FBSDKCoreKit', '~> 4.33'
pod 'FBSDKLoginKit', '~> 4.33'
pod 'FBSDKCoreKit', '~> 7.1.1'
pod 'FBSDKLoginKit', '~> 7.1.1'

# Analytics
pod 'Analytics'
Expand Down
32 changes: 15 additions & 17 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ PODS:
- "Artsy+UIColors (~> 3.0)"
- "Artsy+UIFonts"
- "UIView+BooleanAnimations"
- Bolts (1.9.0):
- Bolts/AppLinks (= 1.9.0)
- Bolts/Tasks (= 1.9.0)
- Bolts/AppLinks (1.9.0):
- Bolts/Tasks
- Bolts/Tasks (1.9.0)
- boost-for-react-native (1.63.0)
- BVLinearGradient (2.5.6):
- React
Expand Down Expand Up @@ -118,10 +112,16 @@ PODS:
- React-Core (= 0.62.1)
- React-jsi (= 0.62.1)
- ReactCommon/turbomodule/core (= 0.62.1)
- FBSDKCoreKit (4.37.0):
- Bolts (~> 1.7)
- FBSDKLoginKit (4.37.0):
- FBSDKCoreKit
- FBSDKCoreKit (7.1.1):
- FBSDKCoreKit/Basics (= 7.1.1)
- FBSDKCoreKit/Core (= 7.1.1)
- FBSDKCoreKit/Basics (7.1.1)
- FBSDKCoreKit/Core (7.1.1):
- FBSDKCoreKit/Basics
- FBSDKLoginKit (7.1.1):
- FBSDKLoginKit/Login (= 7.1.1)
- FBSDKLoginKit/Login (7.1.1):
- FBSDKCoreKit (~> 7.1.1)
- FBSnapshotTestCase (2.1.4):
- FBSnapshotTestCase/SwiftSupport (= 2.1.4)
- FBSnapshotTestCase/Core (2.1.4)
Expand Down Expand Up @@ -484,8 +484,8 @@ DEPENDENCIES:
- Extraction
- FBLazyVector (from `node_modules/react-native/Libraries/FBLazyVector`)
- FBReactNativeSpec (from `node_modules/react-native/Libraries/FBReactNativeSpec`)
- FBSDKCoreKit (~> 4.33)
- FBSDKLoginKit (~> 4.33)
- FBSDKCoreKit (~> 7.1.1)
- FBSDKLoginKit (~> 7.1.1)
- FBSnapshotTestCase
- FLKAutoLayout (from `https://github.com/orta/FLKAutoLayout.git`, branch `v1`)
- Folly (from `node_modules/react-native/third-party-podspecs/Folly.podspec`)
Expand Down Expand Up @@ -565,7 +565,6 @@ SPEC REPOS:
- AFNetworking
- Analytics
- ARAnalytics
- Bolts
- boost-for-react-native
- DHCShakeNotifier
- EDColor
Expand Down Expand Up @@ -771,7 +770,6 @@ SPEC CHECKSUMS:
"Artsy+UIFonts": 597c44f264aead6bdc21898b690addd90e14edbd
"Artsy+UILabels": 7cb6e290a4f70dddba037b7dbeb21e90b49d7275
Artsy-UIButtons: 3c396f0fad352a7b0332100e0ffcb0ca577e0082
Bolts: ac6567323eac61e203f6a9763667d0f711be34c8
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
BVLinearGradient: e3aad03778a456d77928f594a649e96995f1c872
CocoaLumberjack: 27ae9abcd376c3e4ee726ecd4adfd7b093ddef3f
Expand All @@ -784,8 +782,8 @@ SPEC CHECKSUMS:
Extraction: 2be993a17f8f8c4fac988ebecaed93a409181faf
FBLazyVector: 95ee3e58937a6052f86b0e32f142388c22fa22c5
FBReactNativeSpec: 26dd6459299e48cd64eb397c45635e466dba9f45
FBSDKCoreKit: fe5f3474499a81963e11e3f3a5c753d0a95ca2b4
FBSDKLoginKit: 2f7249686d1e30ce8a5ef5400eedf50b3e3df332
FBSDKCoreKit: b46507dc8b8cefed31d644e74d7cc30e2a715ef8
FBSDKLoginKit: 1a61d79e2b25e2fc0d03dccab1e34b38bbdf2546
FBSnapshotTestCase: 094f9f314decbabe373b87cc339bea235a63e07a
FLKAutoLayout: 106b14dbae09d32c6730190f4e78a959759ba4a4
Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51
Expand Down Expand Up @@ -861,6 +859,6 @@ SPEC CHECKSUMS:
"XCTest+OHHTTPStubSuiteCleanUp": 4469ec8863c6bc022c5089a9b94233eb3416c5ee
Yoga: 50fb6eb13d2152e7363293ff603385db380815b1

PODFILE CHECKSUM: f4d3a058efae4a0c50c717249f6eaf4d8926cd22
PODFILE CHECKSUM: 436875f0df88fbb6a7ca67ddf75df4beee50121d

COCOAPODS: 1.7.5