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?