BlackBerry persistent-store data lost after OS update - blackberry

I am creating a BlackBerry application that starts automatically when the device starts, and it uses the persistent store to hold data.
After updating the OS version, the application does not run on startup and if I start it manually, there is no data in the persistent store, and the program crashes.
So what is happening...
1. when auto-run setting is lost during OS update?
2. when persistent storage is lost?
and how do I solve this?

To have persistent data survive an OS upgrade you will have to use the synchronization API. The OS upgrade process does a data backup (using the synchronization API), copies installed third party applications off the device, wipes the device, installs the new OS then installs third party applications and resores data (again with the synchronization API). The API is documented at: Backing up data.

Related

Can I upload an app to the App Store using a MacOS VM on my Windows without any legal troubles?

Basically, I don't have a Mac.
But I'm aware of being able to virtually run a Mac throw solutions like Virtual Box or VMware on my Windows, despite how slow it will be. (I know it technically isn't legal).
What I'm asking is, will I be able to actually upload the compiled app to the app store without issues? Such as the App Store recognizing that it is not a legitimate device or something?

Cordova SQLite Plugin Compatibility

I'm looking to build an iOS hybrid application that also utilizes an Apple Watch application. The watchOS app collects Altimeter data to be stored, and that's it. I was thinking of using this plugin since the watchOS portion is written in Swift. I haven't yet begun the iPhone app, it's just blank right now, but was thinking of making it a hybrid application using Cordova. I've been searching for the best way to share data between the applications, and I think SQLite may be the easiest.
This cordova plugin can be used to manipulate data in an SQLite database using JS. That could be used in the iPhone app. I guess my quesiton is - is this possible? If I create a database in swift using this library, will the Cordova plugin be able to access it? Does anyone have any better ideas for sharing data from a native watchkit app to a hybrid iPhone app?
That will not work. If you create a SQLite database in the watch application running on the watch which is a physically different device than the iPhone running your cordova app, how should the application running on the iPhone access the database?
The way to go to use a watch-kit application in combination with a cordova app is cordova-plugin-apple-watch. The plugin offers three different possibilities to communicate between the watch app and the iphone app:
Message passing
Local notifications and
User defaults
If the data should be accessible by both apps and it should be persistent (like a database) the way to go is probably user defaults. But if you just want to send data from your watch-app to your cordova-app (which will not be needed on the watch anymore) then message passing does also work (the cordova-app can then store the data wherever you want).

IOS app publishing for customers - only through App Store or iTunes?

my company is very new to IOS app development, but we are now in the process of releasing a first app (developed through Xamarin).
This app connects to our API for the totality of the features (we develop an ERP web application to be used by companies and the app can be installed on the company's employee personal iphones).
Our backend application, apart from our own servers fro SAAS distribution, is also installed on premise on several customers and this means that we must coordinate our backend API update process with our IOS app release.
When we developed our android app we released the app updates through an FTP (Play Store was only used to install the app the first time) so the coordination process was fairly simple:
at startup time the app asks the api what is the current api version
then it connects to an FTP to check what is the latest app update compatible with that api version
if there is a new update available it downloads it and installs it
Is there a way (a viable way, not some hacky one) we can replicate this behaviour with IOS apps?
If there isn't I guess the option is only to publish the app through the app store (so there will always be only one version of the app for everyone) and make sure that the new versions of the app works with the old versions of the API. And the contrary too, while waiting for the app review time the API can be updated, so it must offer a certain degree of backwards compatibility.
Thank you

Debug core data application in production

I developed an application with xcode for ios and it's now in production. I have some bugs I can not reproduce in dev but which happen in production.
How can I explore core data of production ipad and debug it?
Thank you
If you can connect the device via USB to your computer, you can download the app data, this will include the database file. If you can't, you have to rely on 3rd party solutions like iExplorer which can perform the same task. I believe this would only work for apps which are not downloaded via the App Store.
Another option would be to include a button in the app to send the database to a server. A lot of my enterprise apps include this functionality, because it makes issue reproducing a lot simpler. But you would need a new version of the app for this.

Testing iCloud sync with a single iOS device

I have just one iOS device at the moment, and it hasn't been a problem so far. But I now want to add iCloud sync support to my app (which uses Core Data).
Will testing be simply impossible until I get a second device? Or is it possible to use iOS Simulator in conjunction with my device or to fake iCloud data in order to test iCloud sync?
Edit: It doesn't take much research to find that iCloud, especially with Core Data, definitely requires extensive testing and that certainly means testing with more than one device!
In Xcode 5:
OS Simulator now supports iCloud syncing of documents and KVS data
within an app, enabling apps to sync between devices using iCloud.
This feature is useful when testing to ensure that the app documents
and data are syncing properly across multiple devices.
Note: With the app running in the iOS Simulator, sign in to an Apple
ID account using the Settings app. After signing in, use the “Trigger
iCloud sync” command in the Debug menu to tell the simulator to sync
with other devices.
You could use your mac as the second device and take the backend of your iOS core data code and write a test app for the mac. You will have to run the app as a sandboxed app in xcode and put the same sandbox name in the app settings for the apps to see each others data.
To make this work you need to create a mac app up on the provisioning portal (requires a mac developer license 99 bucks - cheaper than an iOS device) and enable it for iCloud.
In general unless you are going to try and manage merge conflicts in your app, you dont need to test iCloud itself. Anything that is in the ubiquity container will in fact be synced. If you need transactional control across devices (same documents being updated on multiple devices at the same time for the same user, you would have to handle conflicts), depending on what your app does it might be an issue.
One way you could test at least a sub-set of your syncing is to install your app on your device, add some data, sync that data to iCloud, then delete the app from the device.
When you install it again and sync to iCloud, you should then get back the same data you previously synced up to iCloud.
It's not exactly real-time, but it should give you something to work with.

Resources