We are building a solution for field technicians that utilize Apple iPhones out in the field to track data for installations at assigned sites. The iPhone is running a custom-built application that field techs utilize to view their list of assigned installations for the day. They can also log the necessary data for the installation including: Numbers, Text Data, and Photos. GPS location and timestamps are logged automatically by the application. All text/numeric data is stored inside of Quick Base. Photos are uploaded to an Amazon S3 bucket and the URL reference to the image is stored in Quick Base. The field technicians work in areas that have inconsistent data coverage. Therefore, the application has functionality to enable edited/added data to be stored locally while in an offline state.

The offline functionality has proven to cause some issues with data getting lost or not syncing properly to Quick Base. Some of the more common issues with the offline saving are: records missing data in some fields in Quick Base, images not coming through to Amazon S3, and full records occasionally getting completely lost. The offline mode currently pulls in a copy of the Quick Base tables to a local database on the user's device. When there is no Internet connection, the application makes updates in the local database. Once the Internet connection is reestablished, the app will synchronize the local database with Quick Base automatically.

Given the issues we've run into, is there a better way to maintain data integrity in the offline state to ensure data isn't getting lost? Is utilizing a local database the best way to accomplish the offline syncing capabilities?

The answer is yes but. The yes is just that but it requires a programmer to sit down with the client to discuss what the problems are then send the programmer out to fix the sync issues.

Today however I run into systems that were built without a top tier programmer and the owner wants this fixed. They often dismiss it as something simple if only someone will reveal the cure.

So your current code is losing records. Sounds like a verify, re-try system is needed.

PS. As to your local database part of the question. Your choice of how to design that. Both database and simple files to be sent later work.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.