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

Update to work with iOS SDK v12.3.2 #597

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### Changed - 2022-02-17
- Bumped native iOS SDK versions to 12.3.2

## [12.0.0] - 2021-12-09

### Added
Expand Down
10 changes: 5 additions & 5 deletions UnitySDK/Assets/FacebookSDK/Plugins/Editor/Dependencies.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
<androidPackage spec="com.facebook.android:facebook-gamingservices:[12.1, 13)" />
</androidPackages>
<iosPods>
<iosPod name="FBSDKCoreKit_Basics" version="~> 12.1" />
<iosPod name="FBSDKCoreKit" version="~> 12.1" />
<iosPod name="FBSDKLoginKit" version="~> 12.1" />
<iosPod name="FBSDKShareKit" version="~> 12.1" />
<iosPod name="FBSDKGamingServicesKit" version="~> 12.1" />
<iosPod name="FBSDKCoreKit_Basics" version="~> 12.3.2" />
<iosPod name="FBSDKCoreKit" version="~> 12.3.2" />
<iosPod name="FBSDKLoginKit" version="~> 12.3.2" />
<iosPod name="FBSDKShareKit" version="~> 12.3.2" />
<iosPod name="FBSDKGamingServicesKit" version="~> 12.3.2" />
</iosPods>
</dependencies>
13 changes: 11 additions & 2 deletions UnitySDK/Assets/FacebookSDK/SDK/Editor/iOS/FBUnityInterface.mm
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ void IOSFBAppEventsLogPurchase(double amount,

void IOSFBAppEventsSetLimitEventUsage(BOOL limitEventUsage)
{
[FBSDKSettings.sharedSettings setLimitEventAndDataUsage:limitEventUsage];
[FBSDKSettings.sharedSettings setIsEventDataUsageLimited:limitEventUsage];
}

void IOSFBAutoLogAppEventsEnabled(BOOL autoLogAppEventsEnabledID)
Expand All @@ -652,7 +652,8 @@ void IOSFBAdvertiserIDCollectionEnabled(BOOL advertiserIDCollectionEnabledID)

BOOL IOSFBAdvertiserTrackingEnabled(BOOL advertiserTrackingEnabled)
{
return [FBSDKSettings.sharedSettings setAdvertiserTrackingEnabled:advertiserTrackingEnabled];
[FBSDKSettings.sharedSettings setAdvertiserTrackingEnabled:advertiserTrackingEnabled];
return advertiserTrackingEnabled;
}

char* IOSFBSdkVersion()
Expand Down Expand Up @@ -833,6 +834,14 @@ void IOSFBUploadVideoToMediaLibrary(int requestId,
return res;
}

// referrenced in IOSWrapper.cs, [DllImport("__Internal")]
// either remove that or add a dummy function here to avoid link error
void IOSFBUpdateUserProperties(int numParams,
const char **paramKeys,
const char **paramVals)
{
}

void IOSFBFetchDeferredAppLink(int requestId)
{
[FBSDKAppLinkUtility fetchDeferredAppLink:^(NSURL *url, NSError *error) {
Expand Down
12 changes: 0 additions & 12 deletions UnitySDK/Assets/FacebookSDK/SDK/Editor/iOS/FBUnitySDKDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,6 @@ - (void)contextDialogDidComplete:(id<FBSDKContextDialogDelegate>)contextDialog;
{
if ([contextDialog isKindOfClass:[FBSDKChooseContextDialog class]]) {
[FBUnityUtility sendMessageToUnity: FBUnityMessageName_OnChooseGamingContextComplete userData: NULL requestId:_requestID];
} else if ([contextDialog isKindOfClass:[FBSDKSwitchContextDialog class]]) {
[FBUnityUtility sendMessageToUnity: FBUnityMessageName_OnSwitchGamingContextComplete userData: NULL requestId:_requestID];
} else if ([contextDialog isKindOfClass:[FBSDKCreateContextDialog class]]) {
[FBUnityUtility sendMessageToUnity: FBUnityMessageName_OnCreateGamingContextComplete userData: NULL requestId:_requestID];
}
[self complete];
}
Expand All @@ -129,10 +125,6 @@ - (void)contextDialog:(id<FBSDKContextDialogDelegate>)contextDialog didFailWithE
{
if ([contextDialog isKindOfClass:[FBSDKChooseContextDialog class]]) {
[FBUnityUtility sendErrorToUnity:FBUnityMessageName_OnChooseGamingContextComplete error:error requestId:_requestID];
} else if ([contextDialog isKindOfClass:[FBSDKSwitchContextDialog class]]) {
[FBUnityUtility sendErrorToUnity:FBUnityMessageName_OnSwitchGamingContextComplete error:error requestId:_requestID];
} else if ([contextDialog isKindOfClass:[FBSDKCreateContextDialog class]]) {
[FBUnityUtility sendErrorToUnity:FBUnityMessageName_OnCreateGamingContextComplete error:error requestId:_requestID];
}
[self complete];
}
Expand All @@ -141,10 +133,6 @@ - (void)contextDialogDidCancel:(id<FBSDKContextDialogDelegate>)contextDialog
{
if ([contextDialog isKindOfClass:[FBSDKChooseContextDialog class]]) {
[FBUnityUtility sendCancelToUnity:FBUnityMessageName_OnChooseGamingContextComplete requestId:_requestID];
} else if ([contextDialog isKindOfClass:[FBSDKSwitchContextDialog class]]) {
[FBUnityUtility sendCancelToUnity:FBUnityMessageName_OnSwitchGamingContextComplete requestId:_requestID];
} else if ([contextDialog isKindOfClass:[FBSDKCreateContextDialog class]]) {
[FBUnityUtility sendCancelToUnity:FBUnityMessageName_OnCreateGamingContextComplete requestId:_requestID];
}

[self complete];
Expand Down