From f439a5e6e7419956107c5f901f9307144ccc5128 Mon Sep 17 00:00:00 2001 From: Anton Yarmolenko <37253+rnr@users.noreply.github.com> Date: Mon, 4 Nov 2024 13:39:58 +0100 Subject: [PATCH] fix: decrease facebook sdk version and fix open(url) calling --- Core/Core.xcodeproj/project.pbxproj | 2 +- .../Presentation/Unit/Subviews/NotAvailableOnMobileView.swift | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Core/Core.xcodeproj/project.pbxproj b/Core/Core.xcodeproj/project.pbxproj index 081a4c261..3ba4ab39b 100644 --- a/Core/Core.xcodeproj/project.pbxproj +++ b/Core/Core.xcodeproj/project.pbxproj @@ -2466,7 +2466,7 @@ repositoryURL = "https://github.com/facebook/facebook-ios-sdk"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 17.4.0; + minimumVersion = 16.3.1; }; }; /* End XCRemoteSwiftPackageReference section */ diff --git a/Course/Course/Presentation/Unit/Subviews/NotAvailableOnMobileView.swift b/Course/Course/Presentation/Unit/Subviews/NotAvailableOnMobileView.swift index 49741df69..dac965193 100644 --- a/Course/Course/Presentation/Unit/Subviews/NotAvailableOnMobileView.swift +++ b/Course/Course/Presentation/Unit/Subviews/NotAvailableOnMobileView.swift @@ -31,7 +31,8 @@ public struct NotAvailableOnMobileView: View { .padding(.top, 12) StyledButton(CourseLocalization.NotAvaliable.button, action: { if let url = URL(string: url), UIApplication.shared.canOpenURL(url) { - UIApplication.shared.open(url) + // Added empty options to avoid calling overridden open(url) function in facebook sdk + UIApplication.shared.open(url, options: [:]) } }) .frame(width: 215)