Permalink
Browse files

Cleanup and cosmetic improvements to projects

Summary: Removing code that wasn't ready

Test Plan: n/a

Reviewers: gregschechte, clang

Reviewed By: gregschechte

CC: msdkexp@

Differential Revision: https://phabricator.fb.com/D583756

Task ID: 1731992
  • Loading branch information...
1 parent 48843a7 commit ef58c14c000233602e69dcb6055eb907b791cdd6 @onebit onebit committed Sep 25, 2012
View
2 samples/BooleanOGSample/BooleanOGSample.xcodeproj/project.pbxproj
@@ -98,7 +98,6 @@
84070D0B1540AA2B00E39703 = {
isa = PBXGroup;
children = (
- 85A928C616114684008699F1 /* Social.framework */,
84070D201540AA2B00E39703 /* BooleanOGSample */,
84070D191540AA2B00E39703 /* Frameworks */,
84070D171540AA2B00E39703 /* Products */,
@@ -116,6 +115,7 @@
84070D191540AA2B00E39703 /* Frameworks */ = {
isa = PBXGroup;
children = (
+ 85A928C616114684008699F1 /* Social.framework */,
B9A4167116113E93001E7A77 /* AdSupport.framework */,
DE1C9C2B15CC8FE400809B9E /* FBUserSettingsViewResources.bundle */,
DE1C9C2915CC8F9A00809B9E /* FacebookSDKResources.bundle */,
View
2 samples/FriendPickerSample/FriendPickerSample.xcodeproj/project.pbxproj
@@ -80,7 +80,6 @@
E2D6B80315413A560050835F = {
isa = PBXGroup;
children = (
- 85A928B81611462C008699F1 /* Social.framework */,
E2D6B81815413A570050835F /* FriendPickerSample */,
E2D6B81115413A570050835F /* Frameworks */,
E2D6B80F15413A570050835F /* Products */,
@@ -98,6 +97,7 @@
E2D6B81115413A570050835F /* Frameworks */ = {
isa = PBXGroup;
children = (
+ 85A928B81611462C008699F1 /* Social.framework */,
B9A4167816113EAE001E7A77 /* AdSupport.framework */,
DD37EA8515ABA4670015966B /* FacebookSDKResources.bundle */,
DD37EA8715ABA46B0015966B /* FacebookSDK.framework */,
View
2 samples/Hackbook/Hackbook.xcodeproj/project.pbxproj
@@ -124,7 +124,6 @@
30EA734E13F5D21B003DC0D2 = {
isa = PBXGroup;
children = (
- 85A928BF16114663008699F1 /* Social.framework */,
30EA73CC13F5D50D003DC0D2 /* FBConnect */,
30EA736313F5D21B003DC0D2 /* Hackbook */,
30EA735C13F5D21B003DC0D2 /* Frameworks */,
@@ -143,6 +142,7 @@
30EA735C13F5D21B003DC0D2 /* Frameworks */ = {
isa = PBXGroup;
children = (
+ 85A928BF16114663008699F1 /* Social.framework */,
B9A4167F16113EC3001E7A77 /* AdSupport.framework */,
84750A9F160A259400C1A13D /* Accounts.framework */,
DD37EA8E15ABA4920015966B /* FacebookSDK.framework */,
View
2 samples/HelloFacebookSample/HelloFacebookSample.xcodeproj/project.pbxproj
@@ -83,7 +83,6 @@
5F6AF17E1532A37B00DDBD75 = {
isa = PBXGroup;
children = (
- 85A928A21611305A008699F1 /* Social.framework */,
5F6AF1931532A37B00DDBD75 /* HelloFacebookSample */,
5F6AF18C1532A37B00DDBD75 /* Frameworks */,
5F6AF18A1532A37B00DDBD75 /* Products */,
@@ -101,6 +100,7 @@
5F6AF18C1532A37B00DDBD75 /* Frameworks */ = {
isa = PBXGroup;
children = (
+ 85A928A21611305A008699F1 /* Social.framework */,
B9A4168616113ED6001E7A77 /* AdSupport.framework */,
5FC4959715C21151007EE54E /* CoreLocation.framework */,
DD37EAC215ABA8FE0015966B /* FacebookSDKResources.bundle */,
View
2 samples/JustRequestSample/JustRequestSample.xcodeproj/project.pbxproj
@@ -78,7 +78,6 @@
E2511732152BB6FE00CB342A = {
isa = PBXGroup;
children = (
- 85A928CD161146AC008699F1 /* Social.framework */,
E2511747152BB6FE00CB342A /* JustRequestSample */,
E2511740152BB6FE00CB342A /* Frameworks */,
E251173E152BB6FE00CB342A /* Products */,
@@ -96,6 +95,7 @@
E2511740152BB6FE00CB342A /* Frameworks */ = {
isa = PBXGroup;
children = (
+ 85A928CD161146AC008699F1 /* Social.framework */,
B9A4168D16113EE7001E7A77 /* AdSupport.framework */,
DDA290AC15ABA96200F533F9 /* FacebookSDK.framework */,
84605AAF15A77B8600197AA7 /* Accounts.framework */,
View
2 samples/PlacePickerSample/PlacePickerSample.xcodeproj/project.pbxproj
@@ -83,7 +83,6 @@
B9AF4B99152E43EE00E9BA6C = {
isa = PBXGroup;
children = (
- 85A928D4161146C7008699F1 /* Social.framework */,
B9AF4BAE152E43EE00E9BA6C /* PlacePickerSample */,
B9AF4BA7152E43EE00E9BA6C /* Frameworks */,
B9AF4BA5152E43EE00E9BA6C /* Products */,
@@ -101,6 +100,7 @@
B9AF4BA7152E43EE00E9BA6C /* Frameworks */ = {
isa = PBXGroup;
children = (
+ 85A928D4161146C7008699F1 /* Social.framework */,
B9A4169416113EF8001E7A77 /* AdSupport.framework */,
DD37EA7715ABA3E70015966B /* FacebookSDK.framework */,
DD37EA7515ABA3DF0015966B /* FacebookSDKResources.bundle */,
View
4 samples/ProfilePictureSample/ProfilePictureSample.xcodeproj/project.pbxproj
@@ -80,8 +80,6 @@
B98686AD151D0B3700616412 = {
isa = PBXGroup;
children = (
- 85A928DB161146E2008699F1 /* Social.framework */,
- 847BBEA9160B88E8004EC7CB /* Accounts.framework */,
B98686C2151D0B3700616412 /* ProfilePictureSample */,
B98686BB151D0B3700616412 /* Frameworks */,
B98686B9151D0B3700616412 /* Products */,
@@ -99,6 +97,8 @@
B98686BB151D0B3700616412 /* Frameworks */ = {
isa = PBXGroup;
children = (
+ 85A928DB161146E2008699F1 /* Social.framework */,
+ 847BBEA9160B88E8004EC7CB /* Accounts.framework */,
B9A4169B16113F0A001E7A77 /* AdSupport.framework */,
DD37EA6E15ABA3AC0015966B /* FacebookSDK.framework */,
DD37EA6C15ABA39D0015966B /* FacebookSDKResources.bundle */,
View
2 samples/Scrumptious/Scrumptious.xcodeproj/project.pbxproj
@@ -108,7 +108,6 @@
B9CD0A64150EA4DD00560A93 = {
isa = PBXGroup;
children = (
- 85A928E216114706008699F1 /* Social.framework */,
B9CD0A79150EA4DD00560A93 /* Scrumptious */,
B9CD0A72150EA4DD00560A93 /* Frameworks */,
B9CD0A70150EA4DD00560A93 /* Products */,
@@ -126,6 +125,7 @@
B9CD0A72150EA4DD00560A93 /* Frameworks */ = {
isa = PBXGroup;
children = (
+ 85A928E216114706008699F1 /* Social.framework */,
B9A416A216113F1C001E7A77 /* AdSupport.framework */,
8534B4DE15CC657900348ED2 /* FBUserSettingsViewResources.bundle */,
DD55EAB015ABA246000A64B8 /* FacebookSDKResources.bundle */,
View
2 samples/SessionLoginSample/SessionLoginSample.xcodeproj/project.pbxproj
@@ -78,7 +78,6 @@
84C757AD152A38770070DD9C = {
isa = PBXGroup;
children = (
- 85A928E91611471C008699F1 /* Social.framework */,
84C757C2152A38770070DD9C /* SessionLoginSample */,
84C757BB152A38770070DD9C /* Frameworks */,
84C757B9152A38770070DD9C /* Products */,
@@ -96,6 +95,7 @@
84C757BB152A38770070DD9C /* Frameworks */ = {
isa = PBXGroup;
children = (
+ 85A928E91611471C008699F1 /* Social.framework */,
B9A416A916113F2D001E7A77 /* AdSupport.framework */,
DDA290A315ABA93700F533F9 /* FacebookSDK.framework */,
84A5DA9D15A68D1500FE54AF /* Accounts.framework */,
View
2 samples/SwitchUserSample/SwitchUserSample.xcodeproj/project.pbxproj
@@ -101,7 +101,6 @@
856DB03E153393C3006F6A33 = {
isa = PBXGroup;
children = (
- 85A928F016114738008699F1 /* Social.framework */,
856DB053153393C3006F6A33 /* SwitchUserSample */,
856DB04C153393C3006F6A33 /* Frameworks */,
856DB04A153393C3006F6A33 /* Products */,
@@ -119,6 +118,7 @@
856DB04C153393C3006F6A33 /* Frameworks */ = {
isa = PBXGroup;
children = (
+ 85A928F016114738008699F1 /* Social.framework */,
B9A416B016113F3E001E7A77 /* AdSupport.framework */,
DD37EA6415ABA33D0015966B /* FacebookSDKResources.bundle */,
DD55EAA415AB9D1A000A64B8 /* FacebookSDK.framework */,
View
2 src/FBFriendPickerViewController.m
@@ -230,8 +230,6 @@ - (void)viewDidLoad
self.tableView.delegate = self.selectionManager;
[self.dataSource bindTableView:self.tableView];
self.loader.tableView = self.tableView;
-
- [FBUtility logInsightsEvent:@"_friendPickerLaunch" session:_session];
}
- (void)viewDidUnload {
View
6 src/FBNativeDialogs.m
@@ -87,17 +87,13 @@ + (BOOL)presentShareDialogModallyFrom:(UIViewController*)viewController
[composeViewController setCompletionHandler:^(SLComposeViewControllerResult result) {
BOOL cancelled = (result == SLComposeViewControllerResultCancelled);
- NSString *eventToLog = cancelled ? @"_shareDialogCancel" : @"_shareDialogPost";
- [FBUtility logInsightsEvent:eventToLog session:session];
if (handler) {
handler(cancelled ? FBNativeDialogResultCancelled : FBNativeDialogResultSucceeded, nil);
}
}];
[viewController presentModalViewController:composeViewController animated:YES];
-
- [FBUtility logInsightsEvent:@"_shareDialogLaunch" session:session];
-
+
return YES;
}
View
2 src/FBPlacePickerViewController.m
@@ -298,8 +298,6 @@ - (void)viewDidLoad
self.tableView.delegate = self.selectionManager;
[self.dataSource bindTableView:self.tableView];
self.loader.tableView = self.tableView;
-
- [FBUtility logInsightsEvent:@"_placePickerLaunch" session:_session];
}
- (void)viewDidUnload
View
3 src/FBUtility.h
@@ -40,9 +40,6 @@
withDefault:(NSString *)value
inBundle:(NSBundle *)bundle;
-+ (void)logInsightsEvent:(NSString *)eventName
- session:(FBSession *)session;
-
@end
#define FBConditionalLog(condition, desc, ...) \
View
102 src/FBUtility.m
@@ -23,14 +23,6 @@
@implementation FBUtility
-typedef enum {
- AttributionIDSendNotChecked,
- AttributionIDSendAllowed,
- AttributionIDSendDisallowed
-} AttributionIDSendStatus;
-
-static AttributionIDSendStatus g_attributionIDSendStatus = AttributionIDSendNotChecked;
-
// finishes the parsing job that NSURL starts
+ (NSDictionary*)dictionaryByParsingURLQueryPart:(NSString *)encodedString {
@@ -153,98 +145,4 @@ + (NSString *)localizedStringForKey:(NSString *)key
return result;
}
-+ (void)logInsightsEvent:(NSString *)eventName
- session:(FBSession *)session {
-
- NSString *appID = [FBSession defaultAppID];
- if (!appID) {
- return;
- }
-
- // Need to check whether attribution send is needed or allowed.
- if (session || g_attributionIDSendStatus != AttributionIDSendNotChecked) {
-
- // Have the information we need, send immediately.
- [self sendInsightsEvent:eventName session:session];
-
- } else {
-
-
- NSString *pingPath = [NSString stringWithFormat:@"%@?fields=supports_attribution", appID, nil];
- FBRequest *pingRequest = [[[FBRequest alloc] initWithSession:nil graphPath:pingPath] autorelease];
-
- [pingRequest startWithCompletionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
-
- @try {
-
- if (!error &&
- [result respondsToSelector:@selector(objectForKey:)] &&
- [[result objectForKey:@"supports_attribution"] boolValue]) {
-
- g_attributionIDSendStatus = AttributionIDSendAllowed;
-
- } else {
-
- // Any error or malformed response winds up here.
- g_attributionIDSendStatus = AttributionIDSendDisallowed;
-
- }
-
- [self sendInsightsEvent:eventName session:session];
-
- } @catch (NSException *blockException) {
-
- NSLog(@"Failure during logInsightsEvent ping callback: '%@'", blockException.reason);
-
- }
- }
- ];
- }
-}
-
-+ (void)sendInsightsEvent:(NSString *)eventName
- session:(FBSession *)session {
-
- @try {
-
- NSString *graphPath = [NSString stringWithFormat:@"%@/activities", [FBSession defaultAppID]];
-
- NSString *attributionID = @"";
- if (g_attributionIDSendStatus == AttributionIDSendAllowed) {
- attributionID = [[UIPasteboard pasteboardWithName:@"fb_app_attribution" create:NO] string] ?: @"";
- }
-
- NSArray *customEvents = @[
- @{ @"_eventName" : eventName }
- ];
-
- NSError *myError = nil;
- FBSBJSON *writer = [[FBSBJSON alloc] init];
- NSString *customEventsJSON = [writer stringWithFragment:customEvents error:&myError];
- FBConditionalLog(!myError, @"Shouldn't get a JSON encoding error");
- [writer release];
-
- NSDictionary *postParameters =
- @{
- @"event" : @"CUSTOM_APP_EVENTS",
- @"attribution": attributionID,
- @"custom_events" : customEventsJSON,
- };
-
- FBRequest *request = [[[FBRequest alloc] initWithSession:session
- graphPath:graphPath
- parameters:postParameters
- HTTPMethod:@"POST"] autorelease];
-
- // Fire and forget
- [request startWithCompletionHandler:nil];
-
- } @catch (NSException *exception) {
-
- NSLog(@"Failure during sendInsightsEvent: '%@'", exception.reason);
-
- }
-}
-
-
@end

0 comments on commit ef58c14

Please sign in to comment.