Can we build APK file for android smart TV from expo React Native? - expo

I am trying to build app for android Tv from expo but when I tried to open app and it gets crash after opening white screen.
I am confused either we can build app for smart TV from expo or not.
Found somewhere that we need to add
"android": {
"intentFilters": [
{
"action": "MAIN",
"category": [
"LEANBACK_LAUNCHER"
]
}
],
}
on App.json but when i try to add it on app.json {expo build:android} shows build fails! error.

Related

Both Dockerize and be able to debug a Django app using vscode

Is it possible to both Dockerize a Django app and still be able to debug it using Visual Studio Code's debugging tool? If yes, how? E.g, using docker-compose to run Django app, postgres, and a redis instance and be able to debug the Django app via Visual Studio Code.
Yes, this is possible.
I've done it with a NestJs app and should be a similar setup.
Expose a specific port on the Django app service in the compose file first.
Create the launch.json file the following configuration, then replace <port-exposed-on-container> and <directory-on-container> with real values.
{
"version": "0.2.0",
"configurations":
[
{
"name": "Docker: Attach to Node",
"type": "node",
"request": "attach",
"port": <port-exposed-on-container>,
"address": "localhost",
"localRoot": "${workspaceFolder}",
"remoteRoot": "/<directory-on-container>",
"protocol": "inspector",
"restart": true
},
]
}

XCode iOS iPhone Simulator Does Not Connect to app In VSCode and Tanks Internet on Same Computer - Mac Mini M1,

Environment: Mac Mini M1, macOS Ventura 13.1, watchOS 9.1, Xcode 14.2 includes SDK iOS 16.2. Building first app in Expo ~47.0.6 using VSCode. Project compiles and works fine in actual iPhone connected to same network. However, when I attempt to use the Xcode Simulator from VS Code to by pressing "i" in the terminal window after running locally with "npx expo start" or globally with 'expo start' or even clearing expo cache with expo r -c, I am mostly unsuccessful and the problems start. Simulator is usually automatically opened from the invoking of "i" from the Expo terminal menu and Expo Go is launched on the simulator, but the app will simply sit there with the spinner and finally fail after several minutes. On top of this, the internet to the same computer my project and simulator are on is completely tanked (drops off to zero or close bandwidth) until the simulator is completely closed. Very rarely the project will open on the simulator but the internet tanking is still an issue. Additionally, the Simulator refuses to close completely via the standard means of right clicking on the simulator icon in the Mac Doc and choosing Quit. I can only Force Quit the Simulator to get it to close completely. I greatly appreciate any feedback!
package.json File - React Native Project
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web"
},
"dependencies": {
"#react-navigation/native": "^6.0.14",
"#react-navigation/native-stack": "^6.9.2",
"#reduxjs/toolkit": "^1.9.0",
"expo": "~47.0.6",
"expo-status-bar": "~1.4.2",
"react": "18.1.0",
"react-dom": "18.1.0",
"react-native": "0.70.5",
"react-native-dotenv": "^3.4.2",
"react-native-elements": "^3.4.2",
"react-native-google-places-autocomplete": "^2.5.1",
"react-native-maps": "^1.3.2",
"react-native-safe-area-context": "4.4.1",
"react-native-screens": "~3.18.0",
"react-native-vector-icons": "^9.2.0",
"react-native-web": "~0.18.7",
"react-redux": "^8.0.5",
"twrnc": "^3.4.1"
},
"devDependencies": {
"#babel/core": "^7.12.9"
},
"private": true
}
Recently updated Xcode, macOS to no avail.
Running project locally with "npx expo start" or globally with 'expo start' or even clearing expo cache with expo r -c,
I have been tirelessly searching for a solution.

Splash screen on Expo Standalone App is not same with Expo Client App

Configuration
I have an issue about splash configuration on Android in app.json.
It's fine if I run it on the Expo Client App but it's not after I build it as the standalone app.
I've tried as what is written on the link.
Here is my configuration :
"expo": {
...
"splash": {
"backgroundColor": "#4286f4",
"image": "./assets/images/splash/splash_full.png",
"resizeMode": "contain",
"tabletImage": "./assets/images/splash_full.png",
"hideExponentText": true
},
...
"android": {
"splash": {
"backgroundColor": "#4286f4",
"ldpi": "./assets/images/splash/splash_full.png",
"mdpi": "./assets/images/splash/splash_full.png",
"hdpi": "./assets/images/splash/splash_full.png",
"xhdpi": "./assets/images/splash/splash_full.png",
"xxhdpi": "./assets/images/splash/splash_full.png",
"xxxhdpi": "./assets/images/splash/splash_full.png",
"resizeMode": "contain",
"hideExponentText": true
},
}
...
}
RESULT
run on Expo Client App :
run on Expo Standalone App :
EXPECTED
Expo Standalone App should be same with Expo Client App
How it's​ possible?
I had the same problem with splash resizeMode='cover' on Android.
Following the advice in https://github.com/expo/expo/issues/4494 I upgraded expo-cli and the problem is gone.
To summarize:
Before SDK 33, expo-cli 2.x: worked well
When upgraded to SDK 33, still using expo-cli 2.x, displayed a small splash surrounded by black background
Upgraded expo-cli to 3.0.2, using sdk-33, works well

composer facebook/graph-sdk requires php-http/client-implementation

I am on localhost (xamp) and trying with composer to include facebook graph-sdk according to Facebook SDK for PHP. After using composer require facebook/graph-sdk I got following error:
Problem 1
- Installation request for facebook/graph-sdk ^6.0#dev -> satisfiable by facebook/graph-sdk[6.x-dev].
- facebook/graph-sdk 6.x-dev requires php-http/client-implementation ^1.0 -> no matching package found.
Ok so I used google and found out that something like 'virtual package' is needed to implement. Supposedly it is commonnly php-http/guzzle6-adapter or php-http/curl-client. Since Facebook SDK for PHP says: "There are issues when using the Facebook SDK together with Guzzle 6.x." I chose Curle client.
composer require php-http/httplug-bundle php-http/curl-client
It caused that my another attempt to install Facebook SDK ended with more errors.
Problem 1
- Installation request for facebook/graph-sdk ^6.0#dev -> satisfiable by facebook/graph-sdk[6.x-dev].
- Conclusion: remove php-http/httplug 2.0.x-dev
- Conclusion: don't install php-http/httplug 2.0.x-dev
So I removed it. composer remove php-http/httplug 2.0.x-dev but there is no difference from previous attempt.
I am so confused. How can I install facebook graph sdk??
EDIT:
composer.json file:
{
"name": "tomas/tmvdev",
"description": "wordpress theme",
"keywords": ["WordPress", "Theme"],
"homepage": "https://github.com/vavra7/tmvdev",
"type": "project",
"license": "GNU",
"authors": [
{
"name": "Tomáš Vavřinka",
"email": "email#tomasvavrinka.cz",
"homepage": "http://tomasvavrinka.cz"
}
],
"minimum-stability": "dev",
"require": {
"php-http/curl-client": "^2.0#dev"
},
"autoload": {
"psr-4": {"Inc\\": "./inc"}
}
}
Issue was statement in composer.json file: "minimum-stability": "dev". Composer tried to download version facebook/graph-sdk ^6.0#dev which is not stable version.

How to change build directory in Ionic 3 build process?

I'm developing a PWA using Ionic 3.
Normally the JavaScript files generated by the build to browser process of Ionic 3 are in www/build folder.
I wish to change this folder to www/build/v1 and, of course, keep the application working.
How could I change the build process of Ionic 3 to achieve this result?
The simplest way is add "config" section to your package.json
{
"name": "projectname",
"version": "0.0.1",
"author": "Ionic Framework",
...,
"config": {
"ionic_www_dir": "www/v1",
"ionic_build_dir": "www/v1/build"
},
"dependencies": {
...
}
You can read "Custom Project Structure" here ionic docs.
You may want to try the config option in the package.json file to provide custom build configuration.
To get started, add a config entry to the package.json file. From there, you can provide your own configuration file.
Here's an example of specifying a custom configuration:
"config": {
...
"ionic_rollup": "./config/rollup.config.js",
"ionic_cleancss": "./config/cleancss.config.js",
...
},
You may want to see this Ionic documentation for more information.