Compare commits

..

2 Commits

Author SHA1 Message Date
Yannik Bloscheck
40d0ed5f1d [ios] Don't let custom map appearance influence CarPlay
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
2026-01-08 19:29:30 +01:00
Yannik Bloscheck
9a36857f91 [ios] Always use light map appearance by default
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
2026-01-08 19:29:30 +01:00
4 changed files with 13 additions and 41 deletions

View File

@@ -21,11 +21,7 @@ Clone the repository including all submodules (see [Special cases options](#spec
Follow the instructions for your OS, and afterwards the repository is prepared to build a CoMaps app!
## Setting up to your OS of development
<details open>
<summary><span style="font-size: 1.5em; font-weight: bold;">Linux</span></summary>
### Linux
Clone the repository
```bash
git clone --recurse-submodules --shallow-submodules https://codeberg.org/comaps/comaps.git
@@ -45,11 +41,7 @@ cd comaps
If you plan to publish the app privately in stores check [special options](#special-cases-options).
</details>
<details open>
<summary><span style="font-size: 1.5em; font-weight: bold;">Windows</span></summary>
### Windows
You need to have [Git for Windows](https://git-scm.com/download/win) installed and Git bash available in the PATH.
It's necessary to enable symlink support:
@@ -77,11 +69,7 @@ For _Windows 10_: You should be able to build the project by following either o
**Setup 2: Using Visual Studio Developer Command Prompt**
Install the [Visual Studio Developer Command Prompt](https://docs.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2022) (make sure to choose the latest MSVC x64/x86 build tool and Windows 10/11 SDK as individual components while installing Visual Studio).
</details>
<details open>
<summary><span style="font-size: 1.5em; font-weight: bold;">macOS</span></summary>
### macOS
Install required build dependencies and Xcode
1. Install Xcode Command Line Tools
2. Install [Xcode](https://apps.apple.com/app/xcode/id497799835?mt=12) from the App Store
@@ -105,10 +93,8 @@ git clone --recurse-submodules --shallow-submodules https://codeberg.org/comaps/
cd comaps
./configure.sh
```
</details>
<details open>
<summary><span style="font-size: 1.5em; font-weight: bold;">Special cases options</span></summary>
### Special cases options
If you're only doing a one-off build or your internet bandwidth or disk space is limited, add following options to the `git clone` command:
@@ -128,11 +114,7 @@ It'll seamlessly replace the squashed first "Organic Maps sources as of 02.04.20
The `om-historic.git` repo is ~1Gb only as various historic blobs, bundled 3rd-party deps, etc. were removed from it.
If you really need them (e.g. to build a very old app version) then refer to full organicmaps.git repo please.
</details>
## Develop for:
<details open>
<summary><span style="font-size: 1.5em; font-weight: bold;">Android app</span></summary>
## Android app
### Preparing
@@ -217,10 +199,9 @@ To enable logging in case of crashes, after installing a debug version, run:
```bash
adb shell pm grant app.organicmaps.debug android.permission.READ_LOGS
```
</details>
<details open>
<summary><span style="font-size: 1.5em; font-weight: bold;">Android Auto</span></summary>
### Android Auto Development
Android Auto can be developed and tested without having a physical device by using [Desktop Head Unit (DHU)](https://developer.android.com/training/cars/testing/dhu). Go to Android Studio > Tools -> SDK Manager -> SDK Tools and enable "Android Auto Desktop Head Unit".
@@ -368,10 +349,8 @@ Example of command line for running system tracing:
```
./record_android_trace -a app.organicmaps.debug -o trace_file.perfetto-trace -t 30s -b 64mb sched freq idle am wm gfx view binder_driver hal dalvik camera input res memory
```
</details>
<details open>
<summary><span style="font-size: 1.5em; font-weight: bold;">iOS app</span></summary>
## iOS app
### Preparing
@@ -422,11 +401,7 @@ Select "CoMaps" product scheme.
Compile and run the project ("Product" → "Run").
</details>
<details open>
<summary><span style="font-size: 1.5em; font-weight: bold;">CarPlay</span></summary>
### CarPlay
To test CarPlay, simply select "I/O" → "External Displays" → "CarPlay" in the Simulator
### Spoofing GPS
@@ -436,8 +411,6 @@ To select an Apple predetermined track or specific custom location, choose "Feat
To simulate a custom GPX track use `python3 tools/python/ios_simulator_load_gpx.py <path to your gpx>` which is a wrapper for `xcrun simctl location`. Default values are 60 km/h and 0.1s update intervals, but can be customized
</details>
## Desktop app
See [install_desktop](INSTALL_DESKTOP.md) to install and build Desktop app for Linux and Mac OS

View File

@@ -77,8 +77,6 @@ TagMapping const kVehicleTagMapping = {
{OsmElement::Tag("vehicle", "private"), RoadAccess::Type::Private},
{OsmElement::Tag("vehicle", "destination"), RoadAccess::Type::Destination},
{OsmElement::Tag("vehicle", "permit"), RoadAccess::Type::Permit},
{OsmElement::Tag("service", "parking_aisle"), RoadAccess::Type::Private},
{OsmElement::Tag("amenity", "parking_entrance"), RoadAccess::Type::Private},
};
TagMapping const kCarBarriersTagMapping = {

View File

@@ -41,13 +41,14 @@ final class ThemeManager: NSObject {
}
}(actualTheme)
if Settings.mapAppearance == .light {
let isCarPlayActive = CarPlayService.shared.isCarplayActivated
if !isCarPlayActive, Settings.mapAppearance == .light {
if actualTheme == .vehicleDay || actualTheme == .vehicleNight {
FrameworkHelper.setTheme(.vehicleDay)
} else {
FrameworkHelper.setTheme(.day)
}
} else if Settings.mapAppearance == .dark {
} else if !isCarPlayActive, Settings.mapAppearance == .dark {
if actualTheme == .vehicleDay || actualTheme == .vehicleNight {
FrameworkHelper.setTheme(.vehicleNight)
} else {

View File

@@ -186,7 +186,7 @@ import AVFoundation
return mapAppearance
}
return .auto
return .light
}
set {
UserDefaults.standard.set(newValue.rawValue, forKey: userDefaultsKeyMapAppearance)