I'm doing a check for updated data from the web in -applicationWillEnterForeground: but how would I test this in the simulator? I have no control of when the updates from the web are made so I need to trigger an update myself within Xcode when it's already running in the simulator.
I need to some dynamic testing so to speak.
Not suer by what you mean by 'check for updated data from the web' though sounds like you are getting refreshed Data from a WebData source. Can you Simulate that Web Data source? There are many WebServers you can install that you can create a Quick page to send you back Data when you query it. We do this with our App. Ultimately we will be querying our Ultimate Web Data, but while testing we simulate the data on the web with our own web server. A few pages in the background and you can have it return you the data that you need. We use XML of the communications back and forth.
Then once we go live, we switch the web server name and we are good to go.
Related
Currently I have an application which displays a list of items that when selected by a user it opens said item in the default browser on the mobile device they're using.
Currently because the items are hardcoded into the mobile app using the Xamarin platform then a new version of the app is needed to be released/deployed to every device when wanting to update.
I was wondering if anyone could provide me with any documentation/ideas on how I would be able to carry out adding more items to the list (preferably in a better UI than just a standard list) without having to release a new update.
Some ideas which I have thought about:
Using a CMS - to control the links that need to be open
SQL Lite - Create simple db with item name + url then call the url in the table (then somehow when I update the db its pushed into the app)
Using a cloud service such as Azure to do a similar function as above.
This question is vague, but if someone can point me in the correct direction.
That would be fantastic.
Depending on your knowledge, i would go with Azure or Parse Server and deploy the url's there. Each time you open the app it will fetch the links from the remote server. Both Azure and Parse provides caching so you wont incur any network traffic.
It will also depend how frequently you update the links, if you update them often then go setup Azure and Parse. If you rarely update the links then you can setup a local SQLite database and have a way to check from a remote server if there are any new links available, it they are there then you can pull them into your local SQLite database.
Is it possible to leverage transaction on the client, when using azure app service offline sync?
It seems to me that you can pretty much only insert into the SQLite store a record at a time, but ideally i'd like to be able to commit multiple records in a transaction.
I'm using Xamarin with Android right now,but will be also supporting iOS.
Thanks
Matt
Unfortunately, on Windows, Xamarin, and Android you can only commit one record at a time on the local MobileServicesSQLiteStore. This is because changes need to be made one at a time using methods like SyncTable.UpdateAsync, which is how you mark a change as being tracked to send to the server.
On native iOS, the Mobile Services offline sync feature uses Core Data, which does support a form of transaction (https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CoreData/Articles/cdMemory.html). If you use these APIs, you still need to make calls to the Mobile Services SDK methods to track each individual change in the internal tracking tables.
Why do you need transactions on the client side? There might be a different way to achieve your goal.
Say I have 10K users for my app and I want to switch to my own custom server for backend. I have seen the Parse export functionality but I don't get how it can help me in this situation.
I mean even if I export all data and make updates to app so that it makes calls to my new custom server, still, it will take months for all my users to use updated version of app(many users don't update immediately, my last update on fb was year ago).
Also, during this transition half of my users would be having their
data on my custom server and other half(those who haven't updated)
would be using parse server, so for queries that require all data in one place this becomes an issue (I could solve this via replication but imagine how slow it would be in realtime to push the data to both - my server and parse.com).
Has anyone thought about this ?
What you could do is when you release a new version of your app, when a user logs in and they are on parse, migrate their data at that point to the new server and from that point on that user uses the custom server. That way users move to the new server as they upgrade, I always have a flag that is fetched from my server to force the user to upgrade if is needed. Hope that helps.
Copying data over to your new backend periodically until you have finalize your mobile client code and then allow the user to update their app on the App Store or Google Play Store would provide the switch over. Doing that elegantly would be dependent on the type of app and user base you have for the app. I wrote up a part 1 of a blog on these considerations for migrating over from Parse to Couchbase Mobile stack and the reasons why to consider the stack.
If you can already attach a new system in place to have new data in two places (Parse and customer backend) then the copy and merge in the future might be easier to handle but this is case by case. Then when on mobile app update, you can depreciate the server. Or push data to have local store for those users who will be on older versions since Parse will eventually stop working. Any new experiences will require update to the new App version.
I have a business LS web application which I update from time to time.
I do the update by simply using the deploy wizard and everything is working great.
My problem is handling all my users that opened my system in their IE and left it open through my deploy process.
Since they have the old web application is opened on their browsers, and I have deployed the new version to the server, I can see errors occuring in certain situations.
Is there a way to make sure all users with the application opened will be forced to refresh the web application page? Maybe remotely disconnect all currently connected users?
There is no built in way of doing this. You will need to write a custom solution. Someone in the MSDN Forums has written a class to do this for OOB apps.
You should be able to reuse the timer part of that class. I'm not sure if the UpdateAvailable method will work for Web-based applications or not. You'll have to experiment with that.
Alternatively, you can create a custom notification system. Insert a message to your users into a table in your database from the administrator account. Have a timer on the user account check the table every so often. If it finds a new message, display a notification to the user.
Then you can use either an HTTP Response Header or an ASP method to log the users out as described in this Microsoft Support article.
I'm interested in implementing a 'user data' backup facility for the core data sqlite database within my application.
In applications like 'simple pdf reader' you flick a switch in the app and are provided with an IP Address and port number. You then enter these details into a computer browser on the same wireless network and can then get to a web page hosted by the device. This real world example allows copy of pdf files to and from that device's app. I'd like to use the same idea to allow back up and restore of the core data database file in future versions of my app (iHeals)
I've no problem creating web pages, I'm just unsure on how to get my app to host one. Any direction is most appreciated.
Cheers,
Tim
You should take a look at implementing this framework or this one.