Upgrade Flutter debug build on device (using VSCode) - flutter

I have an app that is just for personal use. I can run it from VSCode directly (just run & debug). It saves its data onto its assigned "disk space" on the device. However, when I close the app and restart it (no longer connected to my dev PC), it starts up an old version of the app - obviously the one I last really installed on the device.
The only way I know to have the latest version on the device would be to deinstall it, then install it via devPC. Unfortunately, this deletes the local files of the app.
Is there a way to upgrade the installed version directly from the dev PC? I think it is possible to manually install the newest apk after I built it, but is there a way as easy as "run & debug", with the only difference that the latest version of the app starts when I restart the app?

There are no option to upgrade the app locally from PC. Every time you connect the phone and press Run & Debug, it will rebuild the app again.
In order to persist your data through different app versions, you should consider integrating some simple backend structure to your app.
You can think of creating a database which will provide you data every time you open the app. One easy option you can try is to integrate the Cloud Firestore in your app. You can follow this tutorial here to understand the implementation and feel free to ask if you need any further support.

Related

Flutter Desktop (macOS, Linux, Windows) - How to deliver code updates?

Delivering client updates is important for future compatibility of our product. Obviously, the desktop storefront can issue application updates and assist with managing that process. However, many of the popular developer tools in use today can be downloaded directly from the developer's website.
Is there a solution that allows me to package a Flutter desktop application and deliver updates without needing something like an App Store? Something that can download the updated binaries across launch and install them before the next launch?

Changes made to app are not being retained once run session ends

Let's say I'm connected to an actual device, making multiple changes to my app and hot-reload/restart is doing its thing and life's all good. Once I'm satisfied with changes I hit the stop button.
Now, if I pick up the phone and launch the app - it will be an older version of the app that doesn't contain the changes just implemented.
In order to get most recent changes I have to uninstall app from the phone and then go back into the IDE (VSC) and run the app once more to get the latest changes.
Is there a configuration setting that allows you to avoid having to do this?
It is my understanding that while you are developing, and hot-reloading/restarting, you are working on the Dart Virtual Machine. So if you don't make a full build and install the APK on your device then once you close the development build you are working on the VM closes and the code that was running on it is lost.
To answer your question, there is no configuration that you can set to have what is running on the VM to be on the APK without a full build.

Launching non-sandboxed Swift app at login -- best practice

I've developed a Mac status-menu app which can't be sandboxed, because it creates a virtual drive; it's installed alongside a Finder rightclick-menu extension, which does conform to sandboxing rules. At this point (after manual install) the right-click launches smoothly on login, but the application doesn't.
In recent versions of MacOS the previous methods for adding an app to login items (involving LSSharedFile) have been deprecated. The examples I've found since then involving SMLoginItemSetEnabled or launch agents (e.g. MenuApp in Swift 4 to Run on Login for High Sierra?) all seem to involve sandboxing. Is there a best practice for running an un-sandboxed app at login on OS X 10.11+ -- either in code or at installation time?
I'm thinking about using a launch agent, as described above; can all these steps be done at install time with administrator privileges, even without sandboxing? And if so, what would I need to do to automate uninstallation as well?

Freeze on Copying APK file

I created a new empty project, switched platform to Android and started Build and Run. But when it comes to "Copying APK File to device" it just freezes and I have to restart Unity.
I installed Android SDK & NDK tools just before that (through Unity Hub). Android Build Support was installed by me manually a while ago so it was visible as installed in Add Modules window. I did not do any changes to the project. The most interesting thing is that the apk is built in my Builds folder. Not sure if it works though.
I am using Unity 2019.1.0f2. The device Android version is 9.0 (API level 28) and the minimum API set in Player is 16, so the problem should not be with API.
Does anyone know possible reasons for it?
Try to turn off the following setting on your android device.
Settings -> Developer options -> Monitor apps installed by ADB
This setting(if turned on) will ask a verrification if you want to install the app. It feels like this cuts off the connection with unity which causes it to get stuck.
Unplugging and replugging the device seems to work aswell. In case of big projects this is anoying tho since if you are to quick it will just say it lost connection and it will ask if you want to reconnect, which in turn causes the same problem.
This is the only answer that worked for me:
https://answers.unity.com/questions/1248123/build-run-apk-freezes-on-pushing-content-only-one.html
In short, Player settings -> Publishing settings -> Split application binary
First of I would ask you on what computer did you run this on? (performance wise)
Second you can just copy the .apk file to the phone and install it there. If you got to where it prompts for copying to android your apk file is fine and built.

Telerik Nativescript for Blackberry

We know that Blackberry 10 can run Android app. Does somebody tried Telerik Nativescript for Android and make it run for Blackberry 10?
If so, is it possible to explain the steps to be able to do it? Does Webworks gives any help?
Telerik NativeScript for Android does indeed work on BlackBerry OS 10 I've tried on (10.3.2.2474). I'll list some tips to get you started, but please keep in mind that NativeScript doesn't officially support BlackBerry OS.
Deployment with the {N} CLI tool (tns) might be problematic - it produces an apk for the app, but it can't deploy it on the device itself, so you need to transfer it somehow and install it on the device.
Alternatively you can use Telerik AppBuilder to build the app (either version will work - VS plugin, CLI tool, Windows or Web clients) and deploy it on the device via QR code scan and install. However, apk installation is a bit slow process on a BB10, so you may choose to use the NativeScript companion app for development. Deployment to the companion app is done via QR codes - it has an integrated QR code reader - and since no installation is necessary, development cycle is faster. There is a small issue with the app - it may seem to crash on the first run, but you can still find the Sync and Scan buttons in the BlackBerry Hub, which you can use to scan the code and start your app.
Releasing the app in the BlackBerry store is out of my scope, but you can check these documents:
https://developer.blackberry.com/android/documentation/rpkg_with_bb_plugin_for_android_stdio.html
https://developer.blackberry.com/android/documentation/publsh_your_app_to_appworld.html
Make sure you've built the app for release as mentioned.
Let me know if this helps.