iMediaSandboxing / iMedia

The Karelia iMedia Browser, framework and application for browsing media on Mac OS X
http://www.karelia.com/imedia/
Other
18 stars 12 forks source link

Catalina compatibility #110

Open gloubibou opened 5 years ago

gloubibou commented 5 years ago

I have noticed the following issues on the latest Catalina beta:

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:

jjac commented 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.

gloubibou commented 5 years ago

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.

jjac commented 5 years ago

@gloubibou I added the missing .plist entry for the tester app and the library is back again when building non-sandboxed. Thanks!

danielpunkass commented 4 years ago

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.

danielpunkass commented 4 years ago

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.

danielpunkass commented 4 years ago

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.