You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During my contribution time on MapLibre for Native (circa: Fall 2020 — Fall 2022), I put together a bunch of architecture features, that may have been well documented in code or in GitHub issues, but never really had a good landing place for those interested in the iOS, macOS architecture. Since Bart has come on, I thought it might be useful add more spice to the source code and possibly highlight some architecture features that others may not have known about.
Please feel free to discuss details further here, or if you have ephemeral questions, please find me on Slack.
Swift Package
We now have a recent iOS Swift Package. Thanks to @louwers & @petr-pokorny-1 for creating that infrastructure.
When we did the initial releases & test validation, there were a couple of Open Source projects that consumed the MapLibre SDK: AWS Location Samples & Open Map Tiles Demo. Those were the ones I knew of, or used, or maintained.
I thought those might be a little too much for the release process for developers to have sort through those projects, so the MapLibre Playground was added. This is also nice because any consumer of the Swift Package gets the Playground downloaded with the Package, so a developer can see some basic use and have a live demo ... within minutes. And they don't have to build any source. Sort of like the one button build ethos.
When we did the Metal Support validation, I made use of Xcode Instruments to verify the frame rate was nice and happy. This may be nice to revisit when the real Metal work is done. Think of it as one of many acceptance criteria for a graphic intensive application like the MapLibre SDK.
SwiftUI
There is a SwiftUI test app, but unfortunately, I put it in the metal support branch. It will need to be sorted out or cherry picked to be put in main.
UI Unit Tests
There are a bunch of UI unit tests, that fire off every GitHub Action, or can be launched manually. Those are really nice because they mimic what a real customer would use MapLibre with pinch and tap gestures. Some tests create automatic screen shots, and recording of the device could also be added. I am a huge fan of repeatable tests, and for a graphics application like maps, I thought automated UI tests would be key. This was useful when designing the continuous integration on AWS Mac EC2. The access was constrained to the data center, and I was able to kick off some UI unit tests easily, and watch the builds do automatic testing in the AWS data center, thereby showing that AWS Mac EC2 was indeed feasible for MapLibre.
Apple CI builds
Xcode Server Bots — I did a bunch of work integrating Xcode Server Bots with MapLIbre. This was super useful as I could test many branches, many iOS's, many UI devices & simulators, and many unit & UI tests. Alas, Apple dropped Xcode Server in Xcode 14.2. It was a good product, but I'm guessing they are leaning towards customers using Xcode Cloud.
Xcode Cloud — I did some investigating of this product when it was in Beta in 2021. At the time it seemed like it worked really good if you had a product in the Apple App Store. But it didn't make sense if you had an open source project that you wanted to have builds for. It may be worth revisiting some day.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Architecture Notes for iOS developers
During my contribution time on MapLibre for Native (circa: Fall 2020 — Fall 2022), I put together a bunch of architecture features, that may have been well documented in code or in GitHub issues, but never really had a good landing place for those interested in the iOS, macOS architecture. Since Bart has come on, I thought it might be useful add more spice to the source code and possibly highlight some architecture features that others may not have known about.
Please feel free to discuss details further here, or if you have ephemeral questions, please find me on Slack.
Swift Package
We now have a recent iOS Swift Package. Thanks to @louwers & @petr-pokorny-1 for creating that infrastructure.
When we did the initial releases & test validation, there were a couple of Open Source projects that consumed the MapLibre SDK: AWS Location Samples & Open Map Tiles Demo. Those were the ones I knew of, or used, or maintained.
I thought those might be a little too much for the release process for developers to have sort through those projects, so the MapLibre Playground was added. This is also nice because any consumer of the Swift Package gets the Playground downloaded with the Package, so a developer can see some basic use and have a live demo ... within minutes. And they don't have to build any source. Sort of like the one button build ethos.
When we did the Metal Support validation, I made use of Xcode Instruments to verify the frame rate was nice and happy. This may be nice to revisit when the real Metal work is done. Think of it as one of many acceptance criteria for a graphic intensive application like the MapLibre SDK.
SwiftUI
There is a SwiftUI test app, but unfortunately, I put it in the
metal support
branch. It will need to be sorted out or cherry picked to be put inmain
.UI Unit Tests
There are a bunch of UI unit tests, that fire off every GitHub Action, or can be launched manually. Those are really nice because they mimic what a real customer would use MapLibre with pinch and tap gestures. Some tests create automatic screen shots, and recording of the device could also be added. I am a huge fan of repeatable tests, and for a graphics application like maps, I thought automated UI tests would be key. This was useful when designing the continuous integration on AWS Mac EC2. The access was constrained to the data center, and I was able to kick off some UI unit tests easily, and watch the builds do automatic testing in the AWS data center, thereby showing that AWS Mac EC2 was indeed feasible for MapLibre.
Apple CI builds
Xcode Server Bots — I did a bunch of work integrating Xcode Server Bots with MapLIbre. This was super useful as I could test many branches, many iOS's, many UI devices & simulators, and many unit & UI tests. Alas, Apple dropped Xcode Server in Xcode 14.2. It was a good product, but I'm guessing they are leaning towards customers using Xcode Cloud.
Xcode Cloud — I did some investigating of this product when it was in Beta in 2021. At the time it seemed like it worked really good if you had a product in the Apple App Store. But it didn't make sense if you had an open source project that you wanted to have builds for. It may be worth revisiting some day.
Beta Was this translation helpful? Give feedback.
All reactions