sencha app build native without minify JS - build

I want be able to build a native app, but without minifying the JS so I can debug it later confortably.
Currently I'm executing:
sencha app build native
How can I be able to build without minifying JS files?
Thanks

For native build, you can only have testing option after upgrade to Sencha CMD 5.x, refer to
http://docs.sencha.com/cmd/5.x/cmd_upgrade_guide.html
Under Cordova / PhoneGap
"These build profiles ensure that all of the “sencha app build” command variations are equivalent to previous releases. You will notice, however, that “native” is now a build profile instead of an environment (like “testing” or “production”). This means you can now do “sencha app build native testing” which was previously not possible."
So, the command should be
sencha app build native testing

You need to use this command line instead:
sencha app build testing
That way, all JavaScript source files are bundled but not minified; and you could debug easily.
See Sencha CMD 4 documentation for more details.

Related

Degugging a react native / expo app with webstorm

I can't debug my react native / expo app in WebStorm, but I can in Visual Studio Code.
I have a react native app that I can successfully run using expo. I set up the configuration according to the info on this site:
https://blog.jetbrains.com/webstorm/2018/02/webstorm-2018-1-eap-181-3263/#debugging-expo
When I click "run" or "debug" and "Debug JS Remotely" is turned off, the bundler builds a JS bundle and the app starts on my devices.
But once I turn on "Debug JS Remotely", the bundler only says:
Starting custom debugger by executing: : [my working directory] [my working directory again]
and never goes on to build the JS bundle.
After a short while, a red screen appears on the device, and it says:
Unable to connect with remote debugger
Timeout while connecting to remote debugger
onFailure
DevSupportManagerImpl.java:851
onFailure
WebsocketJavaScriptExecutor.java:83
run
WebsocketJavaScriptExecutor.java:142
handleCallback
Handler.java:790
dispatchMessage
Handler.java:99
...
The bundler doesn't say anything more than the message above.
As soon as I turn off remote debugging, the the bundler starts building again and finishes with
"Building JavaScript bundle: finished in ...ms"
as usual, but the device, again, shows the red screen with aforementioned messages, or doesn't show anything but the regular white screen with a message at the bottom saying "Downlading JavaScript bundle 100,00%". I either have to stop and restart within WebStorm or I have to close the expo app and re-open it. Either way will make the app start again on my device.
This is my first time working with javascript, react native, expo, so I am not sure, but it should be possible to debug in WebStorm directly, right? As mentioned, in Visual Studio Code everything including debugging works fine, so I don't think it's anything in the code. Maybe someone here has an idea where the problem lies?
node -v: v11.6.0
react-native -v: react-native-cli: 2.0.1, react-native: 0.57.1
Any help will be greatly appreciated! Thanks in advance!
PROOF
HOWTO
Looks like there's been an update to how you can setup Configurations since you tried.
Try changing the Bundler host to 127.0.0.1 and try again.
I just setup Webstorm v2020.2 yesterday to debug my Expo application and it is working as expected.
These instructions were all that I required: https://www.jetbrains.com/help/webstorm/react-native.html#ws_react_native_create_run_config
On the main menu, go to Run | Edit Configurations, click icons.general.add.svg and select React Native from the list. The Run/Debug Configuration: React Native opens.
Choose whether you want WebStorm to build and launch the application for you:
Select the Build and launch checkbox if you are launching your application for the first time or if you have updated its native code since the last run.
If your application uses Expo, clear the checkbox because this bundler takes care of the process itself.
If you selected the Build and launch checkbox, choose the target platform, Android or iOS. Depending on your choice, WebStorm will run the bundler with react-native run-ios or with react-native run-android.
Optionally, type the arguments to be passed to React Native, for example, specify the simulator type through the ‑‑simulator flag: ‑‑simulator="iPhone 4s".
In the Bundler host field, specify the host where the React Native bundler runs, the default value is localhost.
If you are using Expo, change the default bundler host to ensure successful connection with the debugger. This connection may fail because WebStorm by default uses localhost to start debugging while Expo expects 127.0.0.1 or an external IP address depending on what is selected in Connection field of the Metro bundler configuration. See Debugging a React Native application that uses Expo for details.
In the Bundler port field, specify the port on which the React Native bundler runs, by default 8081 is chosen, learn more from the React Native official website.
Choose the Node.js interpreter to use. This can be a local Node.js interpreter or a Node.js on Windows Subsystem for Linux.
Specify the path to react-native-cli and the working directory of the application. Optionally, type the environment variables for react-native run-android or react-native run-ios.
By default, WebStorm starts the React Native bundler automatically when you invoke the run/debug configuration. If you have already started the bundler from outside WebStorm, for example, from the command line, you can re-use it without stopping and restarting. Select your bundler in the Before Launch area and click Remove.
The issue is tracked at WEB-35719, please follow it for updates

Ionic 2 native feature debugging

I am writing an app using native functionalities. However, I am finding errors within my app when debugging these features.
How do I debug native features in ionic 2? I could not find good answers.
Emulate your app with ionic run android -l -c.
-l is for livereload and -c is for console logs. Replace android with your system. So you will see all the console logs in your terminal.
I had to change the package.json and replace ionic:serve with ionic:watch

ionic 2 for browser platform is not working

I want to create an app which is able to run in mobile phone and also in browser (of course no device dependency functions). Here are the steps:
ionic start --v2 demo blank
cd demo
ionic platform add browser
ionic build browser
cd platforms/browser
php -S localhost:8000
Then open localhost:8000 in browser.
I looked through the ionicframework document. There is nothing about platform browser. Can anybody advise how I can run my app in browser? Thanks.
You don't need to add the browser platform, just run ionic serve:
ionic start --v2 demo blank
cd demo
ionic serve
Further information can be found here.
From the official documentation ionic2, its clear that the platform can either be ios or android as shown below screenshot.
So, when you want to render it in a browser, you can simply use
ionic serve
If you want to run browser platform, then cd platforms/browser/www instead of cd platforms/browser, and run local server from there.
Perform the following code at the root of the project and then the web-browser based version will be generated at /www/ folder including the sub-directories such as assets, build & index.html which is the main point of entry for the web app.
If you wanna have the app packaged as a staging or production bundle, the following command can be used, which will again generate the prod build at the same /www/location.
npm run ionic:build --prod

Running Sencha Touch app on Java Eclipse & Android Emulator on Windows 8 (without phonegap)

I am getting trouble in running sencha touch 2 app on android emulator (without using cordova/phonegap) on windows 8 using .
Below is the list of packages installed on DEV machine:
1. JRE v1.7
2. Sencha Touch v2.4.1 SDK
3. Sencha SDK Tools 2.0.0 beta
4. Sencha Cmd 5.1.2
5. Ruby 2.0.0
6. Chrome (Browser)
7. Web Server - Both IIS 8 & XAMPP
8. Android SDK 23.0.6
9. Eclipse IDE (integrated with VJET Library & ExtJSTL 4.2)
10. Android ADT Manager (installed emulator snapshots targeting os2.2 & 5.1)
"MyApp" project runs perfectly on chrome browser when hosted on IIS 8 & XAMPP (apache). But not able to figure out steps to run the same on android emulator. So far followed below mentioned steps, leading to unsuccessful attempts:
sencha app build native [Command Successful]
sencha app build -run native [Command Successful]
sencha app build package [Command Successful]
Started emulator instance from eclipse (avd) and executed command sencha app build -run native, but the app doesn't execute on emulator instance.
Followed steps mentioned in post (http://www.sencha.com/forum/showthread.php?215210-how-to-run-sencha-touch-app-on-android-emulator-on-windows) but still facing issues.
Please help!!
do u want to run it as website for mobile?
as u are saying, you don't want to use cordoav/phonegap.
If u just want to run on Mobile Browser U can use Netbeans. It has a very simple feature to allow a html5 application to be run on Mobile browser
all U have to do is
1. Create HTML5 Project in netbeans
2. Run command "sencha app build native"
3. copy all files & folders form directory cordova->www which exist in your sencha app directory
4. Paste it into your HTML5 Project directory
5. Choose The Browser option in netbeans and run
Thanks Nitish for your suggestions. But this is not what my query was all about. I was trying to figure out a way of running sencha touch app on emulator without compiling it to native app following steps mentioned in post: http://www.sencha.com/forum/showthread.php?215210-how-to-run-sencha-touch-app-on-android-emulator-on-windows.
Anyways, to run sencha touch app on emulator I had to create native android app using cordova/phonegap wrapper. To run sencha touch app (which is mobile web portal equivalent), it is required to be wrapped inside native app (android, ios, etc) followed by app signing and APK / IPA file generation.

Jenkins with a Cocos2d-X project

I have just recently moved into developing Cocos2d-X application for Android devices, from native Android application development. I am looking to configure my Cocos2d-X C++/JAVA project in a JENKINS environment.
Has anyone any experience of using JENKINS with cocos2d-X projects ? Any tips on where i can get started ?
You can use the cutom scrip option, for example if you use the cocos2d-x model for build you can build your project with the custom command "make", in adition you can use statically code check, bla, bla, ...
I use too my machine as slave for no put the build environment in the server.
Yes. It depends upon the build tool you are using. I am using Ant with Eclipse. Try to read about building an Android Project from Command Line Using ant or gradle. and there you go,Include "Build Step"-> "Execute shell" in jenkins.
You have to manually check for all dependencies.