Skip to content

Commit 1f17ad9

Browse files
committed
Merge branch 'main' into ios-observer-hooks
2 parents 4b240b9 + 299c868 commit 1f17ad9

File tree

26 files changed

+81
-598
lines changed

26 files changed

+81
-598
lines changed

.bazelignore

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
bazel-bin
1+
.git
2+
node_modules
23
bazel-out
4+
bazel-bin
35
bazel-testlogs
4-
node_modules
6+
.cache
7+
.idea
8+
.vscode
9+
.cxx

.github/changed-files.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ linux:
99
- 'vendor/**'
1010
- 'CMakeLists.txt'
1111
- 'metrics/linux-gcc8-release-style.json'
12-
- 'WORKSPACE'
12+
- 'MODULE.bazel'
1313
- 'BUILD.bazel'
1414
- '.bazelrc'
1515
- '.bazelversion'
16+
- '.bazelignore'
1617
- '!**/*.md'
1718
windows:
1819
- '.github/workflows/windows-ci.yml'
@@ -26,10 +27,6 @@ windows:
2627
- 'metrics/**'
2728
- 'vendor/**'
2829
- '.gitmodules'
29-
- 'WORKSPACE'
30-
- 'BUILD.bazel'
31-
- '.bazelrc'
32-
- '.bazelversion'
3330
- '!**/*.md'
3431
ios:
3532
- 'platform/ios/**'
@@ -46,10 +43,11 @@ ios:
4643
- 'test/**'
4744
- 'vendor/**'
4845
- '.gitmodules'
49-
- 'WORKSPACE'
46+
- 'MODULE.bazel'
5047
- 'BUILD.bazel'
5148
- '.bazelrc'
5249
- '.bazelversion'
50+
- '.bazelignore'
5351
- 'pnpm-lock.yaml'
5452
- '!**/*.md'
5553
android:

.gitignore

+2-11
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
1-
/mapbox-gl-native-android/MapLibreAndroid/mapbox-gl-native
2-
/mapbox-gl-native-android/MapLibreAndroidTestApp/mapbox-gl-native
31
/platform/android/MapLibreAndroidTestApp/src/main/res/values/developer-config.xml
42

53
/platform/android/gradle/configuration.gradle
64
/platform/android/arm64-v8a
75
/platform/android/armeabi-v7a
8-
/platform/android/MapLibreAndroid/.cxx
96
/platform/android/MapLibreAndroid/build
107
/platform/android/MapLibrePlugin/build
11-
/platform/android/MapLibreAndroidTestApp/.cxx
128
/platform/android/MapLibreAndroidTestApp/build
139
/platform/android/buildSrc/build
1410
/platform/android/x86
1511
/platform/android/x86_64
1612
/cmake-build-debug
1713
/platform/android/build
1814
/platform/android/MapLibreAndroid/src/main/assets/sdk_versions/com.mapbox.mapboxsdk
19-
/platform/ios/platform/ios/Mapbox.playground/build/
2015
/platform/windows/vendor/mesa3d/
2116
*.code-workspace
2217

@@ -35,14 +30,11 @@ compile_commands.json
3530
/platform/android/signing-key.text
3631
/platform/android/.java-version
3732
*.hprof
38-
/platform/ios/platform/ios/benchmark/assets/tiles/tiles
39-
/platform/ios/platform/ios/benchmark/assets/glyphs/Roboto Regular,Noto Sans Regular
40-
/platform/ios/platform/ios/benchmark/assets/glyphs/Roboto Medium,Noto Sans Regular
41-
/platform/ios/platform/ios/benchmark/assets/glyphs/Roboto Condensed Italic,Noto Sans Italic
42-
/platform/ios/platform/ios/benchmark/assets/glyphs/Noto Sans Regular
4333
/platform/android/key.json
4434
/platform/android/site
4535
node_modules
36+
.cxx
37+
4638
# Node binaries.
4739
/lib
4840

@@ -59,5 +51,4 @@ __generated__
5951
cache.sqlite
6052
cache.sqlite-journal
6153
out.png
62-
/test/android/app/.cxx
6354
/test/android/app/build

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repos:
1313
hooks:
1414
- id: clang-format
1515
files: '.*\.(hpp|cpp|h)'
16-
exclude: '(vendor/.*|darwin/include/mbgl/storage/reachability.h)'
16+
exclude: 'vendor/.*'
1717
- repo: https://github.com/keith/pre-commit-buildifier
1818
rev: 7.3.1
1919
hooks:

MODULE.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ bazel_dep(name = "rules_rust", version = "0.57.1")
6464
bazel_dep(name = "cxx.rs", version = "1.0.136")
6565
git_override(
6666
module_name = "cxx.rs",
67-
commit = "fb8fdc0b20ddca8df80f6638bc773dc4824a8092",
67+
commit = "94e8e46066b560fb9dc8964f047f68d066786916",
6868
remote = "https://github.com/dtolnay/cxx.git",
6969
)
7070

122 Bytes
Binary file not shown.

benchmark/android/gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

benchmark/android/gradlew

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ fi
205205
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
206206

207207
# Collect all arguments for the java command:
208-
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
208+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
209209
# and any embedded shellness will be escaped.
210210
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
211211
# treated as '${Hostname}' itself on the command line.

docs/mdbook/src/SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
- [Tests](ios/ios-tests.md)
1717
- [Documentation](ios/ios-documentation.md)
1818
- [Release](ios/release.md)
19+
- [Development Apps](ios/dev-apps.md)
1920

2021
- [Design](./design/README.md)
2122
- [Ten Thousand Foot View](design/ten-thousand-foot-view.md)

docs/mdbook/src/ios/dev-apps.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Development Apps
2+
3+
There are two iOS apps available in the repo that you can use for MapLibre Native development. One Objective-C based app and a Swift based app.
4+
5+
## Objective-C App
6+
7+
This app is available as "App" in the [generated Xcode project](./README.md).
8+
9+
The source code lives in `platform/ios/app`.
10+
11+
You can also build and run it from the command line with:
12+
13+
```
14+
bazel run --//:renderer=metal //platform/ios:App
15+
```
16+
17+
<p align="center">
18+
<img width="300" alt="Objective-C app screenshot" src="https://github.com/user-attachments/assets/aeb0cb5e-1f6c-439e-8668-22ee0a0b11f2" />
19+
</p>
20+
21+
## Swift App
22+
23+
The Swift App is mainly used to demo usage patterns in the [example documentation](./ios-documentation.md#examples).
24+
25+
This app is available as "MapLibreApp" in the [generated Xcode project](./README.md).
26+
27+
The source code lives in `platform/ios/swift-app`.
28+
29+
<p align="center">
30+
<img width="300" alt="Swift app screenshot" src="https://github.com/user-attachments/assets/87f4cea4-40dd-4744-a935-c7cebd6887f1" />
31+
</p>
32+
33+
You can also build and run it from the command line with:
34+
35+
```
36+
bazel run --//:renderer=metal //platform/ios/app-swift:MapLibreApp
37+
```

platform/android/MapLibreAndroid/src/vulkan/java/org/maplibre/android/maps/renderer/textureview/VulkanTextureViewRenderThread.java

+11
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@ public VulkanTextureViewRenderThread(@NonNull TextureView textureView, @NonNull
1515
super(textureView, mapRenderer);
1616
}
1717

18+
void cleanup() {
19+
if (surface == null) {
20+
return;
21+
}
22+
23+
mapRenderer.onSurfaceDestroyed();
24+
surface.release();
25+
surface = null;
26+
}
27+
1828
// Thread implementation
1929

2030
@Override
@@ -121,6 +131,7 @@ public void run() {
121131

122132
// Signal we're done
123133
synchronized (lock) {
134+
cleanup();
124135
this.exited = true;
125136
lock.notifyAll();
126137
}
Binary file not shown.

platform/android/MapLibrePlugin/gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

platform/android/MapLibrePlugin/gradlew

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ fi
205205
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
206206

207207
# Collect all arguments for the java command:
208-
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
208+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
209209
# and any embedded shellness will be escaped.
210210
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
211211
# treated as '${Hostname}' itself on the command line.

platform/android/gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

platform/darwin/BUILD.bazel

-2
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ objc_library(
204204
],
205205
hdrs = [
206206
"include/mbgl/interface/native_apple_interface.h",
207-
"include/mbgl/storage/reachability.h",
208207
"include/mbgl/util/image+MLNAdditions.hpp",
209208
],
210209
copts = WARNING_FLAGS["ios"] + MAPLIBRE_FLAGS + [
@@ -243,7 +242,6 @@ objc_library(
243242
}),
244243
hdrs = [
245244
"include/mbgl/interface/native_apple_interface.h",
246-
"include/mbgl/storage/reachability.h",
247245
"include/mbgl/util/image+MLNAdditions.hpp",
248246
],
249247
copts = CPP_FLAGS + MAPLIBRE_FLAGS + [

platform/darwin/include/mbgl/storage/reachability.h

-93
This file was deleted.

0 commit comments

Comments
 (0)