Skip to content

Commit

Permalink
fix: fabric nativeId lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillzyusko committed Jan 14, 2025
1 parent 9016aad commit ce6224b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions ios/extensions/UIResponder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,13 @@ public extension Optional where Wrapped == UIResponder {
}

var nativeID: String? {
guard let superview = (self as? UIView)?.superview else { return nil }

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

Expand Down

0 comments on commit ce6224b

Please sign in to comment.