Skip to content

Commit

Permalink
fix: missing nativeId on Fabric
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillzyusko committed Jan 14, 2025
1 parent ffd4432 commit 9016aad
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions ios/extensions/UIResponder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,15 @@ public extension Optional where Wrapped == UIResponder {
}

var nativeID: String? {
if let superview = (self as? UIView)?.superview as? UIView {
return superview.nativeID as String?
}
#if KEYBOARD_CONTROLLER_NEW_ARCH_ENABLED
if let superview = (self as? UIView)?.superview as? NSObject {
return superview.value(forKey: "nativeId") as? String
}
#else
if let superview = (self as? UIView)?.superview as? UIView {
return superview.nativeID as String?
}
#endif
return nil
}
}
Expand Down

0 comments on commit 9016aad

Please sign in to comment.