Skip to content

Instantly share code, notes, and snippets.

@chrisp-fb
chrisp-fb / mixed-pods.diff
Created July 21, 2016 19:09
A patchy hack when using FBSDKPods for mixed targets where some use use_frameworks! but others do not
diff --git a/Pods/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKDeviceShareButton.h b/Pods/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKDeviceShareButton.h
index d988d29..0900f56 100644
--- a/Pods/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKDeviceShareButton.h
+++ b/Pods/FBSDKShareKit/FBSDKShareKit/FBSDKShareKit/FBSDKDeviceShareButton.h
@@ -1,35 +1,36 @@
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
@chrisp-fb
chrisp-fb / fbsdk-setup.js
Created May 24, 2016 21:23
Node script to help set up FBSDK frameworks
/*
A node script to help set up FBSDK frameworks for use with https://github.com/facebook/react-native-fbsdk
after you have already run `rnpm install react-native-fbsdk`.
Usage (Inside your react native project root):
1. Download the FBSDK frameworks into a directory ./ios/Frameworks
````
mkdir ios/Frameworks
curl -#L https://origincache.facebook.com/developers/resources/?id=facebook-ios-sdk-current.zip | bsdtar -xf- -C ./ios/
````
// Followed instructions at https://www.getstructure.io/get-the-kit/instructions
// Verified Twitter account is connected to profile
// My workflow error log:
{
"name": "Error",
"message": "Application cannot perform write actions. Contact Twitter Platform Operations through https://support.twitter.com/forms/platform"
}
CompileSwift normal x86_64 /Users/chrisp/src/playground/bug6b/Pods/Communicado/src/FacebookSDK/UIViewController+FacebookSDKSharing.swift
cd /Users/chrisp/src/playground/bug6b/Pods
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file /Users/chrisp/src/playground/bug6b/Pods/Communicado/src/FacebookSDK/UIViewController+FacebookSDKSharing.swift /Users/chrisp/src/playground/bug6b/Pods/Communicado/src/UIViewController+Sharing.swift -target x86_64-apple-ios9.0 -enable-objc-interop -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk -I /Users/chrisp/Library/Developer/Xcode/DerivedData/bug6b-dispvwdyknfmybejpshymawsfeld/Build/Products/Debug-iphonesimulator -F /Users/chrisp/Library/Developer/Xcode/DerivedData/bug6b-dispvwdyknfmybejpshymawsfeld/Build/Products/Debug-iphonesimulator -g -import-underlying-module -module-cache-path /Users/chrisp/Library/Developer/Xcode/Der
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright notice shall be
// included in all copies or substantial portions of the software.
diff --git a/src/UI/FBFriendPickerViewController.m b/src/UI/FBFriendPickerViewController.m
index f233715..da8b293 100644
--- a/src/UI/FBFriendPickerViewController.m
+++ b/src/UI/FBFriendPickerViewController.m
@@ -29,6 +29,8 @@ int const FBRefreshCacheDelaySeconds = 2;
@implementation FBFriendPickerViewController
+@dynamic selection;
+
typedef void (^MyIsValidToken)(BOOL success);
- (void) isValidTokenWithHandler:(MyIsValidToken) callback {
if (FBSession.activeSession.isOpen) {
[[FBRequest requestForMe] startWithCompletionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
FBErrorCategory category = [FBErrorUtility errorCategoryForError:error];
if (category == FBErrorCategoryAuthenticationReopenSession) {
callback(NO);
} else {
callback(YES);