-
Notifications
You must be signed in to change notification settings - Fork 1.3k
tvOS map SDK and tvOS demo application #9319
Conversation
This is 😎 I've been thinking lately about refactoring |
6bf186f
to
50c873e
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
3d27107
to
c6f69e2
Compare
With the help of this Makefile I was able to build universal versions of the ICU 58.1 library that work for tvOS (device and simulator) without the link error mentioned above (copy the file into the ICU root directory and call The question is how to distribute such tvOS specific libraries via mason if there is no separate platform available for tvOS but instead iOS being reused. Given I've got runtime issues of the tvOS test app (I assume several things under the hood of tvOS work slightly different than iOS) I would actually consider adding an additional platform. This way also the amount of |
250d40a
to
5fe3c45
Compare
33ae181
to
78d6b22
Compare
This pull request has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions. |
Oh no, not after all this tvOS quest has been through. |
4d18c83
to
bfbb585
Compare
530d990
to
817d7ff
Compare
This pull request has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions. |
Allow mbgl-platform-core to be used as a tvOS static library. Added a tvOS dynamic framework target and corresponding unit test target. Conditionally omitted lots of code specific to iOS, particularly regarding Core Location and certain gesture recognizers that are incompatible with the Apple Remote. Also omitted the entirety of Mapbox Telemetry and Fabric integration.
Also read access token from environment or user default.
No longer relevant. |
Hello there. I was hopeful to bring these changes to a fork of mine to create a tvOS build. After looking a little closer at the build steps, I am guessing that will not be possible? The mapbox native core framework is built internally and likely not built for tvOS. Therefore I am guessing it will not allow me to add it to a tvOS project. Is that correct? If it is possible I would be interested in contributing support for tvOS. Thanks. |
This PR introduces a new tvOS-compatible flavor of the iOS map SDK. The goal is to minimize maintenance overhead, so that we can get tvOS support more or less “for free” in the course of supporting iOS. Unlike the macOS map SDK introduced in #3135, the tvOS map SDK is compiled from a strict subset of the iOS map SDK codebase and lives inside the same Xcode project generated by
make iproj
. Ultimately, the tvOS map SDK would be distributed as just another binary in an iOS map SDK release, alongside the dynamic and static builds.Conditional compilation is used extensively to exclude incompatible features like user location tracking and and most gesture recognizers. Telemetry-related files are excluded outright from the target. The conditional compilation is particularly intrusive around the gesture recognition code in MGLMapView. I think MGLMapView remains more readable than, for instance, much of the MGLStyleValue code, but on the other hand my personal tolerance for conditional macros is relatively high.
The tvOS SDK isn’t ready for a debut, and we haven’t made any plans to officially support tvOS. This PR merely provides a convenient place to collect technical feedback. We’d need to address most of these caveats before we could even consider merging the PR:
The same ICU dependency that enables correctly rendered Arabic is available as an iOS static library. Using it as a tvOS or watchOS library anyways technically works, but Apple plans to remove support for this approach soon, so there are lots of URGENT warnings. Before this PR can land, we’d want Mason to produce a tvOS binary of ICU to avoid future breakage. Alternatively, maybe we could find a way to build the tvOS flavor of ICU from scratch, on demand, as part ofmake iproj
.CMake, which generates mbgl.xcodeproj, is unable to place a single file reference in multiple targets – Merge iproj and xproj? #5942 (comment) – so we have to compile mbgl-core as a single fat binary supporting both iOS and tvOS. This shouldn’t add to the iOS map SDK’s size, since unused symbols would get stripped away as part of the SDK build process.The attribution button does nothing when pressed.MapKit puts a clickable Legal button inside the pan/zoom menu. We should do likewise, but there’s also enough horizontal real estate to display an unobtrusive copyright notice on-screen, similar to the macOS map SDK’s attribution view.To do:
Prior art in #2340 and #2778.
/cc @friedbunny @kkaefer