tiktok / tiktok-opensdk-ios

The TikTok OpenSDK features Login Kit and Share Kit which allow your users to log in using their TikTok account and share content from your app to TikTok.
https://developers.tiktok.com
Other
80 stars 31 forks source link

Fix TikTokURLOpener UIApplication Conformance on Xcode 16 Beta 3 #41

Closed wendyliga closed 2 months ago

wendyliga commented 3 months ago

as title described

CLAassistant commented 3 months ago

CLA assistant check
All committers have signed the CLA.

wendyliga commented 3 months ago

@GuidoPu please help check this PR :pray:

Frizlab commented 3 months ago

While this technically works, I would personally recommend against this fix and use a proper one instead (not making external types conform to an internal protocol).

When using this fix, I had another issue when calling applicationInstance.open(url, options: [:], completionHandler: nil): Ambiguous use of 'open(_:options:completionHandler:)'.

This is due to the completionHandler parameter having two possible types now: (@MainActor @Sendable (Bool) -> Void)? and ((Bool) -> Void)?. To fix this issue one has now to call the open method using open(url, options: [:], completionHandler: nil as (@MainActor @Sendable (Bool) -> Void)?), which is terrible.

WineKai commented 2 months ago

While this technically works, I would personally recommend against this fix and use a proper one instead (not making external types conform to an internal protocol).

When using this fix, I had another issue when calling applicationInstance.open(url, options: [:], completionHandler: nil): Ambiguous use of 'open(_:options:completionHandler:)'.

This is due to the completionHandler parameter having two possible types now: (@MainActor @Sendable (Bool) -> Void)? and ((Bool) -> Void)?. To fix this issue one has now to call the open method using open(url, options: [:], completionHandler: nil as (@MainActor @Sendable (Bool) -> Void)?), which is terrible.

So how did you fix that?

Frizlab commented 2 months ago

@WineKai I invite you to read literally the last sentence of the message you’re replying to: it’s the fix.

larryonoff commented 2 months ago

Guys. Did you check the latest release 2.5.0? Xcode 16.0 works for me

Frizlab commented 2 months ago

Confirmed, 2.5 works.

WineKai commented 2 months ago

@WineKai I invite you to read literally the last sentence of the message you’re replying to: it’s the fix.

Ha ha ha, I see it. Thanks