diff --git a/docs/book/development-guide/how-to-run.html b/docs/book/development-guide/how-to-run.html index 21053336..4ea8b47f 100644 --- a/docs/book/development-guide/how-to-run.html +++ b/docs/book/development-guide/how-to-run.html @@ -174,9 +174,10 @@ you will have to add to the SQLITE3_LIB_DIR environment variable.
Start by installing the Android Studio IDE.
-Make sure the NDK version 23.1.7779620 is installed. The Native Development Kit (NDK) is a set of tools that allows -you to use C and C++ code with Android.
-ANDROID STUDIO -> tools -> SDK manager -> SDK tools -> tick show package details -> ndk (side by side) version 23.1.7779620
+Make sure the NDK is installed. The Native Development Kit (NDK) is a set of tools that allows
+you to use C and C++ code with Android. You have to install manually the version that is used in
+./android/gradle/lib/build.gradle.
+ANDROID STUDIO -> tools -> SDK manager -> SDK tools -> tick show package details -> ndk (side by side)
Open the project within ./android/gradle and create a new virtual device with the device manager. Minimum SDK version
should be 21. This was tested on a x86_64 emulator. Finally, run the demo configuration. It should open your virtual device and
diff --git a/docs/book/print.html b/docs/book/print.html
index 581eac88..b72978c6 100644
--- a/docs/book/print.html
+++ b/docs/book/print.html
@@ -231,9 +231,10 @@ you will have to add to the SQLITE3_LIB_DIR environment variable.
Android
Start by installing the
Android Studio IDE.
-Make sure the NDK version 23.1.7779620 is installed. The Native Development Kit (NDK) is a set of tools that allows
-you to use C and C++ code with Android.
-ANDROID STUDIO -> tools -> SDK manager -> SDK tools -> tick show package details -> ndk (side by side) version 23.1.7779620
+Make sure the NDK is installed. The Native Development Kit (NDK) is a set of tools that allows
+you to use C and C++ code with Android. You have to install manually the version that is used in
+./android/gradle/lib/build.gradle.
+ANDROID STUDIO -> tools -> SDK manager -> SDK tools -> tick show package details -> ndk (side by side)
Open the project within ./android/gradle and create a new virtual device with the device manager. Minimum SDK version
should be 21. This was tested on a x86_64 emulator. Finally, run the demo configuration. It should open your virtual device and
diff --git a/docs/book/searchindex.js b/docs/book/searchindex.js
index 56635323..9bda9505 100644
--- a/docs/book/searchindex.js
+++ b/docs/book/searchindex.js
@@ -1 +1 @@
-Object.assign(window.search, {"doc_urls":["introduction.html#introduction","introduction.html#name","supported-platforms.html#supported-platforms","supported-platforms.html#short-term-obstacles","supported-platforms.html#long-term-goals","developer-log.html#developer-log","user-guide/index.html#user-guide","development-guide/index.html#development-guide","development-guide/how-to-run.html#running-maplibre-rs-demos-on-various-platforms","development-guide/how-to-run.html#maplibre-demo","development-guide/how-to-run.html#linuxmacos","development-guide/how-to-run.html#windows","development-guide/how-to-run.html#android","development-guide/how-to-run.html#apple","development-guide/how-to-run.html#ios","development-guide/how-to-run.html#macos","development-guide/how-to-run.html#web-webgl-webgpu","development-guide/building-libraries.html#building-libraries","development-guide/debugging.html#debugging","development-guide/debugging.html#gpu-debugging","development-guide/debugging.html#frame-profiling","development-documents/index.html#development-documents","development-documents/architecture.html#architecture","development-documents/architecture.html#rendering-architecture","development-documents/design.html#design","development-documents/design.html#domain-model","development-documents/design.html#data-model","development-documents/design.html#crate-and-project-structure","development-documents/caching.html#caching","development-documents/stencil-masking.html#stencil-masking","development-documents/font-rendering.html#font-rendering","development-documents/font-rendering.html#approaches","development-documents/font-rendering.html#tessellate-fonts","development-documents/font-rendering.html#sdf-font-rendering","development-documents/font-rendering.html#gpu-text-rendering-from-bezier-curves","development-documents/font-rendering.html#draw-text-using-a-web-canvas","development-documents/font-rendering.html#other-approaches","development-documents/library-packaging.html#library-packaging","development-documents/library-packaging/apple.html#apple","development-documents/library-packaging/apple.html#xcode-project-description","development-documents/library-packaging/apple.html#library-entry","development-documents/library-packaging/apple.html#framework","development-documents/library-packaging/apple.html#cargo-build-phase","development-documents/library-packaging/apple.html#build-settings","development-documents/library-packaging/apple.html#xcframework-packaging","development-documents/library-packaging/apple.html#single-uiapplication","development-documents/library-packaging/apple.html#example-app","development-documents/library-packaging/apple.html#info-plist-for-applications","development-documents/library-packaging/apple.html#files--assets","development-documents/library-packaging/apple.html#macos-entitlements","development-documents/library-packaging/android.html#android","development-documents/library-packaging/android.html#gradle-project-setup","development-documents/library-packaging/android.html#jni","development-documents/library-packaging/android.html#single-nativeactivity","development-documents/library-packaging/web.html#web","development-documents/library-packaging/web.html#required-formats","development-documents/library-packaging/web.html#esm","development-documents/library-packaging/web.html#iife-immediately-invoked-function-expression","development-documents/library-packaging/web.html#umd","development-documents/library-packaging/web.html#cjscommonjs","development-documents/library-packaging/web.html#wasm-pack-output","development-documents/library-packaging/web.html#required-features","development-documents/library-packaging/web.html#bundler-feature-comparison","development-documents/library-packaging/web.html#esbuild","development-documents/library-packaging/web.html#babel--typescript","development-documents/library-packaging/web.html#webpack","development-documents/library-packaging/web.html#parcel","development-documents/library-packaging/web.html#rollup","appendix/index.html#appendix","appendix/index.html#goals","appendix/index.html#next-major-goals","appendix/index.html#intermediate-goals","appendix/index.html#future-goals","appendix/index.html#future-ideas","appendix/index.html#challenges","appendix/index.html#create-paths-for-tessellating-streets","appendix/link-collection.html#related-resources","appendix/link-collection.html#talks","appendix/link-collection.html#related-projects","appendix/link-collection.html#gis","appendix/link-collection.html#webassembly-and-webworkers","appendix/link-collection.html#rendering","appendix/link-collection.html#maths","appendix/link-collection.html#font-rendering","appendix/link-collection.html#tessellation","appendix/link-collection.html#specifications","appendix/link-collection.html#render-graphs","appendix/link-collection.html#animation"],"index":{"documentStore":{"docInfo":{"0":{"body":7,"breadcrumbs":2,"title":1},"1":{"body":8,"breadcrumbs":2,"title":1},"10":{"body":16,"breadcrumbs":5,"title":1},"11":{"body":75,"breadcrumbs":5,"title":1},"12":{"body":127,"breadcrumbs":5,"title":1},"13":{"body":22,"breadcrumbs":5,"title":1},"14":{"body":26,"breadcrumbs":5,"title":1},"15":{"body":55,"breadcrumbs":5,"title":1},"16":{"body":35,"breadcrumbs":7,"title":3},"17":{"body":1,"breadcrumbs":6,"title":2},"18":{"body":2,"breadcrumbs":4,"title":1},"19":{"body":11,"breadcrumbs":5,"title":2},"2":{"body":21,"breadcrumbs":4,"title":2},"20":{"body":2,"breadcrumbs":5,"title":2},"21":{"body":0,"breadcrumbs":4,"title":2},"22":{"body":0,"breadcrumbs":4,"title":1},"23":{"body":48,"breadcrumbs":5,"title":2},"24":{"body":0,"breadcrumbs":4,"title":1},"25":{"body":0,"breadcrumbs":5,"title":2},"26":{"body":0,"breadcrumbs":5,"title":2},"27":{"body":0,"breadcrumbs":6,"title":3},"28":{"body":64,"breadcrumbs":4,"title":1},"29":{"body":10,"breadcrumbs":6,"title":2},"3":{"body":47,"breadcrumbs":5,"title":3},"30":{"body":56,"breadcrumbs":6,"title":2},"31":{"body":0,"breadcrumbs":5,"title":1},"32":{"body":8,"breadcrumbs":6,"title":2},"33":{"body":15,"breadcrumbs":7,"title":3},"34":{"body":19,"breadcrumbs":9,"title":5},"35":{"body":10,"breadcrumbs":9,"title":5},"36":{"body":7,"breadcrumbs":5,"title":1},"37":{"body":0,"breadcrumbs":6,"title":2},"38":{"body":41,"breadcrumbs":6,"title":1},"39":{"body":0,"breadcrumbs":8,"title":3},"4":{"body":81,"breadcrumbs":5,"title":3},"40":{"body":42,"breadcrumbs":7,"title":2},"41":{"body":183,"breadcrumbs":6,"title":1},"42":{"body":311,"breadcrumbs":8,"title":3},"43":{"body":530,"breadcrumbs":7,"title":2},"44":{"body":68,"breadcrumbs":7,"title":2},"45":{"body":13,"breadcrumbs":7,"title":2},"46":{"body":8,"breadcrumbs":7,"title":2},"47":{"body":151,"breadcrumbs":8,"title":3},"48":{"body":415,"breadcrumbs":7,"title":2},"49":{"body":51,"breadcrumbs":7,"title":2},"5":{"body":6,"breadcrumbs":4,"title":2},"50":{"body":0,"breadcrumbs":6,"title":1},"51":{"body":18,"breadcrumbs":8,"title":3},"52":{"body":15,"breadcrumbs":6,"title":1},"53":{"body":21,"breadcrumbs":7,"title":2},"54":{"body":9,"breadcrumbs":6,"title":1},"55":{"body":0,"breadcrumbs":7,"title":2},"56":{"body":34,"breadcrumbs":6,"title":1},"57":{"body":54,"breadcrumbs":10,"title":5},"58":{"body":25,"breadcrumbs":6,"title":1},"59":{"body":61,"breadcrumbs":6,"title":1},"6":{"body":0,"breadcrumbs":4,"title":2},"60":{"body":35,"breadcrumbs":8,"title":3},"61":{"body":44,"breadcrumbs":7,"title":2},"62":{"body":65,"breadcrumbs":8,"title":3},"63":{"body":46,"breadcrumbs":6,"title":1},"64":{"body":38,"breadcrumbs":7,"title":2},"65":{"body":269,"breadcrumbs":6,"title":1},"66":{"body":107,"breadcrumbs":6,"title":1},"67":{"body":1,"breadcrumbs":6,"title":1},"68":{"body":0,"breadcrumbs":2,"title":1},"69":{"body":0,"breadcrumbs":2,"title":1},"7":{"body":0,"breadcrumbs":4,"title":2},"70":{"body":57,"breadcrumbs":4,"title":3},"71":{"body":8,"breadcrumbs":3,"title":2},"72":{"body":23,"breadcrumbs":3,"title":2},"73":{"body":16,"breadcrumbs":3,"title":2},"74":{"body":14,"breadcrumbs":2,"title":1},"75":{"body":23,"breadcrumbs":5,"title":4},"76":{"body":0,"breadcrumbs":5,"title":2},"77":{"body":5,"breadcrumbs":4,"title":1},"78":{"body":9,"breadcrumbs":5,"title":2},"79":{"body":23,"breadcrumbs":4,"title":1},"8":{"body":86,"breadcrumbs":10,"title":6},"80":{"body":44,"breadcrumbs":5,"title":2},"81":{"body":29,"breadcrumbs":4,"title":1},"82":{"body":6,"breadcrumbs":4,"title":1},"83":{"body":27,"breadcrumbs":5,"title":2},"84":{"body":5,"breadcrumbs":4,"title":1},"85":{"body":1,"breadcrumbs":4,"title":1},"86":{"body":19,"breadcrumbs":5,"title":2},"87":{"body":2,"breadcrumbs":4,"title":1},"9":{"body":0,"breadcrumbs":6,"title":2}},"docs":{"0":{"body":"maplibre-rs is a portable and performant vector maps renderer.","breadcrumbs":"Introduction » Introduction","id":"0","title":"Introduction"},"1":{"body":"The name of the library is \"maplibre-rs\". The camel-case version of it is \"MapLibreRs\".","breadcrumbs":"Introduction » Name","id":"1","title":"Name"},"10":{"body":"The build for desktop is very simple, you just have to run the following command from the root of the maplibre-rs project: cargo run -p maplibre-demo","breadcrumbs":"Development Guide » How to Run Demos » Linux/MacOS","id":"10","title":"Linux/MacOS"},"11":{"body":"Windows has two additional prerequisites to be able to run. You will need CMake, Visual Studio C++ build tools and the sqlite3 library. Install CMake and add it to your path environment variables. For the C++ build tools, download the Visual Studio 2022 Build tools from the Microsoft website. After the download, while installing the Build tools, make sure that you select the C++ build tools . To install sqlite3 you need to build the sqlite3.lib manually with the following steps . This will generate a .lib file that you will have to add to the SQLITE3_LIB_DIR environment variable. Restart your shell to make sure you are using up-to-date environment variables. Finally, the command below should execute successfully: cargo run -p maplibre-demo","breadcrumbs":"Development Guide » How to Run Demos » Windows","id":"11","title":"Windows"},"12":{"body":"Start by installing the Android Studio IDE . Make sure the NDK version 23.1.7779620 is installed. The Native Development Kit (NDK) is a set of tools that allows you to use C and C++ code with Android. ANDROID STUDIO -> tools -> SDK manager -> SDK tools -> tick show package details -> ndk (side by side) version 23.1.7779620 Open the project within ./android/gradle and create a new virtual device with the device manager. Minimum SDK version should be 21. This was tested on a x86_64 emulator. Finally, run the demo configuration. It should open your virtual device and run the maplibre-rs Android demo on it. Alternatively you can also run it on your own Android device. Note: If you are building for a x86 Android device, you probably need to install the following target using rustup with the following command rustup target add i686-linux-android. Note: Android is configured to support OpenGL ES 3.1 (This API specification is supported by Android 5.0 (API level 21) and higher). Your Android device is required to support OpenGL ES 3.1 at least. There are some issues here and here that discuss configuration of Android Studio for OpenGL ES 3.1 support in emulators.","breadcrumbs":"Development Guide » How to Run Demos » Android","id":"12","title":"Android"},"13":{"body":"Apple builds rely on the XCode IDE . Start by installing XCode and open the project within ./apple/xcode. Cargo is used in to build the maplibre library in the build phases of the XCode project configuration.","breadcrumbs":"Development Guide » How to Run Demos » Apple","id":"13","title":"Apple"},"14":{"body":"You can use XCode to run on a iOS Simulator or a real device. Install a simulator in XCode. Version 9 is the minimum version supported theoretically. Select the scheme called example (iOS) and click on run. This will start the iOS application.","breadcrumbs":"Development Guide » How to Run Demos » iOS","id":"14","title":"iOS"},"15":{"body":"As you might have seen in the maplibre-demo section, you can build Unix executables directly with Cargo. In order to build a proper MacOS application (in OSX terminology) you have to use the ./apple/xcode project. Open the project from the folder ./apple/xcode with XCode. Select the scheme called example (macOS) and click on run. This will start the MacOS application. The minimum target OSX version for the MacOS build is defined inside Build settings -> Deployment -> MacOS deployment target . If you are using a lower version of OSX, you will not be able to run the application on your computer.","breadcrumbs":"Development Guide » How to Run Demos » MacOS","id":"15","title":"MacOS"},"16":{"body":"If you have a browser which already supports a recent version of the WebGPU specification then you can start a development server using the following commands. cd web\nnpm run start If you want to run maplibre-rs with WebGL which is supported on every major browser, then you have to use the following command. just web-lib esbuild\njust web-demo start","breadcrumbs":"Development Guide » How to Run Demos » Web (WebGL, WebGPU)","id":"16","title":"Web (WebGL, WebGPU)"},"17":{"body":"TODO","breadcrumbs":"Development Guide » Building Libraries » Building Libraries","id":"17","title":"Building Libraries"},"18":{"body":"log crate","breadcrumbs":"Development Guide » Debugging » Debugging","id":"18","title":"Debugging"},"19":{"body":"For WebGL there is SpectorJS is enabled by default right now. For debugging on a desktop environment you can use RenderDoc .","breadcrumbs":"Development Guide » Debugging » GPU Debugging","id":"19","title":"GPU Debugging"},"2":{"body":"For development the following platforms are recommended: Linux X11/Wayland MacOS Latest Firefox Nightly/Chrome Canary with WebGPU (Because WebGPU is a living spec, sometimes a bleeding-edge browser release is required)","breadcrumbs":"Supported Platforms » Supported Platforms","id":"2","title":"Supported Platforms"},"20":{"body":"tracing crate","breadcrumbs":"Development Guide » Debugging » Frame Profiling","id":"20","title":"Frame Profiling"},"21":{"body":"","breadcrumbs":"Development Documents » Development Documents","id":"21","title":"Development Documents"},"22":{"body":"","breadcrumbs":"Development Documents » Architecture » Architecture","id":"22","title":"Architecture"},"23":{"body":"The big picture of wgpu is as follows: A simplified version is shown below: Notes: wgpu is able to create an interface through which we can reach any device with a GPU. Notes: The ability to use shared memory or the atomic instruction set of WASM comes by enabling compilation features. threads support here does not introduce threads like we know them from Linux. It introduces support for atomics like specified in a working draft to WebAssembly. Threads are simulated using WebWorkers by the browser.","breadcrumbs":"Development Documents » Architecture » Rendering Architecture","id":"23","title":"Rendering Architecture"},"24":{"body":"","breadcrumbs":"Development Documents » Design » Design","id":"24","title":"Design"},"25":{"body":"","breadcrumbs":"Development Documents » Design » Domain Model","id":"25","title":"Domain Model"},"26":{"body":"","breadcrumbs":"Development Documents » Design » Data Model","id":"26","title":"Data Model"},"27":{"body":"","breadcrumbs":"Development Documents » Design » Crate and Project Structure","id":"27","title":"Crate and Project Structure"},"28":{"body":"The caching for maplibre-rs is handled on the networking layer. This means that data which is fetched over slow IO is cached in the format of the network requests. The maplibre-rs library is not introducing a separate serialization format for caching. Instead, caching functionality of HTTP client libraries of the web platform are used. This has the advantage that we can honor HTTP headers which configure caching. This is very important for fetched tiles, as they can have an expiry date. On the web the browser is automatically caching raw tiles. On Linux, MacOs, iOS and Android we are utilizing reqwest-middleware-cache , which writes raw network requests to disk.","breadcrumbs":"Development Documents » Caching » Caching","id":"28","title":"Caching"},"29":{"body":"The following diagram shows a method which has been used in the beginning of maplibre-rs. It is not used currently.","breadcrumbs":"Development Documents » Stencil Masking » Stencil Masking","id":"29","title":"Stencil Masking"},"3":{"body":"Platform Obstacles Linux X11 Linux Wayland Windows MacOS Android * Unable to get window size before resume iOS * Touches are crashing the app on real devices * Instanced indices drawing is not supported * Drawing zero-length indices is prohibited Firefox * Shared Memory is currently not working because it a parallel web worker corrupts memory Chrome Safari Mobile Firefox Mobile Chrome Mobile Safari","breadcrumbs":"Supported Platforms » Short-term Obstacles","id":"3","title":"Short-term Obstacles"},"30":{"body":"There exists no universally perfect solution to font rendering. Depending on the runtime environment a method needs to be chosen. This StackOverflow post outlines some state-of-the-art methods. Some more approaches are described here . From my perspective the following approaches could work potentially: Tessellate Fonts SDF Font Rendering GPU Text Rendering directly from Bezier Curves Draw text using a Web Canvas and load them to GPU There is a thesis which summarizes some methods here . A link collection about font related projects can be viewed here .","breadcrumbs":"Development Documents » Font Rendering » Font Rendering","id":"30","title":"Font Rendering"},"31":{"body":"","breadcrumbs":"Development Documents » Font Rendering » Approaches","id":"31","title":"Approaches"},"32":{"body":"There is ttf2mesh which generates meshes. I was already able to generate about 1k glyphs with ~40FPS.","breadcrumbs":"Development Documents » Font Rendering » Tessellate Fonts","id":"32","title":"Tessellate Fonts"},"33":{"body":"There is a blogpost by Mapbox here . Some more implementation documents are available here . A good foundation for SDF fonts was created by Chlumsky with msdfgen .","breadcrumbs":"Development Documents » Font Rendering » SDF Font Rendering","id":"33","title":"SDF Font Rendering"},"34":{"body":"The solutions exist: By Will Dobbie with an implementation here Slug Library which is patented and probably therefore not usable Here is the whitepaper of the Slug library. There is also a poster about it. There also exists an open implementation .","breadcrumbs":"Development Documents » Font Rendering » GPU Text Rendering from Bezier Curves","id":"34","title":"GPU Text Rendering from Bezier Curves"},"35":{"body":"This approach has the downside that we can not dynamically scale rendered fonts according to the current zoom level.","breadcrumbs":"Development Documents » Font Rendering » Draw text using a Web Canvas","id":"35","title":"Draw text using a Web Canvas"},"36":{"body":"16x AA font rendering using coverage masks","breadcrumbs":"Development Documents » Font Rendering » Other Approaches","id":"36","title":"Other Approaches"},"37":{"body":"","breadcrumbs":"Development Documents » Library Packaging » Library Packaging","id":"37","title":"Library Packaging"},"38":{"body":"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.","breadcrumbs":"Development Documents » Library Packaging » Apple » Apple","id":"38","title":"Apple"},"39":{"body":"","breadcrumbs":"Development Documents » Library Packaging » Apple » XCode Project description","id":"39","title":"XCode Project description"},"4":{"body":"WebGPU is not enabled by default for all platforms. WebGPU Status: Firefox Chrome WebKit Platform Linux & Android Graphics API Note Linux X11 ✅ Vulkan Linux Wayland ✅ Vulkan Windows ❓ ❓ MacOS ✅ ❓ Android ✅ Vulkan/OpenGL ES/Angle Not tested, but should work on all devices if Angle is used. Vulkan is not yet supported widely. iOS ✅ Metal Not tested. Firefox ✅ WebGL/WebGPU Chrome ✅ WebGL/WebGPU WebGPU is significantly faster because WASM output is smaller. Safari 🛠️ WebGL/WebGPU Safari does not yet support Shared Array Buffer Mobile Firefox 🆗 WebGL/WebGPU Mobile Chrome 🆗 WebGL WebGPU is not implemented. Mobile Safari 🛠️ WebGL WebGPU is not implemented. Safari does not yet support Shared Array Buffer ✅ = First Class Support — 🆗= Best Effort Support — 🛠️ = Unsupported, but support in progress","breadcrumbs":"Supported Platforms » Long-term Goals","id":"4","title":"Long-term Goals"},"40":{"body":"xcode/maplibre-rs/maplibre.swift ADDED Viewed @@ -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.","breadcrumbs":"Development Documents » Library Packaging » Apple » Library Entry","id":"40","title":"Library Entry"},"41":{"body":"{diff/maplibre-rs → xcode}/maplibre-rs.xcodeproj/project.pbxproj RENAMED Viewed 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;\n}; 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.","breadcrumbs":"Development Documents » Library Packaging » Apple » Framework","id":"41","title":"Framework"},"42":{"body":"{diff/maplibre-rs → xcode}/maplibre-rs.xcodeproj/project.pbxproj RENAMED Viewed 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\"\nvendor=\"apple\"\nos_type=\"unknown\"\nenvironment_type=\"\" mode=\"\" echo \"ARCH: $ARCHS\" if [[ $CONFIGURATION == \"Release\" ]]\nthen mode=\"--release\"\nfi if [[ $ARCHS == \"x86_64\" ]]\nthen arch=\"x86_64\"\nelif [[ $ARCHS == \"arm64\" ]]\nthen arch=\"aarch64\"\nfi if [[ $SDK_NAME == *\"iphoneos\"* ]]\nthen os_type=\"ios\"\nelif [[ $SDK_NAME == *\"macos\"* ]]\nthen os_type=\"darwin\"\nelif [[ $SDK_NAME == *\"iphonesimulator\"* ]]\nthen os_type=\"ios\" if [[ $ARCHS == \"arm64\" ]] then environment_type=\"sim\" fi\nfi triplet=\"$arch-$vendor-$os_type\" if [ -n \"$environment_type\" ]\nthen triplet=\"$triplet-$environment_type\"\nfi echo \"Mode: $mode\"\necho \"Triplet: $triplet\"\necho \"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\"","breadcrumbs":"Development Documents » Library Packaging » Apple » Cargo Build Phase","id":"42","title":"Cargo Build Phase"},"43":{"body":"{diff/maplibre-rs → xcode}/maplibre-rs.xcodeproj/project.pbxproj RENAMED Viewed 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.","breadcrumbs":"Development Documents » Library Packaging » Apple » Build Settings","id":"43","title":"Build Settings"},"44":{"body":"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: Create a fat binary using lipo -create binA binB -output binfat Copy for example the arm64 framework and add the .swiftmodule definitions from the x86_64 framework","breadcrumbs":"Development Documents » Library Packaging » Apple » xcframework packaging","id":"44","title":"xcframework packaging"},"45":{"body":"Right now winit only allows the usage of a UIApplication. This means the application needs to run in fullscreen. Tracking Issue","breadcrumbs":"Development Documents » Library Packaging » Apple » Single UIApplication","id":"45","title":"Single UIApplication"},"46":{"body":"The following settings are important for the example application within the XCode project.","breadcrumbs":"Development Documents » Library Packaging » Apple » Example App","id":"46","title":"Example App"},"47":{"body":"{diff/maplibre-rs → xcode}/maplibre-rs.xcodeproj/project.pbxproj RENAMED Viewed 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.","breadcrumbs":"Development Documents » Library Packaging » Apple » Info Plist for Applications","id":"47","title":"Info Plist for Applications"},"48":{"body":"{diff/maplibre-rs → xcode}/maplibre-rs.xcodeproj/project.pbxproj RENAMED Viewed @@ -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.","breadcrumbs":"Development Documents » Library Packaging » Apple » Files & Assets","id":"48","title":"Files & Assets"},"49":{"body":"xcode/macOS/macOS.entitlements ADDED Viewed @@ -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","breadcrumbs":"Development Documents » Library Packaging » Apple » MacOS Entitlements","id":"49","title":"MacOS Entitlements"},"5":{"body":"I'm regularly releasing blog posts on my blog .","breadcrumbs":"Developer Log » Developer Log","id":"5","title":"Developer Log"},"50":{"body":"","breadcrumbs":"Development Documents » Library Packaging » Android » Android","id":"50","title":"Android"},"51":{"body":"In order to package an Android .aar archive we use the rust-android-gradle . Except some customisations for the latest NDK toolchain release everything worked flawlessly.","breadcrumbs":"Development Documents » Library Packaging » Android » Gradle Project Setup","id":"51","title":"Gradle Project Setup"},"52":{"body":"There is no way right now to automatically generate JNI stubs for Rust. A manual example is available in the android crate of maplibre-rs.","breadcrumbs":"Development Documents » Library Packaging » Android » JNI","id":"52","title":"JNI"},"53":{"body":"Right now winit only allows the usage of a NativeActivity. This means the application needs to run in fullscreen. This native activity is referenced in the ´AndroidManifest.xml` by defining the name of the shared library. Tracking Issue","breadcrumbs":"Development Documents » Library Packaging » Android » Single NativeActivity","id":"53","title":"Single NativeActivity"},"54":{"body":"This document describes issues and challenges when packaging maplibre-rs as a npm package.","breadcrumbs":"Development Documents » Library Packaging » Web » Web","id":"54","title":"Web"},"55":{"body":"","breadcrumbs":"Development Documents » Library Packaging » Web » Required Formats","id":"55","title":"Required Formats"},"56":{"body":"The ESM module format is the standard nowadays which should be followed. If a JS bundler encounters an ESM module it can resolve WebAssembly files or WebWorkers dynamically. The following syntax is used to resolve referenced WebWorkers: new Worker(new URL(\"./pool.worker.ts\", import.meta.url), { type: 'module'\n}); Similarly, the following works: new URL('index_bg.wasm', import.meta.url);","breadcrumbs":"Development Documents » Library Packaging » Web » ESM","id":"56","title":"ESM"},"57":{"body":"This format is used when including maplibre-rs in a