Sharing a Realm Database between a user's devices - ios

Is there a formal way for a Realm Database to be shared between a users iPhone and iPad? Clearly that will need some kind of server that a database can be pushed and pulled from. Is there a solution for this, like is there a way to use iCloud?
If not does anyone one have any ideas for a path of least resistance for implementing this myself?
Found this chat on the Realm's GitHub page
https://github.com/realm/realm-cocoa/issues/913
I am still hoping someone here has got around this issue?

Realm hasn't provided sync feature yet. We are actively working on sync building feature, but we don't have no ETA at the moment.
Easy ways are sharing Realm data file with iCloud or other services. e.g. DropBox API.
https://www.dropbox.com/developers
Or this library might help you...? https://github.com/BellAppLab/RealmCloudKit
Second, using serverside database to sync with local database. Like Parse.com.
https://parse.com/

Related

Android 11 Storage Access Framework - How to use files?

Hey there fellow devs,
I have come across a problem while migrating our app to the new API 30 standards with the storage access framework (SAF).
I have successfully migrated the file structure and am now using the internal (FilesDir) paths.
Getting images with the MediaStore-Api is also working quite nicely.
But there is one big issue I just can't seem to fix.
In our app, we are using the API "Mapsforge" for Offline-Maps.
This API is using a Java.IO.File-Object we get from a path to a ".map" file which is almost 2GB large.
This file does not come from us, it is a file managed by the customer and put onto the device for us to use, since all the ".Map"-Files are custom.
Since the SAF is returning an Android.Net.Uri, I can't seem to convert it to a Java.IO.File without copying the contents of the file and therefore using even more storage on the device.
Is there any way to use the SAF to get a Java.IO.File-Object I can use in code?
If not, then Android 11 is making it very hard for my Customer to manage his storage.
This API is using a Java.IO.File-Object we get from a path to a ".map" file which is almost 2GB large.
With luck, Mapsforge will offer more flexible APIs in the future. You may wish to contact them about their recommendations.
Is there any way to use the SAF to get a Java.IO.File-Object I can use in code?
No. After all, the user might choose something on Google Drive or another cloud storage provider, rather than a local file. Or, they might choose a file that is inaccessible to your app. Or, they might choose content that is stored in an encrypted file, which needs to be decrypted by the document provider. And so on.

Best option for storing external database for iOS app

I am working on an app that will access an external database that needs to be able to load quickly. This is our own database, and the issue is where to store it for the fastest loading time. Currently, the database resides on a wpengine website, but it loads very slowly. One option is uploading a .plist file sporadically to the user's app when new data is available; it seems like that might not be very secure - although it would probably make accessing the data lightning fast. I was thinking that possibly CloudKit shared storage would be the best place to store the data if I wanted to keep it fast and also keep users from viewing it directly. I would appreciate any thoughts or suggestions.
As far as I understand, CloudKit will be OK for you. You can have a look at NSHipster's excellent summary here.
You also have a link to a tutorial in the comments above. If you want to discuss it further, don't hesitate to contact me through chat.

Looking for an incremental upload solution (changes only) on iOS

Is there a high-level platform solution for iOS for providing 'changes only' upload to a file. I am currently building app that is using a realm database and this realm file is written to all the time throughout the app's life-cycle. I don't want to upload a 3MB database every time there is a small change to database.
Is there a service that provides solution for my problem? I am not sure if Google Drive/Dropbox API provide a solution for this. Would love to get a lowdown on this from people who have faced this issue or used Google drive/Dropbox API.
You can use the Google Spreadsheet API to make incremental changes/additions to a spreadsheet.

Alternatives to storing data to database rather then using Parse

I have been using Parse lately for applications I develop, mainly due to the simplicity of getting an app off the ground. This could eventually be costly, more so unless I store to my own database on a rented server, I'd assume. So my question is: How would I go about storing data externally to my own server? Is there any sort of framework like parse for this with option to use one's own server storage instead? I'd assume theres something considering writing a whole login system etc that's secure multiple times would seem a bit repetitive, hence Parse. Thanks in advance!
Google has provided a mobile backend starter some time ago, here is the link https://developers.google.com/cloud/samples/mbs/. Hope it will help!
Yes you have. Kindly look into DynamoDB from amazon.
Here is a good documentation for iOS SDK.
More granular detail is here
I hope that helps.
You may need to have an account with amazon aws in order to create your appID & all.

iPad app designing: sync with Excel file

I'm designing a new app for iPad for a small company. This app will use Core Data to store a local database and a database of products and prices. The last database needs to be always up to date since the prices can change.
This company, has a Excel file to keep this database of prices. So they don't have a SQL db to which I can interact from my app.
One option could be to export the Excel file in CVS and put that file in their server (accessible by internet). Then my app should parse the file.
I don't like very much this idea, though.
Do you have any suggestion?
I had a very similar problem to you. I recently got into a project where the client wanted to import information from an Excel file into an app. I know a lot of people say, just transform it into a CSV and parse it that way, but I really didn't want the client to go through yet another step and introduce a different file format - as simple as that may be.
I also really don't like having the information in the cloud, especially Google. Privacy is something that's important to most companies and I'd doubt they'd approve of you using Google to parse the info.
In order to parse the file, I created QZXLSReader. It's a drag-and-drop solution so it's a lot easier to use. I don't think it's as feature complete, but it worked for me.
It's basically a library that can open XLS files and parse them into Obj-C classes. Once you have the classes, it's very easy to send them to Core Data or a dictionary or what have you.
I hope it helps!
Here are a couple of options for you:
Use Google Doc as the intermediary. When the pricing Excel is updated by someone, simply upload the updated Excel to Google Docs. From your iPad app, you can read the latest data via the Goole API. If the company is up for it, they can move to Google Doc altogether and just modify the online Google Spreadsheet directly.
Use services like StackMob as the intermediary. You will have to write a tool to sync the pricing Excel with SrackMob but you can easily access the data via StackMob's iOS SDK.

Resources