diff --git a/modules/tv-user-profile/index.ts b/modules/tv-user-profile/index.ts index a0672c72..b6789782 100644 --- a/modules/tv-user-profile/index.ts +++ b/modules/tv-user-profile/index.ts @@ -8,7 +8,6 @@ interface TvUserProfileModuleEvents { interface TvUserProfileModuleType { getCurrentProfileId(): string | null; isProfileSwitchingSupported(): boolean; - presentUserPicker(): Promise; addListener( eventName: K, listener: TvUserProfileModuleEvents[K], @@ -78,26 +77,8 @@ export function addProfileChangeListener( return () => subscription.remove(); } -/** - * Present the system user picker panel. - * Returns true if successful, false otherwise. - */ -export async function presentUserPicker(): Promise { - if (!TvUserProfileModule) { - return false; - } - - try { - return await TvUserProfileModule.presentUserPicker(); - } catch (error) { - console.error("[TvUserProfile] Error presenting user picker:", error); - return false; - } -} - export default { getCurrentProfileId, isProfileSwitchingSupported, addProfileChangeListener, - presentUserPicker, }; diff --git a/modules/tv-user-profile/ios/TvUserProfileModule.swift b/modules/tv-user-profile/ios/TvUserProfileModule.swift index 1885a811..8a3d2a71 100644 --- a/modules/tv-user-profile/ios/TvUserProfileModule.swift +++ b/modules/tv-user-profile/ios/TvUserProfileModule.swift @@ -35,27 +35,6 @@ public class TvUserProfileModule: Module { #endif } - // Present the system user picker - AsyncFunction("presentUserPicker") { () -> Bool in - #if os(tvOS) - return await withCheckedContinuation { continuation in - DispatchQueue.main.async { - self.userManager.presentProfilePreferencePanel { error in - if let error = error { - print("[TvUserProfile] Error presenting user picker: \(error)") - continuation.resume(returning: false) - } else { - print("[TvUserProfile] User picker presented, new ID: \(self.userManager.currentUserIdentifier ?? "nil")") - continuation.resume(returning: true) - } - } - } - } - #else - return false - #endif - } - OnCreate { #if os(tvOS) self.setupProfileObserver()