Cant get Tizen app to work which is written in preact - javascript

I have an app written in preact which I would like to test, but I am unable to get it working on the Tizen tv emulator.
After some research, I found a few instances of people creating apps for Tizen with react but never actually using preact.
Has anyone experience with getting preact apps to work on the Tizen platform?
thanks in advance :)

There's nothing in preact itself that might cause the app to not work on Tizen. In fact it should work much better then a react version. I've not only seen, but have written apps in React for Tizen (even legacy ones). The real reason of the failure might be that the app is not transpiled appropriately for the Tizen platform. You should be targeting at least ES2015. Also be sure to include pollyfills if you are using fancy data structures, like Set for example.
It would help if you could post the error that you receive in Tizen emulator. You can run the app in debug mode and actually see all suspicious output in the console of the detached WebKit devtools that debug mode auto-opens for you.

Related

'React-Native-Share' Library fails to compile on Web

I've been creating react-native app to share text or images to social platforms.
I've used React-Native-Share library to serve the purpose of my application.
This library is working fine for iOS & Android but when I'm running it on Web.
I'm facing compiling failed error (Syntax Error). It seems like React-Native-Web cannot parse the syntax used by this library.
As far as I researched on it. I think I need to setup webpack.config.js for this to work, but as I've never did this before so not sure how it works and how to set it up.
Please see the attached screenshot
Syntax Error
Thank you in advance :)

Should react-native apps target a specific version or subset of JavaScript?

I'm working on my first React Native project and things are mostly working.
But on my new Xiaomi Android phone I got a crash when trying to use String.fromCodePoint(). It works fine on the iOS simulator.
In fact I'm not even sure which JavaScript engine is running the app on each device. I suppose each OS has one for their respective native browser.
I haven't been able to find any discussions on the Internet about what flavour of JavaScript I should use in my app for it to work on most devices.
Do I actually have to test for all features? Is there an official subset? Can I query the JS version in use from my app? What does everybody else do?
I found the answers on the React Native Site:
The React Native people suggest using Babel.
On Android the app will be using v8.
On iOS the app will be using JavaScriptCore (JSC).

React-native facebook login crash on Android

I'm using react-native facebook login through this library: react-native-fbsdk. Following the installation guide did not completely get it working, but I managed to get it working after modifications on the native side, as instructed in many github issues etc.
Anyways, it was working fine two weeks ago, but now, when I try to login with facebook, the application immediately crashes. It doesn't open any login page or do anything else.
What is weird is that if I open a browser in the emulator, leave it to background, and then try to login, the login goes further (I get to actually login, but when I'm directed back, the application crashes).
From the tombstone files I am able to get following warnings/messages:
Expected native library version number "",actual native library
version number ""
Tens like these:
Could not find generated setter for class
com.facebook.reactnative.androidsdk.FBLoginButtonManager
How could I solve this problem? And why it doesn't work anymore? I didn't change anything in the code. Only thing I can think of is that it loads something from the internet during compiling the application. How could it otherwise fail?
This is answer for how I solved the problem, not that much about why it was behaving like this.
In short:
I got it working again by updating the emulator and android API 6.0 through Android Studio.
<Rant state='begin'>
I have no idea why this worked, nor why did it broke in the first place. As it was working good with the old emulator and API 6.0 earlier.
It seems like the react-native fbsdk is far from stable. Or then it is completely react-native's fault, idk to be honest. But this just makes me want to develop fully native, instead of react-native, which seems unstable from my experience so far.
<Rant state='end'>

WebkitSpeechRecognition Returning Network Error in Electron

Recently (in the past 1.5 weeks) the javascript library WebkitSpeechRecognition has refused to work properly. I've tested other electron applications that utilize the library (smart-mirror by evan cohen) and have run into issues with those.
It throws network errors under every circumstance I've tested it. The library seems to work fine in standard browser environments but I can't seem to get it to work with electron. Does anybody have any experience in wrestling with this?
It seems that Google has removed this feature for electron. See this discussion.
Configure your own Google Speech API credentials using https://console.developers.google.com and then set them on your system's environment variables. I had the same issue and got it working with this way. Make sure to restart your system after configuring the environment variables. Sometimes they don't get into affect immediately.
Please refer for more detailed steps: https://docs.smart-mirror.io/docs/howto/how_to_obtain_chromium_speech_keys.html
GOOGLE_API_KEY, GOOGLE_DEFAULT_CLIENT_ID, GOOGLE_DEFAULT_CLIENT_SECRET set their value to Key, ClientID and ClientSecret respectively.
On some Windows PC's Speech Recognition will work in Edge but not Chrome. On another PC, seemingly with same software versions, it will not work at all and give NETWORK error. It's nice when it works, but I don't see how they expect to get any developers for it. I am developing a free word learning app, not commercial.

How to build ionic application using cocoonjs webview+?

The webview+ from cocoonjs gives a huge performance boost to my ionic application that uses a good amount css3 animations. I want to be able to build my application using webview+ from cocoonjs.
The instructions are straight forward and the commands don't throw an error but once I load the application on the device it's still using the default webview.
I'm thinking it has something to do with android.json or the config.xml.
After some more digging around in the java code, it looks like it was completely my fault I was trying to view the application on an emulator. There are issues with the current version of cocoonjs webview+.
Launching the Webview+ inside android's emulator can lead to an application crash. Use a real device for testing.

Categories

Resources