Apple

On Apple maplibre-rs is packaged as:

  • Multiple .xcarchive packages which include a framework. Each for a different architecture and platform.
  • A single .xcframework package which contains multiple frameworks of different architectures and platforms.
  • A swift package which just references the .xcframework package and makes distributing easier.

The following diffs are extracted from this diff. They should serve as documentation for the XCode project. This is required because XCode is a mess.

XCode Project description

Library Entry

xcode/maplibre-rs/maplibre.swift ADDED
@@ -0,0 +1,5 @@
1
+ public class MapLibre {
2
+ public static func start() {
3
+ maplibre_apple_main();
4
+ }
5
+ }

The swift code above is the main entry for the Swift API. From this entry file we can expose more API of maplibre-rs. Any C functions which are referenced in the XCode framework's header are available automatically in Swift.

Framework

{diff/maplibre-rs → xcode}/maplibre-rs.xcodeproj/project.pbxproj RENAMED
29
33
 
30
34
  /* Begin PBXFrameworksBuildPhase section */
31
- 0BE452E128132EA6003BD2A5 /* Frameworks */ = {
35
+ 0B85D5682812903700906D21 /* Frameworks */ = {
32
36
  isa = PBXFrameworksBuildPhase;
33
37
  buildActionMask = 2147483647;
34
38
  files = (
39
+ 0B85D5A42812991100906D21 /* libmaplibre_apple.a in Frameworks */,
35
40
  );
36
41
  runOnlyForDeploymentPostprocessing = 0;
37
42
  };
38
- 0BE452F128132EB5003BD2A5 /* Frameworks */ = {
43
+ 0B85D57B281290F800906D21 /* Frameworks */ = {
39
44
  isa = PBXFrameworksBuildPhase;
40
45
  buildActionMask = 2147483647;
41
46
  files = (
47
+ 0B85D596281291A400906D21 /* maplibre_rs.framework in Frameworks */,
42
48
  );
43
49
  runOnlyForDeploymentPostprocessing = 0;
44
50
  };
45
- 0BE452F628132EB5003BD2A5 /* Frameworks */ = {
51
+ 0B85D580281290F800906D21 /* Frameworks */ = {
46
52
  isa = PBXFrameworksBuildPhase;
47
53
  buildActionMask = 2147483647;
48
54
  files = (
55
+ 0B85D599281291A700906D21 /* maplibre_rs.framework in Frameworks */,
49
56
  );
50
57
  runOnlyForDeploymentPostprocessing = 0;
51
58
  };
59
  /* End PBXFrameworksBuildPhase section */

The framework needs to link against the static library libmaplibre_apple.a, which has been generated by Cargo. In order to allow XCode to dynamically select the library based on the Library Search Path (Build Settings) one needs to add a relative file to XCode. The entry in the project.pbxproj should look like that:

B085D5A32812987B00906D21 /* libmaplibre_apple.a */ = {
    isa = PBXFileReference;
    lastKnownFileType = archive.ar;
    path = libmaplibre_apple.a;
    sourceTree = SOURCE_ROOT;
};

Note the path = libmaplibre_apple.a. This path does not link to a concrete file, but to a file which can be found during building.

A file can be added to the frameworks and library link phase in XCode.

Cargo Build Phase

{diff/maplibre-rs → xcode}/maplibre-rs.xcodeproj/project.pbxproj RENAMED
114
131
  /* Begin PBXNativeTarget section */
115
- 0BE452E328132EA6003BD2A5 /* maplibre-rs */ = {
132
+ 0B85D56A2812903700906D21 /* maplibre-rs */ = {
116
133
  isa = PBXNativeTarget;
117
- buildConfigurationList = 0BE452E928132EA6003BD2A5 /* Build configuration list for PBXNativeTarget "maplibre-rs" */;
134
+ buildConfigurationList = 0B85D5702812903700906D21 /* Build configuration list for PBXNativeTarget "maplibre-rs" */;
118
135
  buildPhases = (
119
- 0BE452DF28132EA6003BD2A5 /* Headers */,
120
- 0BE452E028132EA6003BD2A5 /* Sources */,
121
- 0BE452E128132EA6003BD2A5 /* Frameworks */,
122
- 0BE452E228132EA6003BD2A5 /* Resources */,
136
+ 0B85D5662812903700906D21 /* Headers */,
137
+ 0B85D5672812903700906D21 /* Sources */,
138
+ 0B85D5682812903700906D21 /* Frameworks */,
139
+ 0B85D5692812903700906D21 /* Resources */,
140
+ 0BE452D72812EFC1003BD2A5 /* Cargo Build */,
229
248
  );
230
249
  runOnlyForDeploymentPostprocessing = 0;
231
250
  };
232
251
  /* End PBXResourcesBuildPhase section */
233
252
 
253
+ /* Begin PBXShellScriptBuildPhase section */
254
+ 0BE452D72812EFC1003BD2A5 /* Cargo Build */ = {
255
+ isa = PBXShellScriptBuildPhase;
256
+ buildActionMask = 2147483647;
257
+ files = (
258
+ );
259
+ inputFileListPaths = (
260
+ );
261
+ inputPaths = (
262
+ );
263
+ name = "Cargo Build";
264
+ outputFileListPaths = (
265
+ );
266
+ outputPaths = (
267
+ );
268
+ runOnlyForDeploymentPostprocessing = 0;
269
+ shellPath = /bin/bash;
270
+ shellScript = ". \"$HOME/.cargo/env\"\n\narch=\"unknown\"\nvendor=\"apple\"\nos_type=\"unknown\"\nenvironment_type=\"\"\n\nmode=\"\"\n\necho \"ARCH: $ARCHS\"\n\nif [[ $CONFIGURATION == \"Release\" ]]\nthen\n mode=\"--release\"\nfi\n\nif [[ $ARCHS == \"x86_64\" ]]\nthen\n arch=\"x86_64\"\nelif [[ $ARCHS == \"arm64\" ]]\nthen\n arch=\"aarch64\"\nfi\n\nif [[ $SDK_NAME == *\"iphoneos\"* ]]\nthen\n os_type=\"ios\"\nelif [[ $SDK_NAME == *\"macos\"* ]]\nthen\n os_type=\"darwin\"\nelif [[ $SDK_NAME == *\"iphonesimulator\"* ]]\nthen\n os_type=\"ios\"\n environment_type=\"sim\"\nfi\n\n\ntriplet=\"$arch-$vendor-$os_type\"\n\nif [ -n \"$environment_type\" ]\nthen\n triplet=\"$triplet-$environment_type\"\nfi\n\necho \"$mode\"\necho \"$triplet\"\n\nenv -i zsh -c \"cargo build -p maplibre-apple $mode --target $triplet --lib\"\n\n";
271
+ };
272
+ /* End PBXShellScriptBuildPhase section */

In order to trigger Cargo builds when starting a XCode build we include a Cargo Build script. This build script needs to run before the linking phase (drag and drop it to the top).

The following build script builds based on XCode environment variables the correct static library. We depend on the $ARCHS environment variable, as the others seem unreliable. Note that this can include multiple architectures, unless the build setting ONLY_ACTIVE_ARCH is set to YES.

arch="unknown"
vendor="apple"
os_type="unknown"
environment_type=""

mode=""

echo "ARCH: $ARCHS"

if [[ $CONFIGURATION == "Release" ]]
then
    mode="--release"
fi

if [[ $ARCHS == "x86_64" ]]
then
    arch="x86_64"
elif [[ $ARCHS == "arm64" ]]
then
    arch="aarch64"
fi

if [[ $SDK_NAME == *"iphoneos"* ]]
then
    os_type="ios"
elif [[ $SDK_NAME == *"macos"* ]]
then
    os_type="darwin"
elif [[ $SDK_NAME == *"iphonesimulator"* ]]
then
    os_type="ios"
    if [[ $ARCHS == "arm64" ]]
    then
        environment_type="sim"
    fi
fi


triplet="$arch-$vendor-$os_type"

if [ -n "$environment_type" ]
then
    triplet="$triplet-$environment_type"
fi

echo "Mode: $mode"
echo "Triplet: $triplet"
echo "Shell: $SHELL"

cmd="export HOME=$HOME && . $HOME/.cargo/env && cargo build -p apple $mode --target $triplet --lib"

echo "Command: $cmd"

env -i /bin/bash -c "$cmd"

Build Settings

{diff/maplibre-rs → xcode}/maplibre-rs.xcodeproj/project.pbxproj RENAMED
260
299
  /* End PBXSourcesBuildPhase section */
275
- 0BE452EA28132EA6003BD2A5 /* Debug */ = {
314
+ 0B85D5712812903700906D21 /* Debug */ = {
276
315
  isa = XCBuildConfiguration;
277
316
  buildSettings = {
317
+ ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
278
318
  ALWAYS_SEARCH_USER_PATHS = NO;
319
+ BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
279
320
  CLANG_ANALYZER_NONNULL = YES;
280
321
  CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
281
322
  CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
@@ -304,11 +345,13 @@
304
345
  CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
305
346
  CLANG_WARN_UNREACHABLE_CODE = YES;
306
347
  CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
307
- CODE_SIGN_STYLE = Automatic;
348
+ CODE_SIGN_IDENTITY = "Apple Development";
349
+ CODE_SIGN_STYLE = Manual;
308
350
  COPY_PHASE_STRIP = NO;
309
351
  CURRENT_PROJECT_VERSION = 1;
310
352
  DEBUG_INFORMATION_FORMAT = dwarf;
311
353
  DEFINES_MODULE = YES;
354
+ DEVELOPMENT_TEAM = "";
312
355
  DYLIB_COMPATIBILITY_VERSION = 1;
313
356
  DYLIB_CURRENT_VERSION = 1;
314
357
  DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -337,14 +380,28 @@
337
380
  "@executable_path/Frameworks",
338
381
  "@loader_path/Frameworks",
339
382
  );
383
+ LIBRARY_SEARCH_PATHS = (
384
+ "$(inherited)",
385
+ "$(PROJECT_DIR)",
386
+ );
387
+ "LIBRARY_SEARCH_PATHS[sdk=iphoneos*][arch=arm64]" = "$(PROJECT_DIR)/libs/aarch64-apple-ios/debug";
388
+ "LIBRARY_SEARCH_PATHS[sdk=iphoneos*][arch=x86_64]" = "$(PROJECT_DIR)/libs/x86_64-apple-ios/debug";
389
+ "LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*][arch=arm64]" = "$(PROJECT_DIR)/libs/aarch64-apple-ios-sim/debug";
390
+ "LIBRARY_SEARCH_PATHS[sdk=macosx*][arch=arm64]" = "$(PROJECT_DIR)/libs/aarch64-apple-darwin/debug";
391
+ "LIBRARY_SEARCH_PATHS[sdk=macosx*][arch=x86_64]" = "$(PROJECT_DIR)/libs/x86_64-apple-darwin/debug";
392
+ MACH_O_TYPE = staticlib;
340
393
  MARKETING_VERSION = 1.0;
341
394
  MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
342
395
  MTL_FAST_MATH = YES;
343
396
  ONLY_ACTIVE_ARCH = YES;
344
397
  PRODUCT_BUNDLE_IDENTIFIER = "org.maplibre.maplibre-rs";
345
398
  PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
399
+ PROVISIONING_PROFILE_SPECIFIER = "";
400
+ "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "";
346
401
  SDKROOT = iphoneos;
347
- SKIP_INSTALL = YES;
402
+ SKIP_INSTALL = NO;
403
+ SUPPORTED_PLATFORMS = "watchsimulator watchos macosx iphonesimulator iphoneos driverkit appletvsimulator appletvos";
404
+ SUPPORTS_MACCATALYST = YES;
348
405
  SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
349
406
  SWIFT_EMIT_LOC_STRINGS = YES;
350
407
  SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -355,10 +412,12 @@
355
412
  };
356
413
  name = Debug;
357
414
  };
358
- 0BE452EB28132EA6003BD2A5 /* Release */ = {
415
+ 0B85D5722812903700906D21 /* Release */ = {
359
416
  isa = XCBuildConfiguration;
360
417
  buildSettings = {
418
+ ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
361
419
  ALWAYS_SEARCH_USER_PATHS = NO;
420
+ BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
362
421
  CLANG_ANALYZER_NONNULL = YES;
363
422
  CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
364
423
  CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
@@ -387,11 +446,13 @@
387
446
  CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
388
447
  CLANG_WARN_UNREACHABLE_CODE = YES;
389
448
  CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
390
- CODE_SIGN_STYLE = Automatic;
449
+ CODE_SIGN_IDENTITY = "Apple Development";
450
+ CODE_SIGN_STYLE = Manual;
391
451
  COPY_PHASE_STRIP = NO;
392
452
  CURRENT_PROJECT_VERSION = 1;
393
453
  DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
394
454
  DEFINES_MODULE = YES;
455
+ DEVELOPMENT_TEAM = "";
395
456
  DYLIB_COMPATIBILITY_VERSION = 1;
396
457
  DYLIB_CURRENT_VERSION = 1;
397
458
  DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -414,13 +475,28 @@
414
475
  "@executable_path/Frameworks",
415
476
  "@loader_path/Frameworks",
416
477
  );
478
+ LIBRARY_SEARCH_PATHS = (
479
+ "$(inherited)",
480
+ "$(PROJECT_DIR)",
481
+ );
482
+ "LIBRARY_SEARCH_PATHS[sdk=iphoneos*][arch=arm64]" = "$(PROJECT_DIR)/libs/aarch64-apple-ios/release";
483
+ "LIBRARY_SEARCH_PATHS[sdk=iphoneos*][arch=x86_64]" = "$(PROJECT_DIR)/libs/x86_64-apple-ios/release";
484
+ "LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*][arch=arm64]" = "$(PROJECT_DIR)/libs/aarch64-apple-ios-sim/release";
485
+ "LIBRARY_SEARCH_PATHS[sdk=macosx*][arch=arm64]" = "$(PROJECT_DIR)/libs/aarch64-apple-darwin/release";
486
+ "LIBRARY_SEARCH_PATHS[sdk=macosx*][arch=x86_64]" = "$(PROJECT_DIR)/libs/x86_64-apple-darwin/release";
487
+ MACH_O_TYPE = staticlib;
417
488
  MARKETING_VERSION = 1.0;
418
489
  MTL_ENABLE_DEBUG_INFO = NO;
419
490
  MTL_FAST_MATH = YES;
491
+ ONLY_ACTIVE_ARCH = YES;
420
492
  PRODUCT_BUNDLE_IDENTIFIER = "org.maplibre.maplibre-rs";
421
493
  PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
494
+ PROVISIONING_PROFILE_SPECIFIER = "";
495
+ "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "";
422
496
  SDKROOT = iphoneos;
423
- SKIP_INSTALL = YES;
497
+ SKIP_INSTALL = NO;
498
+ SUPPORTED_PLATFORMS = "watchsimulator watchos macosx iphonesimulator iphoneos driverkit appletvsimulator appletvos";
499
+ SUPPORTS_MACCATALYST = YES;
424
500
  SWIFT_COMPILATION_MODE = wholemodule;
425
501
  SWIFT_EMIT_LOC_STRINGS = YES;
426
502
  SWIFT_OPTIMIZATION_LEVEL = "-O";
@@ -432,7 +508,7 @@
432
508
  };
433
509
  name = Release;
510
  };

Explanations for the settings:

  • BUILD_LIBRARY_FOR_DISTRIBUTION: Define that this is a library (effect unknown to me)
  • CODE_SIGN_STYLE: The framework is not signed
  • DEVELOPMENT_TEAM: No development team is set
  • LIBRARY_SEARCH_PATHS[sdk=x][arch=y]: We set the path for the libmaplibre_apple.a lies
  • MACH_O_TYPE / SKIP_INSTALL: If this is not set to staticlib and NO, then the libmaplibre_apple.a binary is not included in the final framework xcarchive.
  • SUPPORTED_PLATFORMS: Explicitly says that this library works on any platform.
  • SUPPORTS_MACCATALYST: Explicitly says that this library works on Mac Catalyst.

The same settings are done for Release and Debug.

xcframework packaging

Creating a xcframework is usually quite straight forward. Just execute the following:

xargs xcodebuild -create-xcframework -framework ./a -framework ./b -output out.xcframework

Unfortunately, it is not possible to bundle some frameworks together like:

  • macOS-arm64 and macOS-x86_64

In order to package these architectures and platforms together a fat binary needs to be created using the lipo tool. This means from two frameworks we create a unified framework with a fat binary. There are two important steps:

  1. Create a fat binary using lipo -create binA binB -output binfat
  2. Copy for example the arm64 framework and add the .swiftmodule definitions from the x86_64 framework

Single UIApplication

Right now winit only allows the usage of a UIApplication. This means the application needs to run in fullscreen. Tracking Issue

Example App

The following settings are important for the example application within the XCode project.

Info Plist for Applications

{diff/maplibre-rs → xcode}/maplibre-rs.xcodeproj/project.pbxproj RENAMED
435
- 0BE4530328132EB5003BD2A5 /* Debug */ = {
511
+ 0B85D58D281290F800906D21 /* Debug */ = {
436
512
  isa = XCBuildConfiguration;
437
513
  buildSettings = {
438
514
  ALWAYS_SEARCH_USER_PATHS = NO;
@@ -489,7 +565,7 @@
489
565
  GCC_WARN_UNUSED_FUNCTION = YES;
490
566
  GCC_WARN_UNUSED_VARIABLE = YES;
491
567
  GENERATE_INFOPLIST_FILE = YES;
492
- INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
568
+ INFOPLIST_FILE = "example--iOS--Info.plist";
493
569
  INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
494
570
  INFOPLIST_KEY_UILaunchScreen_Generation = YES;
495
571
  INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
@@ -514,7 +590,7 @@
514
590
  };
515
591
  name = Debug;
516
592
  };
517
- 0BE4530428132EB5003BD2A5 /* Release */ = {
593
+ 0B85D58E281290F800906D21 /* Release */ = {
518
594
  isa = XCBuildConfiguration;
519
595
  buildSettings = {
520
596
  ALWAYS_SEARCH_USER_PATHS = NO;
@@ -565,7 +641,7 @@
565
641
  GCC_WARN_UNUSED_FUNCTION = YES;
566
642
  GCC_WARN_UNUSED_VARIABLE = YES;
567
643
  GENERATE_INFOPLIST_FILE = YES;
568
- INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
644
+ INFOPLIST_FILE = "example--iOS--Info.plist";
569
645
  INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
570
646
  INFOPLIST_KEY_UILaunchScreen_Generation = YES;
571
647
  INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
@@ -590,7 +666,7 @@
  • The INFOPLIST_KEY_UIApplicationSceneManifest_Generation needs to be unset. Else the application screen is just black.

Files & Assets

{diff/maplibre-rs → xcode}/maplibre-rs.xcodeproj/project.pbxproj RENAMED
@@ -7,93 +7,110 @@
7
7
  objects = {
8
8
 
9
9
  /* Begin PBXBuildFile section */
10
- 0BE452E828132EA6003BD2A5 /* maplibre_rs.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BE452E728132EA6003BD2A5 /* maplibre_rs.h */; settings = {ATTRIBUTES = (Public, ); }; };
11
- 0BE452FC28132EB5003BD2A5 /* exampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BE452ED28132EB5003BD2A5 /* exampleApp.swift */; };
12
- 0BE452FD28132EB5003BD2A5 /* exampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BE452ED28132EB5003BD2A5 /* exampleApp.swift */; };
13
- 0BE452FE28132EB5003BD2A5 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BE452EE28132EB5003BD2A5 /* ContentView.swift */; };
14
- 0BE452FF28132EB5003BD2A5 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BE452EE28132EB5003BD2A5 /* ContentView.swift */; };
15
- 0BE4530028132EB5003BD2A5 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0BE452EF28132EB5003BD2A5 /* Assets.xcassets */; };
16
- 0BE4530128132EB5003BD2A5 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0BE452EF28132EB5003BD2A5 /* Assets.xcassets */; };
10
+ 0B85D56F2812903700906D21 /* maplibre_rs.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B85D56E2812903700906D21 /* maplibre_rs.h */; settings = {ATTRIBUTES = (Public, ); }; };
11
+ 0B85D586281290F800906D21 /* exampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B85D577281290F800906D21 /* exampleApp.swift */; };
12
+ 0B85D587281290F800906D21 /* exampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B85D577281290F800906D21 /* exampleApp.swift */; };
13
+ 0B85D58A281290F800906D21 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0B85D579281290F800906D21 /* Assets.xcassets */; };
14
+ 0B85D58B281290F800906D21 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0B85D579281290F800906D21 /* Assets.xcassets */; };
15
+ 0B85D5952812913700906D21 /* maplibre.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B85D5942812913700906D21 /* maplibre.swift */; };
16
+ 0B85D596281291A400906D21 /* maplibre_rs.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0B85D56B2812903700906D21 /* maplibre_rs.framework */; };
17
+ 0B85D599281291A700906D21 /* maplibre_rs.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0B85D56B2812903700906D21 /* maplibre_rs.framework */; };
18
+ 0B85D5A42812991100906D21 /* libmaplibre_apple.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0B85D5A32812987B00906D21 /* libmaplibre_apple.a */; };
17
19
  /* End PBXBuildFile section */
18
20
 
19
21
  /* Begin PBXFileReference section */
20
- 0BE452E428132EA6003BD2A5 /* maplibre_rs.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = maplibre_rs.framework; sourceTree = BUILT_PRODUCTS_DIR; };
21
- 0BE452E728132EA6003BD2A5 /* maplibre_rs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = maplibre_rs.h; sourceTree = "<group>"; };
22
- 0BE452ED28132EB5003BD2A5 /* exampleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = exampleApp.swift; sourceTree = "<group>"; };
23
- 0BE452EE28132EB5003BD2A5 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
24
- 0BE452EF28132EB5003BD2A5 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
25
- 0BE452F428132EB5003BD2A5 /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example.app; sourceTree = BUILT_PRODUCTS_DIR; };
26
- 0BE452F928132EB5003BD2A5 /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example.app; sourceTree = BUILT_PRODUCTS_DIR; };
27
- 0BE452FB28132EB5003BD2A5 /* macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macOS.entitlements; sourceTree = "<group>"; };
22
+ 0B85D56B2812903700906D21 /* maplibre_rs.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = maplibre_rs.framework; sourceTree = BUILT_PRODUCTS_DIR; };
23
+ 0B85D56E2812903700906D21 /* maplibre_rs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = maplibre_rs.h; sourceTree = "<group>"; };
24
+ 0B85D577281290F800906D21 /* exampleApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = exampleApp.swift; sourceTree = "<group>"; };
25
+ 0B85D579281290F800906D21 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
26
+ 0B85D57E281290F800906D21 /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example.app; sourceTree = BUILT_PRODUCTS_DIR; };
27
+ 0B85D583281290F800906D21 /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example.app; sourceTree = BUILT_PRODUCTS_DIR; };
28
+ 0B85D585281290F800906D21 /* macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macOS.entitlements; sourceTree = "<group>"; };
29
+ 0B85D5942812913700906D21 /* maplibre.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = maplibre.swift; sourceTree = "<group>"; };
30
+ 0B85D5A32812987B00906D21 /* libmaplibre_apple.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libmaplibre_apple.a; sourceTree = SOURCE_ROOT; };
31
+ 0BE452D62812EEA8003BD2A5 /* example--iOS--Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "example--iOS--Info.plist"; sourceTree = "<group>"; };
32
  /* End PBXFileReference section */
  • The example/demo application within the XCode project references the maplibre_rs.framework. Some default files have been removed.

MacOS Entitlements

xcode/macOS/macOS.entitlements ADDED
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>com.apple.security.app-sandbox</key>
6
+ <true/>
7
+ <key>com.apple.security.files.user-selected.read-only</key>
8
+ <true/>
9
+ <key>com.apple.security.network.client</key>
10
+ <true/>
11
+ </dict>
12
+ </plist>
  • On macOS one needs to allow network access via com.apple.security.network.client