mapbox/mapbox-core-maps-ios

Corrupt bundle structure in Mac Catalyst framework

Closed this issue · 2 comments

Issue description

The bundle structure of the MapboxCoreMaps framework for Mac Catalyst target is corrupt.

Seen behaviour

The current bundle structure as downloaded by the Swift package manager looks like:

$ ls -l MapboxCoreMaps.xcframework/ios-arm64_x86_64-maccatalyst/MapboxCoreMaps.framework
total 67608
drwxr-xr-x  135 wmanth      4320 Feb 28 19:03 Headers
-rwxr-xr-x    1 wmanth  34612304 Feb 28 19:06 MapboxCoreMaps
drwxr-xr-x    4 wmanth       128 Feb 28 19:03 Modules
drwxr-xr-x   79 wmanth      2528 Feb 28 19:03 PrivateHeaders
drwxr-xr-x    4 wmanth       128 Feb 28 19:05 Resources
drwxr-xr-x    4 wmanth       128 Feb 28 18:54 Versions

$ ls -l MapboxCoreMaps.xcframework/ios-arm64_x86_64-maccatalyst/MapboxCoreMaps.framework/Versions
total 0
drwxr-xr-x  7 wmanth  224 Feb 28 19:06 A
drwxr-xr-x  7 wmanth  224 Feb 28 19:06 Current

Expected behaviour

The correct bundle structure for macOS frameworks should look like:

$ ls -l MapboxCoreMaps.xcframework/ios-arm64_x86_64-maccatalyst/MapboxCoreMaps.framework
total 0
lrwxr-xr-x  1 wmanth   24 Mar  5 09:05 Headers -> Versions/Current/Headers
lrwxr-xr-x  1 wmanth   31 Mar  5 09:05 MapboxCoreMaps -> Versions/Current/MapboxCoreMaps
lrwxr-xr-x  1 wmanth   24 Mar  5 09:05 Modules -> Versions/Current/Modules
lrwxr-xr-x  1 wmanth   31 Mar  5 09:05 PrivateHeaders -> Versions/Current/PrivateHeaders
lrwxr-xr-x  1 wmanth   26 Mar  5 09:05 Resources -> Versions/Current/Resources
drwxr-xr-x  4 wmanth  128 Mar  3 20:24 Versions

$ ls -l MapboxCoreMaps.xcframework/ios-arm64_x86_64-maccatalyst/MapboxCoreMaps.framework/Versions
total 0
drwxr-xr-x  8 wmanth  256 Mar  3 20:31 A
lrwxr-xr-x  1 wmanth    1 Mar  5 09:05 Current -> A

Analysis

All bundle specific symbolic links have been resolved.
A possible root cause is that during the creation of the bundle all symbolic links are followed instead of being stored, which in case of the zip command could be prevented by the -y option.

Consequence

This leads to the situation hat codesign fails when trying to sign the app including this framework.

Thanks for a report. Internal ticket created: MAPSNAT-1881

Starting 11.6.0-beta.1 release, macCatalyst build would preserve symlinks as it should be.
Thanks for your patience.