Skip to content

[develop] Opening exploded archive audiobook inside App Group fails with Publication.OpeningError.unsupportedFormat in (Designed for iPad) Mac app #434

@domkm

Description

@domkm

Describe the bug

Warning: This is weird.

I am transitioning from normal local URLs created by appending path components to FileManager.default.url(for: .applicationSupportDirectory, in: .userDomainMask, appropriateFor: nil, create: false) to app group URLs created by appending path components to FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: APP_GROUP_IDENTIFIER) but found it broke some of my tests. After some investigation, I found that exploded archive audiobooks fail to open when the directory is in an app group. After some more investigation, I found that it only fails while running on a Mac ( iOS simulator and hardware device work correctly).

In other words:

  • "file:///path/to/dir/file.mp3" -> success
  • "file:///path/to/dir/"-> success
  • "file:///AppGroup/path/to/dir/file.mp3" -> success
  • "file:///AppGroup/path/to/dir/" -> iPadAppOnMacOS ? failure : success

Any idea why this might be happening? If not, I'll work on a reproducible example.

How to reproduce?

Attempt to open a directory of audio files inside an App Group from a Designed for iPad app running on MacOS

Readium version

develop 2fdfea3

OS version

MacOS 14.5

Testing device

MacOS 14.5

Environment

macOS: 14.5
platform: arm64
Xcode 15.4
Build version 15F31d

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions