how to perform action based on swipe left or swipe right on Apple TV with a Siri remote? SwiftUI Xcode 13 - swipe

I've tried the answer provided here:
Detect Siri Remote swipe in SwiftUI
but it seems a bit like a hack, and it produces this error:
Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value
My question is, what is the correct way to recognize a swipe gesture from the Siri remote on tvOS using swiftUI?
Many thanks in advance!

Related

How to lock screen orientation in Dart

How to lock screen orientation?
Tried this code, but seems, that I use it wrong... Cause it doesnt work on my android smartphone...
window.screen.orientation.lock(window.screen.orientation.type);
There is currently no way to do that in Dart.
https://github.com/flutter/flutter/issues/6381
The issue also contains links how to do that in platform native code.
You can make such native available to Dart using a plugin https://flutter.io/developing-packages/#plugin

Failed to automatically update constraints

I am getting the Failure to automatically update constraints error when trying to use the auto layout to Add, Reset, or Update any restraints on any viewController after updating to xCode 9. Any ideas? I have already cleaned and restarted my Mac.
Still have not found a solution for this. I narrowed it down to any viewController with a collectionView inside it. Any ideas?
I got also this error, when I tried to update/add etc. my constraints error image
I use Xcode Version 9.0 (9A235) and I spent the whole day figuring it out. I solved my problem by deleting a segmentctrl in the navigation bar. all my controller with a segctrl in the nav bar seems to bug.
I made a video with a new project
https://www.youtube.com/watch?v=TOTzCfDoFNA&feature=youtu.be
Remove the navigationbar in your view controller in storyboard .For me it is working well.
For everyone following this. xCode 9.0.1 is out. Tested and it fixes this error. I haven’t be able to reproduce.
#Rumbel you are correct , its a bug from apple in Xcode 9.0
watch this youtube
segment control bug in IOS 11 and Xcode 9.0

How do I properly debug in React Native? [duplicate]

This question already has answers here:
How do you debug React Native?
(48 answers)
Closed 5 years ago.
How do I properly debug in React Native? From what I've seen so far, the debugging messages given aren't too useful for narrowing down where to look in my code. I just get a stack trace that only mentions dependencies in node_modules
For example:
Android emulator image (sorry, don't have enough reputation to show image on this post)
In the above error, I understsand that somewhere a non-Component object got passed in, but I have no idea how to track it down; the entire stack trace only mentions files from node_modules.
I have tried using Chrome Developer Tools as well:
Chrome Developer Tools image
I have also tried React Developer Tools and it wasn't helpful either.
How do I go about getting output from debugging that is actually helpful and linked to the code that I wrote?
Unfortunately the stack trace isn't always helpful since in this case you have to go through the bridge, and there isn't any single catch-all answer to how to get the information you need.
In this case, you're right that you most likely made a mistake returning a proper JSX object in one of your components. If you remember which components you recently added to your app, which components make up the navigator route that led to the problem, etc, you can make an educated guess as to the set of possible problematic components, and narrow that set down by commenting things out. Once that set is a reasonable size, triple-check your render methods and make sure nothing weird is going on.
You can write your own debug messages to the chrome developer console to help give yourself an idea what your app is doing (e.g. rendering this component, fetching that data from shared store, etc) using if(__DEV__) console.log("Your message here"). This will check if the app is running in a debug vs release build, and only log the messages if you are running a debug build.
You can use adb logcat for android and the XCode console for iOS to see the native debug logs, although I don't think they'll help in this case.
You can draw a picture of your component tree, put a debugger statement at the beginning of every render method, and check off components one-by-one until your app stops trying to render things and you know you've hit a problematic component (React will render components recursively, going from top-to-bottom for components on the same level in the tree).
I know it's frustrating when you can't immediately tell where the problem is by glancing at the stack trace but sometimes that's life.

CEF 3 workaround missing features

I'm building an application that is using CEF 3 (version 1650) in WPF (meaning I'm using OSR mode) using Xilium.CefGlue as a wrapper.
After a lot of research I've found several features I can't get to work nor workaround:
Focus Management - I need to tell when the last focusable item in the page lost focus due to a Tab press (or the first item due to Shift+Tab)
Javascript Alerts - I got them to work for standard schemes, but not for custom schemes (also found a bug regarding it). I'm looking for a way around it.
Favicons - Seems CEF3 did not implement favicon support. I guess I can look for favicon.ico in the root directory for standard schemes, but what about favicons linked in the HTML itself?
User Permission Notification - I only found permission request events for geolocation request, but I also need for other things such as getUserMedia. Any idea how?
Zoom - This one works except for getZoomLevel, that for some reason always returns zero. Does anyone knows why or how to get around it considering it does remember each page's last zoom?
Process Model - I can't get multiple browser windows opened manually (that is, not via javascript's openWindow) all with the same custom scheme to open in the same render process (already tried all different process model parameters I know of). As far as I understand, it should be possible. What am I missing?
Thank you in advance for your help.
Focus Management is it OnTakeFocus you are looking for?
Favicons has an open enhancement issue in the CEF project
For anyone who finds their way to this question, favicon support is now available in the official CEF builds.

Google Earth API in Silverlight Application

I have been handed over a Silverlight 4 application that uses the Google Earth API. We have an issue with newer versions of Google Earth: In Internet Explorer, the map displays as a white background with the text "ATL 10.00". In other browsers, the background is just white (cannot see any text).
It works with Google Earth version 6.0.3.2197 but not in any version after that.
I have read this thread
- but none of the suggestions there worked. I must note, though, that the JavaScript code for initializing GE in Silverlight is rather complex, but as far as I can se, the initialization of GE is done in the google.setOnLoadCallback function.
It would be nice, if someone knows what exactly the "ATL 10.00" message means.
Any help would be greatly appreciated!
EDIT
Please let me know if I should clarify in further detail.
UPDATE:
The problem was caused by 2 things and probably a combination of the two:
1. The container for the map was added dynamically with JavaScript into another div
2. The container's width and height was set to 0 in order to hide the map.
So, the solution for me was to render the containing div together with the rest of the DOM. In order to "hide" the map, I positioned it absolute beyond the bounds of the screen.
Hope this can guide others to solve similar problems.
ATL in referring to the Active Template Library in Windows. ATL in Windows is a set of template-based C++ classes that let developers create COM objects (rather like MFC and ActiveX).
10.00 here simply refers to version of ATL being used. Seeing it probably means that the COM object (GEPlugin in this case) has not been created or initialised properly in the browser. The blank screen with the version number in the centre is what the plugin looks like before it loads content.
So, it is not really an error message at all - indeed one could say it is really the failure of an error message to appear that you are seeing.
Anyhow, to answer your question in simple terms it means than the version of ATL that was used to create the plugin was version 10.00.
In practical terms it means that the plugin failed to initialise properly for some reason.

Resources