Comments (11)
Hi @Duell10111, could you check if the change from this PR works properly for you?
Change in your package.json version of react-native-screens
to:
"react-native-screens": "software-mansion/react-native-screens#@tboba/fix-tvos-search-bar"
Cheers!
from react-native-screens.
Hey @Duell10111, just wanted to note here that I still haven't managed to resolve the problem with missing search bar yet.
I just resolved this issue, since it was addressing the crash in TVOS, so here I recommend to still use the alternative with the imitation of the search bar, but I've opened a draft with my tryings there - #2055
I'll try to fully resolve this PR in free time, but for now it seems to be larger than I expected 😅 Of course if you're feeling strong enough, you can try to implement the idea I've mentioned there!
from react-native-screens.
Hey @tboba,
thanks for the information and your effort to resolve the problem.
I tried to create a expo module library which allow the usage of a TVOS Searchbar as a Component in React.
Maybe as further inspiration, as this seems to work fine on my case.
https://github.com/Duell10111/rn-native-search-bar/tree/beta
But of course it would be great if react-native-screens would provide this functionallity.
Unfortunately I am not really into Objective C and do not have the knowledge how this library really works. 😅
from react-native-screens.
Hi, thanks for submitting this issue! I can confirm this issue is reproducible for me.
from react-native-screens.
Hi @tboba,
thanks for the quick fix, the crash is not happening anymore with your PR. :)
One question from my side is that on an iPhone the Native Search Bar is visible at the top in the header, where as on tvOS nothing is shown.
This could be some enduser issue from my side or how should the native search bar look like on tvOS. 😅
iPhone:
tvOS:
(Nothing shown except the header title)
from react-native-screens.
@Duell10111 in my case when I'm opening your repro in Apple TV Simulator (iOS 17.2) I have a search bar that looks like this:
Hence I'm concerned on which device are you testing your app - is it a simulator or a physical TVOS device? Also, do you have some reference how the header with a search should look like (from a native iOS app or from some already existing apps)?
from react-native-screens.
Hey I am currently still testing in a simulator.
The searchbar you see in the repostiory is a normal textfield as fallback as the native SearchBar is not working atm.
Normally the searchbar on tvOS should look like this.
from react-native-screens.
@Duell10111 sorry for long response, I want to come back to this topic!
Hm, that's interesting. I tried to re-download the example project and add the patch I've mentioned above. In my case, everything is alright (I don't have any label that is a fallback for the search bar or something like that). Could you check if you don't have some platform-specific conditions set?
8mb.video-uyx-WmV5MHyY.mp4
If it still doesn't work in your case, do you maybe have some code references of the native implementation of the search bar on TVOS?
I know that it's possible to add custom searchResultsController
but I don't really want to style it for now (maybe we should in the future, as an option of the screen's search bar?).
from react-native-screens.
Hi @tboba,
I updated the example to remove the old search bar to prevent any irritations.
I added in a sample app the searchbar via a UISearchContainerViewController to a UIView to get the corresponding view as seen in my previous version as it seemed that this is nessessary for tvOS 😅.
A further question from me is if the search controller is even added to the header on tvOS as it is done on iOS.
The header seems a bit odd for a tvOS variant IMHO. :)
from react-native-screens.
@Duell10111 thanks! Interesting, do you still have that repro with a search bar via UISearchContainerViewController
? Right now I'm trying to experiment with the passed searchResultsController, but for now I can't see any search bar on TVOS 🤔
from react-native-screens.
Hi @tboba,
yes I tested it with an example library i created for testing.
Here I defined the SearchContainerViewController:
https://github.com/Duell10111/rn-search-bar/blob/6267576621c1b36e5dab9ac8ebeec1e76326a13f/ios/RnSearchBarViewManager.swift#L43
You can test it with the exampleTVOS added in this repository:
https://github.com/Duell10111/rn-search-bar/tree/beta/exampletvOS
from react-native-screens.
Related Issues (20)
- Android Build Error - Execution failed for task ':react-native-screens:configureCMakeRelWithDebInfo' HOT 19
- iOS Status Bar Error HOT 6
- Not able to navigate to a nested modal navigator HOT 4
- Android ComposeView, Composable is gone upon returning to Screen from stack HOT 2
- Types on FullWindowOverlay does not allow to set style props (even if used in examples
- [android] stack screen transition lag on 3.30.1 HOT 12
- Seems like "goBackGesture" not working! HOT 3
- [3.31.0] CI builds fails, command not found: bob HOT 15
- Strange flicker when you scroll up a modal with NativeStack in iOS HOT 3
- issue related to react-native-screen HOT 4
- TypeError: undefined is not an object (evaluating '_$$_REQUIRE(_dependencyMap[11], "react-native-screens").ScreenStack') HOT 28
- iOS build fails with Undefined symbols: facebook::jsi::HostObject::~HostObject() HOT 5
- [iOS] back gesture activates `Pressable` element HOT 2
- Inconsistency with navigationBarColor Transparency on react-native-screens versions >= 3.30.0" HOT 5
- `live-markdown` + `native-stack` + `fabric` causes incorrect layout when keyboard is open on Android HOT 2
- react-navigation: App randomly freezes when react-native Modal is shown while preventing remove screen with usePreventRemove on iOS HOT 2
- Unable to run the Android build in react-native:0.68.7 HOT 3
- > Could not create task ':react-native-screens:compileReleaseKotlin'. > KOTLIN_1_9 HOT 1
- > Could not create task ':react-native-screens:compileReleaseKotlin'. > KOTLIN_1_9 HOT 5
- [Fabric] Going back to previous screen disables interactions with Touchables with @react-navigation/bottom-tabs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-screens.