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

feat(sdks): Update to v13 of native SDKs #221

Merged
merged 9 commits into from Apr 18, 2022
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
59 changes: 33 additions & 26 deletions RNFBSDKExample/ios/Podfile.lock
Expand Up @@ -2,8 +2,8 @@ PODS:
- boost (1.76.0)
- CocoaAsyncSocket (7.6.5)
- DoubleConversion (1.1.6)
- FBAEMKit (12.3.2):
- FBSDKCoreKit_Basics (= 12.3.2)
- FBAEMKit (13.1.0):
- FBSDKCoreKit_Basics (= 13.1.0)
- FBLazyVector (0.67.2)
- FBReactNativeSpec (0.67.2):
- RCT-Folly (= 2021.06.28.00-v2)
Expand All @@ -12,14 +12,18 @@ PODS:
- React-Core (= 0.67.2)
- React-jsi (= 0.67.2)
- ReactCommon/turbomodule/core (= 0.67.2)
- FBSDKCoreKit (12.3.2):
- FBAEMKit (= 12.3.2)
- FBSDKCoreKit_Basics (= 12.3.2)
- FBSDKCoreKit_Basics (12.3.2)
- FBSDKLoginKit (12.3.2):
- FBSDKCoreKit (= 12.3.2)
- FBSDKShareKit (12.3.2):
- FBSDKCoreKit (= 12.3.2)
- FBSDKCoreKit (13.1.0):
- FBAEMKit (= 13.1.0)
- FBSDKCoreKit_Basics (= 13.1.0)
- FBSDKCoreKit_Basics (13.1.0)
- FBSDKGamingServicesKit (13.1.0):
- FBSDKCoreKit (= 13.1.0)
- FBSDKCoreKit_Basics (= 13.1.0)
- FBSDKShareKit (= 13.1.0)
- FBSDKLoginKit (13.1.0):
- FBSDKCoreKit (= 13.1.0)
- FBSDKShareKit (13.1.0):
- FBSDKCoreKit (= 13.1.0)
- Flipper (0.99.0):
- Flipper-Folly (~> 2.6)
- Flipper-RSocket (~> 1.4)
Expand Down Expand Up @@ -282,19 +286,20 @@ PODS:
- React-jsinspector (0.67.2)
- React-logger (0.67.2):
- glog
- react-native-fbsdk-next (7.1.0):
- react-native-fbsdk-next (7.3.3):
- React-Core
- react-native-fbsdk-next/Core (= 7.1.0)
- react-native-fbsdk-next/Login (= 7.1.0)
- react-native-fbsdk-next/Share (= 7.1.0)
- react-native-fbsdk-next/Core (7.1.0):
- FBSDKCoreKit (~> 12.3.2)
- react-native-fbsdk-next/Core (= 7.3.3)
- react-native-fbsdk-next/Login (= 7.3.3)
- react-native-fbsdk-next/Share (= 7.3.3)
- react-native-fbsdk-next/Core (7.3.3):
- FBSDKCoreKit (~> 13.1.0)
- React-Core
- react-native-fbsdk-next/Login (7.1.0):
- FBSDKLoginKit (~> 12.3.2)
- react-native-fbsdk-next/Login (7.3.3):
- FBSDKLoginKit (~> 13.1.0)
- React-Core
- react-native-fbsdk-next/Share (7.1.0):
- FBSDKShareKit (~> 12.3.2)
- react-native-fbsdk-next/Share (7.3.3):
- FBSDKGamingServicesKit (~> 13.1.0)
- FBSDKShareKit (~> 13.1.0)
- React-Core
- React-perflogger (0.67.2)
- React-RCTActionSheet (0.67.2):
Expand Down Expand Up @@ -428,6 +433,7 @@ SPEC REPOS:
- FBAEMKit
- FBSDKCoreKit
- FBSDKCoreKit_Basics
- FBSDKGamingServicesKit
- FBSDKLoginKit
- FBSDKShareKit
- Flipper
Expand Down Expand Up @@ -512,13 +518,14 @@ SPEC CHECKSUMS:
boost: a7c83b31436843459a1961bfd74b96033dc77234
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662
FBAEMKit: 955ca52eba8219c20f90774e8c6ff8bc7b3192a3
FBAEMKit: 9ce89760a23f03ffecd907c8e1f3201160f2dcc7
FBLazyVector: 244195e30d63d7f564c55da4410b9a24e8fbceaa
FBReactNativeSpec: c94002c1d93da3658f4d5119c6994d19961e3d52
FBSDKCoreKit: 678f64eda3f0ff25c189c2ebbfe87b1d96a85a6d
FBSDKCoreKit_Basics: 6bee7c1f0932432901781203fa5e587ec5099148
FBSDKLoginKit: 56d55e23fe66a6db045826190b0b4dbc0e1ca0a0
FBSDKShareKit: 4ef957addab76816116ea92bd872e792f7137669
FBSDKCoreKit: eff97dea778dbe6cc4498959cffb619c75675102
FBSDKCoreKit_Basics: c151609a1cf6976a5958febcf0043266a8fd5151
FBSDKGamingServicesKit: c05d00fe9d6a01c484ae8b025915b778fabc1944
FBSDKLoginKit: 42932c7ad6f6b91854fc0a6bcc79b7e807bcde4b
FBSDKShareKit: ba73d5d51af028bfc9e6fa34be16340fe055e0fa
Flipper: 30e8eeeed6abdc98edaf32af0cda2f198be4b733
Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c
Flipper-DoubleConversion: 57ffbe81ef95306cc9e69c4aa3aeeeeb58a6a28c
Expand All @@ -544,7 +551,7 @@ SPEC CHECKSUMS:
React-jsiexecutor: 52beb652bbc61201bd70cbe4f0b8edb607e8da4f
React-jsinspector: 595f76eba2176ebd8817a1fffd47b84fbdab9383
React-logger: 23de8ea0f44fa00ee77e96060273225607fd4d78
react-native-fbsdk-next: 7fa197c23545e36aa7549ef1ede3a63669981bc5
react-native-fbsdk-next: 447b2ffafedecf5fe9a99c35023099d38fa31fda
React-perflogger: 3c9bb7372493e49036f07a82c44c8cf65cbe88db
React-RCTActionSheet: 052606483045a408693aa7e864410b4a052f541a
React-RCTAnimation: 08d4cac13222bb1348c687a0158dfd3b577cdb63
Expand Down
116 changes: 58 additions & 58 deletions RNFBSDKExample/ios/RNFBSDKExample.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion android/build.gradle
Expand Up @@ -44,7 +44,7 @@ repositories {
google()
}

def FACEBOOK_SDK_VERSION = safeExtGet('facebookSdkVersion', '12.+')
def FACEBOOK_SDK_VERSION = safeExtGet('facebookSdkVersion', '13.+')

dependencies {
//noinspection GradleDynamicVersion
Expand Down
Expand Up @@ -168,10 +168,6 @@ public static GameRequestContent buildGameRequestContent(ReadableMap gameRequest
public static ShareLinkContent buildShareLinkContent(ReadableMap shareLinkContent) {
ShareLinkContent.Builder contentBuilder = new ShareLinkContent.Builder();
contentBuilder.setContentUrl(Uri.parse(shareLinkContent.getString("contentUrl")));
String url = getValueOrNull(shareLinkContent, "imageUrl");
contentBuilder.setImageUrl(url != null ? Uri.parse(url) : null);
contentBuilder.setContentDescription(getValueOrNull(shareLinkContent, "contentDescription"));
contentBuilder.setContentTitle(getValueOrNull(shareLinkContent, "contentTitle"));
mikehardy marked this conversation as resolved.
Show resolved Hide resolved
contentBuilder.setQuote(getValueOrNull(shareLinkContent, "quote"));
appendGenericContent(contentBuilder, shareLinkContent);
return contentBuilder.build();
Expand Down
6 changes: 3 additions & 3 deletions ios/RCTFBSDK/share/RCTConvert+FBSDKSharingContent.m
Expand Up @@ -55,7 +55,7 @@ static void RCTAppendGenericContent(RCTFBSDKSharingContent contentObject, NSDict
contentObject.peopleIDs = [RCTConvert NSStringArray:contentData[@"peopleIds"]];
contentObject.placeID = [RCTConvert NSString:contentData[@"placeId"]];
contentObject.ref = [RCTConvert NSString:contentData[@"ref"]];
contentObject.hashtag = [FBSDKHashtag hashtagWithString:[RCTConvert NSString:contentData[@"hashtag"]]];
contentObject.hashtag = [[FBSDKHashtag alloc] initWithString: [RCTConvert NSString:contentData[@"hashtag"]]];
}
}

Expand Down Expand Up @@ -88,7 +88,7 @@ static void RCTAppendGenericContent(RCTFBSDKSharingContent contentObject, NSDict
{
UIImage *image = [RCTConvert UIImage:photoData[@"imageUrl"]];
BOOL userGenerated = [RCTConvert BOOL:photoData[@"userGenerated"]];
FBSDKSharePhoto *photo = [FBSDKSharePhoto photoWithImage:image userGenerated:userGenerated];
FBSDKSharePhoto *photo =[ [FBSDKSharePhoto alloc] initWithImage:image isUserGenerated:userGenerated];
photo.caption = [RCTConvert NSString:photoData[@"caption"]];
return photo;
}
Expand All @@ -98,7 +98,7 @@ static void RCTAppendGenericContent(RCTFBSDKSharingContent contentObject, NSDict
FBSDKShareVideoContent *videoContent = [[FBSDKShareVideoContent alloc] init];
NSDictionary *videoData = [RCTConvert NSDictionary:contentData[@"video"]];
NSURL *videoURL = [RCTConvert NSURL:videoData[@"localUrl"]];
FBSDKShareVideo *video = [FBSDKShareVideo videoWithVideoURL:videoURL];
FBSDKShareVideo *video = [[FBSDKShareVideo alloc] initWithVideoURL:videoURL previewPhoto:nil];
if (contentData[@"previewPhoto"]) {
FBSDKSharePhoto *previewPhoto = RCTBuildPhoto([RCTConvert NSDictionary:contentData[@"previewPhoto"]]);
video.previewPhoto = previewPhoto;
Expand Down
2 changes: 1 addition & 1 deletion ios/RCTFBSDK/share/RCTFBSDKGameRequestDialog.h
Expand Up @@ -18,7 +18,7 @@

#import <React/RCTBridgeModule.h>

#import <FBSDKShareKit/FBSDKShareKit.h>
@import FBSDKGamingServicesKit;

@interface RCTFBSDKGameRequestDialog : NSObject <RCTBridgeModule>
@end
5 changes: 3 additions & 2 deletions ios/RCTFBSDK/share/RCTFBSDKGameRequestDialog.m
Expand Up @@ -73,8 +73,9 @@ - (dispatch_queue_t)methodQueue
- (instancetype)init
{
if ((self = [super init])) {
_dialog = [[FBSDKGameRequestDialog alloc] init];
_dialog.delegate = self;
// Is no longer possible to initialize a dialog without content
FBSDKGameRequestContent *emptyContent = [[FBSDKGameRequestContent alloc] init];
_dialog = [[FBSDKGameRequestDialog alloc] initWithContent:emptyContent delegate:self];
}
return self;
}
Expand Down
3 changes: 1 addition & 2 deletions ios/RCTFBSDK/share/RCTFBSDKMessageDialog.m
Expand Up @@ -44,8 +44,7 @@ - (dispatch_queue_t)methodQueue
- (instancetype)init
{
if ((self = [super init])) {
_dialog = [[FBSDKMessageDialog alloc] init];
_dialog.delegate = self;
_dialog = [[FBSDKMessageDialog alloc] initWithContent:nil delegate:self];
}
return self;
}
Expand Down
9 changes: 5 additions & 4 deletions react-native-fbsdk-next.podspec
Expand Up @@ -10,21 +10,22 @@ Pod::Spec.new do |s|
s.license = package['license']
s.homepage = package['homepage']
s.source = { :git => 'https://github.com/thebergamo/react-native-fbsdk-next.git', :tag => "v#{package['version']}" }
s.platforms = { :ios => "10.0", :tvos => "10.0" }
s.platforms = { :ios => "11.0", :tvos => "11.0" }
s.dependency 'React-Core'

s.subspec 'Core' do |ss|
ss.dependency 'FBSDKCoreKit', '~> 12.3.2'
ss.dependency 'FBSDKCoreKit', '~> 13.1.0'
ss.source_files = 'ios/RCTFBSDK/core/*.{h,m}'
end

s.subspec 'Login' do |ss|
ss.dependency 'FBSDKLoginKit', '~> 12.3.2'
ss.dependency 'FBSDKLoginKit', '~> 13.1.0'
ss.source_files = 'ios/RCTFBSDK/login/*.{h,m}'
end

s.subspec 'Share' do |ss|
ss.dependency 'FBSDKShareKit', '~> 12.3.2'
ss.dependency 'FBSDKShareKit', '~> 13.1.0'
ss.dependency 'FBSDKGamingServicesKit', '~> 13.1.0'
ss.source_files = 'ios/RCTFBSDK/share/*.{h,m}'
end
end