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

SDK defaults to limited login on Mac Catalyst #2498

Open
5 tasks done
vkornel97 opened this issue Nov 5, 2024 · 0 comments
Open
5 tasks done

SDK defaults to limited login on Mac Catalyst #2498

vkornel97 opened this issue Nov 5, 2024 · 0 comments

Comments

@vkornel97
Copy link

Checklist before submitting a bug report

Xcode version

16.0

Facebook iOS SDK version

17.1.0

Dependency Manager

SPM

SDK Framework

Login

Goals

Enable standard Facebook Login on a Mac Catalyst app, avoiding fallback to the Limited Login flow.

Expected results

The login flow should proceed with tracking enabled in the Mac Catalyst environment.

Actual results

The SDK defaults to the Limited Login flow.

Steps to reproduce

  • Build the app with Mac Catalyst.
  • Initiate the Facebook login flow.
  • SDK automatically defaults to Limited Login.

Issue: Since App Tracking Transparency (ATT) is unavailable on macOS, ATTrackingManager consistently returns .notDetermined, causing the SDK to fallback to Limited Login. The Facebook SDK should identify the Mac Catalyst environment and initiate the standard login flow when targeting it.

Code samples & details

@MainActor
    func login(from viewController: UIViewController) async throws {
        return try await withCheckedThrowingContinuation { continuation in
            loginManager.logIn(configuration: LoginConfiguration(permissions: permissions, tracking: .enabled)) { result in
                switch result {
                case .failed(let error):
                    continuation.resume(throwing: error)
                case .cancelled:
                    continuation.resume(throwing: AuthenticationServiceError.cancelled)
                case .success(_, let declined, _):
                    guard declined.isEmpty else {
                        return continuation.resume(throwing: AuthenticationServiceError.invalidPermissions)
                    }

                    continuation.resume()
                }
            }
        }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant