How add some source code in a UWP installed app? - javascript

I developed an UWP app with Cordova and IndexedDB storage. I need recover some information stored in the indexed database adding a new action to source code.
I got access to the app path at C:/Program Files/WindowsApps/com.mi.app_xxxxx/ inside the www directory I added the new action code. When I start the app it crashes without error messages.

You may not manually tamper with the files in the app install location (C:/Program Files/WindowsApps/ folder). This is a security measure and if any app file is changed in this folder, the system will not allow the app to be launched. The reason for this is that otherwise, anyone could access your app and for example replace some library with malicious executable or crack a licensed app.

Related

Is it possible to get pages from remote file system with next.js

Hi I am quite new to advance frontend technologies and I have simple question.
scenario
I would like to use next.js and its feature: server side rendering.
I would like also to have my js, css and html files stored in outside of host machine where next.js is running. I want to have my files in azure blob storage. It is neccessary because I would like to have many SPA pages and single wwwroot directory is not enough for me.
Problem
By default next.js get its files from pages directory at host machine.
Is it possible to tell next.js to get files from other file system etc. In this scenario it would be azure storage. I could not find any example or extension point to do that.

Deploy angular rendered app on shared server

I created an Angular 7 app and built it using Angular universal to make it SEO friendly. However, as I was reading, it is not possible to deploy it now on a shared server (once build with Angular universal, otherwise it is possible), since it requires Node.JS to run the script file on server.
My problem is that my hosting plan is on a shared server so I will not be able to run it using Node.JS but I still care of having my app SEO friendly.
What can be a good solution?
Angular Universal renders your application in server side before serving the page (SSR). Indeed you will need nodejs to make it work.
You need to prerender your application as static files.
With #ng-toolkit/universal installed you should be able to prerender your application with the command :
npm run build:prerender
Now, you should see new folder dist/static , inside which all your application views should be prerendered and can be served as static files.

React Native - Android : Host JS Components on remote server

I am trying to create an android application using react native. In a general scenario, the MainActivity invokes the main component from index.js. We specify the main component to be registered in this index.js by importing any JS component form the file tree. The android application accesses the index file through a local port using http://localhost:8081/index.js
For my use-case, I want to host all the JS components on a remote server so that my android application fetches the main component from index.js on the remote server every time the app is initialized. This would enable me to make any changes to the functioning of the app on the server itself without having to roll out updates and user needing to download them.
I am still very new to react native and I do not have any code to post since I am still researching. I just have a sample application from which I cannot figure out how the android application knows to read index.js. I also cannot figure out how would I configure my application to hit the index.js file on my remote server URL.
If anyone knows how to do this or has some documentation references kindly help. I would imagine this is a very general use-case still I cannot find some solid instructions regarding this.
Use React Native with Expo. Your app will fetch JS bundles and assets over the air. See here: Configuring OTA in Expo.
Instant Updating: All Expo apps can be updated in seconds by just clicking Publish in Expo Dev Tools. You don't have to set anything up; it just works this way. If you aren't using Expo, you'd either use Microsoft Code Push or roll your own solution for this problem. Source
...but be aware of the downsides: Why not Expo?

electron - node.js - fs.readFileSync requires admin privileges when electron is built and in Program Files

I've successfully built my electron application which appears to be working substantially fine.
I use the node module fsto access files for use in my application, which is standard affair for Electron. This works exactly as expected in the development environment, and even when I build my app with the asar in C:\Users\myApp\ I can access the files from the built electron application.
However, when I've created an installer and placed the application # C:\Program Files(x86)\myApp\
fs.readFileSync
which previously worked fine both in the development verson and the built version when it was present in C:\Users\myApp\, now requires Run as Administrator Privileges to read files, else it will throw an error.
Any explanation?
Electron Version: 1.8.4
Platform: Windows 7
I believe you may want to deploy some of your application data into your %APPDATA% i.e. C:\Users\yourusername\AppData\Roaming, or in the case of electron, can deploy your files into the userData folder using app.getPath('appData') which refers you to C:\Users\yourusername\AppData\Local\your_electron_app_name or app.getPath('userData'). https://github.com/electron/electron/blob/master/docs/api/app.md#appgetpathname
In that directory, you can change the files without elevated privileges.
If you look properties of your electron application folder in your Program Files, and go to the security tab, you will noticed that that permission settings for Users is (Read & execute, List folder contents, and Read); however, administrators, have access to Full control (modify, read & execute, list folder contents, read, and write).
However, if you really need to create/edit/delete files in your Program files or ProgramData will require elevated privileges and to get around that you may want to install the npm package electron-sudo (https://www.npmjs.com/package/electron-sudo) or sudo-prompt (https://www.npmjs.com/package/sudo-prompt).

Converting cordova project using VS 2015 certificate issue

Does any one know how to assign the certificate file to the project while creating the Windows app package.
Basically i have a cordova Ionic project which was already developed and now to make a windows app, i used VS 2015 --new project option from existing code. after few hiccups am able to run the windows app,
however am not able to figure out where to add/assign the certificate which i want to use with this package.
am even trying to find where is the app manifest file however not luck in finding it, i can see config.xml.
Appreciate your help.
Regards,
RK.
Does any one know how to assign the certificate file to the project while creating the Windows app package.
If you haven't got a certificate file, you should create one(.pfx file). You can follow How to create an app package signing certificate to create one.
Once you got the certificate. You can sign your app by modifying the build.json file. You can refer to Sign Windows App for details.

Categories