when requesting images photos framework manage last 64 correctly. last ones return nil datauti
, imagedata
in following code. whilst attempting figure out going on found phasset
knows uti is, reporting me nil.
anyone else seen this?
you can see i've made code access asset's uti when it's reported nil app can determine if it's gif or not isn't advisable way of doing , never imagedata
anyway it's not huge amount of help!
phfetchoptions* fetchoptions = [[phfetchoptions alloc] init]; fetchoptions.sortdescriptors = @[[nssortdescriptor sortdescriptorwithkey:@"creationdate" ascending:no]]; phfetchresult *allphotosresult = [phasset fetchassetswithmediatype:phassetmediatypeimage options: fetchoptions]; [allphotosresult enumerateobjectsusingblock:^(phasset *asset, nsuinteger idx, bool *stop) { phimagerequestoptions* options = [[phimagerequestoptions alloc] init]; options.synchronous = no; options.networkaccessallowed = yes; options.deliverymode = phimagerequestoptionsdeliverymodehighqualityformat; [[phimagemanager defaultmanager] requestimagedataforasset: asset options: options resulthandler:^(nsdata *imagedata, nsstring *datauti, uiimageorientation orientation, nsdictionary *info) { nsstring* val = [asset valueforkey: @"uniformtypeidentifier"]; if( !datauti ) { datauti = val; } }]; }];
edit: forgot mention missing image creation dates aren't recent images , seem spread out. actually, photos app doesn't seem show them, based on creation date. there doesn't seem should in positions looking @ neighboring images of creation dates place them.
not of answer here happy else take bash @ explaining it!
looking @ creation dates of missing assets managed track 1 down in photos app missing app. had thumbnail when selected it did circular download indicator pull down data trying open in app's action extension (just let's preview gif's animation in photos app or elsewhere) popup appeared said there error preparing it. i've not seen before going wonky icloud.
previously requesting phimagerequestoptionsversionunadjusted
in app switching phimagerequestoptionsversionoriginal
seems have fixed it....?
Comments
Post a Comment