SHARING

Cases:
Image with only one resource, just share resource

HEIC only (captured outside our app)
HEIC with edits
Other image type with edits like jpg, png
DNG only
DNG with edit



HEIC captured in iOS camera app
(lldb) po resources
▿ 2 elements
  - 0 : <PHAssetResource: 0x133108a00> {
    type: photo
    uti: public.heic
    filename: IMG_6876.HEIC
    asset: 452DACC2-0347-4CE7-AD41-4FBD43029FE6/L0/001
    locallyAvailable: YES
    fileURL: file:///var/mobile/Media/DCIM/126APPLE/IMG_6876.HEIC
    width: 4284
    height: 5712
    fileSize: 3267266
    analysisType: never-download
    cplResourceType: Original
    isCurrent: YES
    isInCloud: YES
}
  - 1 : <PHAssetResource: 0x133109860> {
    type: video_cmpl
    uti: com.apple.quicktime-movie
    filename: IMG_6876.MOV
    asset: 452DACC2-0347-4CE7-AD41-4FBD43029FE6/L0/001
    locallyAvailable: YES
    fileURL: file:///var/mobile/Media/DCIM/126APPLE/IMG_6876.MOV
    width: 1308
    height: 1744
    fileSize: 4455707
    analysisType: unavailable
    cplResourceType: OriginalVidCompl
    isCurrent: YES
    isInCloud: YES
}

JUST DNG
(lldb) po resources
▿ 1 element
  - 0 : <PHAssetResource: 0x131ff2ee0> {
    type: photo
    uti: com.adobe.raw-image
    filename: IMG_6879.DNG
    asset: 33C3A48E-B659-4761-B00A-891582626A15/L0/001
    locallyAvailable: YES
    fileURL: file:///var/mobile/Media/DCIM/126APPLE/IMG_6879.DNG
    width: 3024
    height: 4032
    fileSize: 14375547
    analysisType: never-download
    cplResourceType: Original
    isCurrent: YES
    isInCloud: YES
}

DNG originally that has edits
(lldb) po resources
▿ 3 elements
  - 0 : <PHAssetResource: 0x131ff23a0> {
    type: photo
    uti: com.adobe.raw-image
    filename: IMG_6879.DNG
    asset: 33C3A48E-B659-4761-B00A-891582626A15/L0/001
    locallyAvailable: YES
    fileURL: file:///var/mobile/Media/DCIM/126APPLE/IMG_6879.DNG
    width: 3024
    height: 4032
    fileSize: 14375547
    analysisType: unavailable
    cplResourceType: Original
    isCurrent: NO
    isInCloud: YES
}
  - 1 : <PHAssetResource: 0x131ff2940> {
    type: adjustment
    uti: com.apple.property-list
    filename: Adjustments.plist
    asset: 33C3A48E-B659-4761-B00A-891582626A15/L0/001
    locallyAvailable: YES
    fileURL: file:///var/mobile/Media/PhotoData/Mutations/DCIM/126APPLE/IMG_6879/Adjustments/Adjustments.plist
    width: 0
    height: 0
    fileSize: 771
    analysisType: unavailable
    cplResourceType: Unknown
    isCurrent: YES
    isInCloud: NO
}
  - 2 : <PHAssetResource: 0x131ff3ac0> {
    type: photo_full
    uti: public.heic
    filename: FullSizeRender.heic
    asset: 33C3A48E-B659-4761-B00A-891582626A15/L0/001
    locallyAvailable: YES
    fileURL: file:///var/mobile/Media/PhotoData/Mutations/DCIM/126APPLE/IMG_6879/Adjustments/FullSizeRender.heic
    width: 3024
    height: 4032
    fileSize: 1508903
    analysisType: never-download
    cplResourceType: JPEGFull
    isCurrent: YES
    isInCloud: YES
}


JPEG+RAW
(lldb) po resources
▿ 4 elements
  - 0 : <PHAssetResource: 0x133da3e80> {
    type: photo
    uti: public.heic
    filename: photo.heic
    asset: 1A1FEAEF-B7E7-436A-B9C0-FBCC0CA0665E/L0/001
    locallyAvailable: YES
    fileURL: file:///var/mobile/Media/DCIM/126APPLE/IMG_6871.HEIC
    width: 3024
    height: 4032
    fileSize: 1477269
    analysisType: unavailable
    cplResourceType: Original
    isCurrent: NO
    isInCloud: YES
}
  - 1 : <PHAssetResource: 0x133da29e0> {
    type: adjustment
    uti: com.apple.property-list
    filename: Adjustments.plist
    asset: 1A1FEAEF-B7E7-436A-B9C0-FBCC0CA0665E/L0/001
    locallyAvailable: YES
    fileURL: file:///var/mobile/Media/PhotoData/Mutations/DCIM/126APPLE/IMG_6871/Adjustments/Adjustments.plist
    width: 0
    height: 0
    fileSize: 771
    analysisType: unavailable
    cplResourceType: Unknown
    isCurrent: YES
    isInCloud: NO
}
  - 2 : <PHAssetResource: 0x133da3d40> {
    type: photo_full
    uti: public.heic
    filename: FullSizeRender.heic
    asset: 1A1FEAEF-B7E7-436A-B9C0-FBCC0CA0665E/L0/001
    locallyAvailable: YES
    fileURL: file:///var/mobile/Media/PhotoData/Mutations/DCIM/126APPLE/IMG_6871/Adjustments/FullSizeRender.heic
    width: 3024
    height: 4032
    fileSize: 1547374
    analysisType: never-download
    cplResourceType: JPEGFull
    isCurrent: YES
    isInCloud: YES
}
  - 3 : <PHAssetResource: 0x133da1f40> {
    type: photo_alt
    uti: com.adobe.raw-image
    filename: photo.DNG
    asset: 1A1FEAEF-B7E7-436A-B9C0-FBCC0CA0665E/L0/001
    locallyAvailable: YES
    fileURL: file:///var/mobile/Media/DCIM/126APPLE/IMG_6871.dng
    width: 4032
    height: 3024
    fileSize: 14528248
    analysisType: unavailable
    cplResourceType: OriginalAlt
    isCurrent: NO
    isInCloud: YES
}


apple only from our app
(lldb) po resources
▿ 3 elements
  - 0 : <PHAssetResource: 0x1311ea300> {
    type: photo
    uti: public.heic
    filename: BDF80877-79EE-4555-927A-C46A242ACD3C.HEIC
    asset: B6EDE714-7632-4C20-85D0-0737F2E93AD3/L0/001
    locallyAvailable: YES
    fileURL: file:///var/mobile/Media/DCIM/126APPLE/IMG_6877.HEIC
    width: 3024
    height: 4032
    fileSize: 858704
    analysisType: unavailable
    cplResourceType: Original
    isCurrent: NO
    isInCloud: YES
}
  - 1 : <PHAssetResource: 0x1311e9860> {
    type: adjustment
    uti: com.apple.property-list
    filename: Adjustments.plist
    asset: B6EDE714-7632-4C20-85D0-0737F2E93AD3/L0/001
    locallyAvailable: YES
    fileURL: file:///var/mobile/Media/PhotoData/Mutations/DCIM/126APPLE/IMG_6877/Adjustments/Adjustments.plist
    width: 0
    height: 0
    fileSize: 775
    analysisType: unavailable
    cplResourceType: Unknown
    isCurrent: YES
    isInCloud: NO
}
  - 2 : <PHAssetResource: 0x1311eb200> {
    type: photo_full
    uti: public.heic
    filename: FullSizeRender.heic
    asset: B6EDE714-7632-4C20-85D0-0737F2E93AD3/L0/001
    locallyAvailable: YES
    fileURL: file:///var/mobile/Media/PhotoData/Mutations/DCIM/126APPLE/IMG_6877/Adjustments/FullSizeRender.heic
    width: 3024
    height: 4032
    fileSize: 880375
    analysisType: never-download
    cplResourceType: JPEGFull
    isCurrent: YES
    isInCloud: YES
}
