Xamarin (Forms): how to download and use an SQLite DB file - sqlite

my client has a simple SQLite DB exposed through an URL (direct download of the DB entire file).
What I have to do is to download the file and then use it in my app: Android and iOS.
I am already able to use the same DB locally: I have a copy of the same file that is online (not updated) in my assets and resource folders and I can use the data in it inside my app. The DB structure won't change; the file is updated every night to reflect the changes in their DB, so only record updates/additions/removals.
Anyone can give me any advice on how to achieve this result?

Since you already have a url of this data file, then you need to separately download this file and save it to local on each platform, and use DependencyService to call the method of each platform in your portable lib.
For the example of using DependencyService, you can refer to Saving and Loading Files.
For the downloading part, you can use some plugins for example like CrossDownloadManager, which may make your work easier.
Or if you want to complement this work in your PCL, you can add a System.Net.Http reference in your PCL, then use HttpClient to download your database file, but you still need to use DependencyService to save this file on different platforms.

Related

How to create shared assets in Xamarin.Forms?

I have read Using Android Assets. My problem is a bit different because I want to create a folder called assets in the "shared project" as follows. Android and iOS projects are removed for the sake of simplicity. Only UWP is left for demonstration purposes.
I have already created a folder named assets and save a file secret.txt in it. However, I don't know which Build Action value should I attach to this secret.txt. The secret file is not a real secret.
Any comments and suggestions are always welcome!
Set files as EmbeddedResources and manipulate them as described here:
https://learn.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/files?tabs=windows#embedding-in-shared-projects

How can I bundle data files with a Meteor application?

I need to bundle some data files (geoip data) with my meteor application. Simply putting the data files in my application directory doesn't appear to do anything - they're not copied to anywhere in .meteor/local/build when I run meteor.
How can I make meteor copy these files when it builds my application?
So, files are loaded on different environment is a specific order. Have a look here for details on what's loaded where and when.
https://guide.meteor.com/structure.html#load-order
Then you can decide where best to place the file depending on the use case.

Artifactory for Peoplecode

I am new to peoplesoft area and would like to check if we can use Artifactory OR nexus repository server to store the peoplecode binary
i can compile the code using App designer but once we compile the code, need to create the package and store it to artifsctory server.
does it seems logical OR totally wrong assumption/understanding
please suggest
Regards
On its own PeopleSoft does not have version control. It has change control, but that is something different.
However, there are third party solutions on the market that fill this gap: STAT and Phire, to name two.
What you could do, if you don't want another tool with a licence: export your projects to file and check these files into the repository. You can revert to an earlier version by importing the file in App Designer
You can use the Decode Peoplecode project at https://sourceforge.net/projects/decodepcode/files/ to extract the peoplecode source code. You can also use this java project to check the code into a git or subversion repository.

How do I share Notepad++ snippets (nppsnippets) with others

I have setup a number of custom snippet libraries with the nppsnippets plugin.
I can see where it has the ability to import sqlite files, but I don't see what file(s) to share if I would like to let associates use the libraries I created.
Ideally I would like to share a subset of the libraries I created.
Thanks
This plugin creates a sqlite database within your %appdata%/Notepad++/plugins/config/ folder named NppSnippets.sqlite.
While Notepad++ is closed, you can overwrite the entire database in your associates appdata folder with the one you have, and the next time Notepad++ is opened, it will have your library in their application. Alternatively, you can have them use the built-in import tool within notepad++ to import particular libraries from your SQLite database.

How to make an SQLite database as part of the build process - iPhone SDK

I have created a Core Data application in iPhone Simulator. Now when I am testing it on a device, my SQLite database is empty. I have some preloaded settings which I want to deploy when the application is installed.
How can I achieve that?
I have seen a few questions on Stack Overflow, but they don't exactly answer my question.
If you have an existing sqlite-store file you just add it to the app bundle just like you would any resource e.g. images, audio, etc.
If it is read only, you just use the NSBundle commands to supple a path to it inside the readonly app bundle. If you want it writable, you copy the store file from inside the app bundle to one of the writable app directories e.g. Documents or Library, and then open it there as you normally would.

Resources