Open gloubibou opened 5 years ago
The problems described by @gloubibou still persist in 10.15 Beta 5.
Furthermore, in 10.15 I can no longer access the Photos library from the iMediaTester app (and the tester app does not show up within the Privacy / Photos list within System Preferences, and no system dialog is asking me whether I want to grant access. Any ideas anyone?
Note: For reasons unknown to me access to the Photos library from our shipping app works as expected.
I know of three problems (on Mojave). Can't access Catalina right now. Need to re-install since the last update stopped halfway through. :-(
What should be in the pull request:
CFDataRef systemLibraryURLBookmark = NULL;
CFDictionaryRef wellKnownLibraryPathCache = SBPreferencesCopyAppValue((CFStringRef)@"WellKnownLibraryPathCache",
(CFStringRef)@"com.apple.photolibraryd");
if (wellKnownLibraryPathCache != NULL) {
CFDictionaryRef cache = CFDictionaryGetValue(wellKnownLibraryPathCache, CFSTR("cache"));
if (cache != NULL) {
systemLibraryURLBookmark = CFDictionaryGetValue(cache, CFSTR("kRDLibraryKey_Canonical"));
}
if (systemLibraryURLBookmark != NULL) {
CFRetain(systemLibraryURLBookmark);
}
CFRelease(wellKnownLibraryPathCache);
}
On 13 Aug 2019, at 15:38, Jörg Jacobsen notifications@github.com wrote:
The problems described by @gloubibou https://github.com/gloubibou still persist in 10.15 Beta 5.
Furthermore, in 10.15 I can no longer access the Photos library from the iMediaTester app (and the tester app does not show up within the Privacy / Photos list within System Preferences, and no system dialog is asking me whether I want to grant access. Any ideas anyone?
Note: For reasons unknown to me access to the Photos library from our shipping app works as expected.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/iMediaSandboxing/iMedia/issues/110?email_source=notifications&email_token=AAAMEERA2TYLBTKGCCVTV53QEK2PHA5CNFSM4ID6LLF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4FV2BA#issuecomment-520838404, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAMEERQ6LPCYG2KYKZA6LDQEK2PHANCNFSM4ID6LLFQ.
@gloubibou I added the missing .plist entry for the tester app and the library is back again when building non-sandboxed. Thanks!
I was glad to find this issue documenting many of the ongoing issues with MLMediaFramework, and the problems with the new PhotoKit stuff. I am getting feedback from MarsEdit customers that the Photo library iMedia shows is empty. I wasn't able to confirm this at first, until I issued a tccutil reset All com.red-sweater.marsedit4
in the Terminal. Now I am neither prompted to grant access nor shown any images. It appears the MLMediaObject returns an empty (not nil) mediaSources
property. Unlike @jjac's experience with the test app, MarsEdit does already have a usage value in its Info.plist. This sort of smells like a subtle code signing/etc issue but I don't think anything like that has changed recently for me.
Interesting to note, in support of it being some kind of subtle code signing thing: the Mac App Store version of MarsEdit did prompt for access and does show all the photos.
Argh! I guess this was a consequence of adopting the hardened runtime for the Developer ID version of the app. I needed to add the com.apple.security.personal-information.photos-library key to my entitlements, in addition to the com.apple.security.assets.pictures.read-only that was already there.
I have noticed the following issues on the latest Catalina beta:
Apple Photos updates the library and changes identifiers on photos. Previously saved identifiers are no longer valid. E.g. we can no longer show badges for images loaded prior to the migration. I have submitted a bug report to Apple requesting the legacy identifiers to be saved and made available through MLMediaObject
The identifiers given through MLMediaObject differ from those used by Apple Script or PHPhotoLibrary. It appears the identifiers just lack a suffix. I don't know how safe it is to assume that the suffix is always the same. I have submitted a bug report to Apple. This breaks HoudahGeo. I need to be able to find photos through MLMediaLibrary and refer to those in Apple Script.
The library migration renames photo files: originals and previews. Our nameForMediaObject: method can no longer retrieve a readable/sensible name for photo files. When nameForMediaObject: finds no title, it uses the file name. Previously the files in the library kept their original name. E.g. IMG_007.jpg. Users could relate to that name. It is shown in the Photos app. Now files are named after their internal identifier. Not a string we can display. Not a value that is known or useful to the user. I have submitted a feature request to Apple to get the original file name exposed through MLMediaLibrary
Please file bug reports with Apple. A few duplicates might give us a chance to be heard.
The chance is slim. It seems Apple is neglecting MLMediaLibrary in favor of PHPhotoLibrary. That API, however, is not available on older OSs and far away from complete.
I don't think PHPhotoLibrary is yet at a level where we could replace MLMediaLibrary. The API does have the advantage that it can request iCloud downloads.
It is lacking in many other regards: