react-native-tiktok
react-native-tiktok copied to clipboard
iOS:: Fails during auth process if TikTok App is not installed
Hey, thank you for this library!
I'm working on a Tiktok integration through your library and the authentication process works perfectly when the TikTok app is installed on the iOS device BUT nothing happens when the TikTok app is not installed on an iOS device:
`-canOpenURL: failed for URL: "tiktokopensdk://" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"
[Presentation] Attempt to present <UINavigationController: 0x10c832800> on <Tiktok: 0x106c2e800> (from <Tiktok: 0x106c2e800>) whose view is not in the window hierarchy. `
Can you help me?
Best Regards
@danielavelasquezc Hi, can you try something like that?
import DeviceInfo from 'react-native-device-info';
const isTikTokInstalled = async () => {
const installedApps = await DeviceInfo. getInstallerPackageName();
return installedApps.some(app => app.bundleId === 'com.zhiliaoapp.musically');
}
// Usage
const tiktokInstalled = await isTikTokInstalled();
console.log(tiktokInstalled); // true or false
The problem is launching the tiktok website. It doesn't work. I can detect if the app is installed or not but if it's not installed nothing happen.