We are using a UIImagePickerController to capture photos and save as attachments. Up until 8.3 everything was working fine, however when running in 8.3 on a device (iPad 4) the captured image is not added to the feature's attachments array when executing
[self.feature addAttachment:attachment];
and subsiquently not saved when executing
[self.feature.table safeFeature:self.feature error:&err];
where self.feature is a valid feature, and attachment is an AGSGDBAttachment created from the image.
This method continues to work fine on hardware running 8.2, and works fine in the simulator at 8.3.
Anyone else notice this issue? Any idea what might be causing this behavior?
Solved! Go to Solution.
False Alarm - Looks like this may have been due to a bad offline geodatabase download. Cleared the geodatabase from the device and initiated a new one and things are working as expected.
False Alarm - Looks like this may have been due to a bad offline geodatabase download. Cleared the geodatabase from the device and initiated a new one and things are working as expected.
Hi Michael Davis,
When you say UIImagePickerController, do you mean you are not using the AGSPopupsContainerViewController?
See my post above, problem resolved.
That said - we are not using AGSPopupsContainterViewController, we aren't using popups at all. Our apps use UITableViews to present forms to the user for data collection. Attachments are shown in a collection view, and a UIImagePickerController is triggered to collect new pictures.
I did see your post. But I was just interested in knowing whats keeping you from not using the popups. If there is something we can improve on, to make you use the popups.
Tip:
If you have not tried the popups so far I would suggest you try the OfflineFeatureLayerEditing sample. You will notice that, in popups, we are also using UITableView to display fields and attachments. You can add attachments from the camera as well as the gallery. And all the logic for presentation and data management is built into the popups. So you don't have to worry about adding the attachment to the feature and a lot of other things.
Nothing wrong with Popups per se... Matt Cooper might be able to provide some additional insight, but primarily I'm not sure the popups would provide us with the flexibility we need for most of our more data intensive apps... which are quickly becoming all our apps.
For instance - we have a marine mammal monitoring app that field crews use for focal follow surveys (basically a boat follow a whale and records all their activity). In this app the map is an important component, but the primary data entry interface is the data form. For instance, our "sighting" UITable View is doing things like:
For our field users this automation and optimization is very important. In some cases data collection is happening very rapidly and every second lost to a view transition annoys and delays them.
Being able to quickly scan a list view of all collected records is also very important. Our field teams often use down-time to roll back over collected data to QC and add additional detail to field notes. Being able to quickly scroll a list view sorted by date makes this much easier than tapping a map, trying to find the record you want in a bunch of overlapping points, and repeat... This is actually one of our biggest pain points with Collector, no list view for navigating large data sets.