-
Notifications
You must be signed in to change notification settings - Fork 43
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
Completion handler never being called after signin in to TikTok #35
Comments
I have the exact same issue on my iPhone 14 Pro with iOS 17.5.1. |
Hi @machadogj, After a bit of testing, I noticed that it works via web when TikTok app is not installed. |
hi @WorldOfBasti, no. actually, my issue was different. I was losing the reference to the request, and I suspect that it was being garbage collected before the request ended. thus not calling my callback. I ended up doing it like this:
|
Thanks for your response @machadogj, Thanks for the clarification! I also implemented a static variable for the authRequest, just to be safe. |
Use
|
hi there!
I was having an issue where my completion handler was never being called. After some debugging, I noticed that by the time my app delegate's handler was being called, the "requests" NSMapTable in TikTokAPI was empty, thus it never handled responses.
I managed to fix this problem by changing the following line:
private static var requests: NSMapTable<NSString, TikTokBaseRequest> = NSMapTable.strongToWeakObjects()
to the following:
private static var requests: NSMapTable<NSString, TikTokBaseRequest> = NSMapTable.strongToStrongObjects()
I understand this might be difficult to reproduce, but it happened 100% of the times while testing on my iPhone Xr with OS 15.6.1.
The text was updated successfully, but these errors were encountered: