Skip to content

Commit

Permalink
(Re)move oudated information from .md files (maplibre#2416)
Browse files Browse the repository at this point in the history
  • Loading branch information
louwers authored May 21, 2024
1 parent 3f8cdf4 commit 04be6ec
Show file tree
Hide file tree
Showing 6 changed files with 149 additions and 370 deletions.
37 changes: 8 additions & 29 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
## Documentation

- For a high-level overview of MapLibre Native, check out the [MapLibre Native Markdown Book](https://maplibre.org/maplibre-native/docs/book/).
- See [`DEVELOPING.md`](DEVELOPING.md) for getting started with development.

## Source code checkout

```bash
git clone --recurse-submodules https://github.com/maplibre/maplibre-native.git
```


## Guidelines

If you want to contribute code:
Expand All @@ -22,15 +20,7 @@ If you want to contribute code:

1. Pull requests are gladly accepted. If there are any changes that developers using one of the platforms should be aware of, please update the **main** section of the relevant `CHANGELOG.md`.

Please note the special instructions for contributing new source code files, asset files, or user-facing strings to MapLibre Native for [iOS](platform/ios/CONTRIBUTING.md), [Android](platform/android/DEVELOPING.md) or [macOS](platform/macos/DEVELOPING.md).

## Pull Requests

To run the benchmarks (for Android) include the following line on a PR comment:

```
!benchmark android
```
Please note the special instructions for contributing new source code files, asset files, or user-facing strings to MapLibre Native for [iOS](platform/ios/CONTRIBUTING.md), [Android](platform/android/DEVELOPING.md) or [macOS](platform/macos/README.md).

## Design Proposals

Expand All @@ -47,25 +37,14 @@ The steps for a Design Proposal are the following:
5. Call a vote on the Design Proposal once discussions have settled. People in favor of your Design Proposal shall approve the pull request. People against your Design Proposal shall comment on the pull request with something like "Rejected".
6. Give the community at least 72 hours to vote. If a majority of the people who voted accept your Proposal, it can be merged.

## Semantic Versioning
[Accepted design proposals](https://github.com/maplibre/maplibre-native/tree/main/design-proposals).

MapLibre uses tags for releases based on [SemVer](https://semver.org) versioning. This is useful for checking out a particular released version for feature enhancements or debugging.
## Pre-commit hooks

You can list available tags by issuing the command `git tag`, then use the result
Install [pre-commit](https://pre-commit.com/) and run

```bash
# 1. Obtain a list of tags, which matches to release versions
git tag

# 2. Set a convenience variable with the desired TAG
# TAG=android-v9.4.2
# TAG=android-v9.5.2
TAG=ios-v5.12.0
# TAG=ios-v5.12.0-pre.1

# 3. Check out a particular TAG
git checkout tags/$TAG -b $TAG

# 4. build, debug or enhance features based on the tag
# clean, if you need to troubleshoot build dependencies by using `make clean`
```
pre-commit install
```

to install the pre-commit hooks configured in `.pre-commit-config.yml`.
189 changes: 0 additions & 189 deletions DEVELOPING.md

This file was deleted.

8 changes: 8 additions & 0 deletions platform/android/DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,11 @@ To format all Kotlin source files, use:
```
$ ./gradlew formatKotlin
```

## Benchmarks in Pull Request

To run the benchmarks (for Android) include the following line on a PR comment:

```
!benchmark android
```
96 changes: 93 additions & 3 deletions platform/ios/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,94 @@
# Documentation
# Contributing

## Downloading Source

Download the source and install all submodules if you have not already, by running the following from the root of the repository.

```
git clone --recurse-submodules [email protected]:maplibre/maplibre-native.git
cd maplibre-native
```

## Bazel

[Bazel](https://bazel.build/) is used for building on iOS.

You can generate an Xcode project thanks to [rules_xcodeproj](https://github.com/MobileNativeFoundation/rules_xcodeproj) intergration.

You need to install [bazelisk](https://github.com/bazelbuild/bazelisk), which is a wrapper around Bazel which ensures that the version specified in `.bazelversion` is used.

```
brew install bazelisk
```

### Creating `config.bzl`

> [!NOTE]
> This is optional.
You may want to configure Bazel, otherwise the default config gets used.

```
cp platform/darwin/bazel/example_config.bzl platform/darwin/bazel/config.bzl
```

You need to set your `BUNDLE_ID_PREFIX` to be unique (ideally use a domain that you own in reverse domain name notation).

You can keep leave the `APPLE_MOBILE_PROVISIONING_PROFILE_NAME` alone.

Set the Team ID to the Team ID of your Apple Developer Account (paid or unpaid both work).
If you do not know your Team ID, go to your [Apple Developer account](https://developer.apple.com/account), log in, and scroll down to find your Team ID.

If you don't already have a developer account, continue this guide and let Xcode generate a provisioning profile for you. You will need to update the Team ID later once a certificate is generated.

If you are encountering build errors due to provisioning profiles, skip down to the troubleshooting section.

## Create the Xcode Project

Run the following commands:

```
bazel run //platform/ios:xcodeproj --@rules_xcodeproj//xcodeproj:extra_common_flags="--//:renderer=metal"
xed platform/ios/MapLibre.xcodeproj
```

Then once in Xcode, click on "MapLibre" on the left, then "App" under Targets, then "Signing & Capabilities" in the tabbed menu.
Confirm that no errors are shown:

<img width="921" alt="image" src="https://github.com/polvi/maplibre-native/assets/649392/a1ef30cb-97fc-429a-acee-194436f3fb8a">

Try to run the example App in the simulator and on a device to confirm your setup works.

### Troubleshooting Provisioning Profiles

If you get a Python `KeyError` when processing provisioning profiles, you probably have some _really_ old or corrupted profiles.

Have a look through `~/Library/MobileDevice/Provisioning\ Profiles` and remove any expired profiles.

## Using Bazel from the Command Line

It is also possible to build and run the test application in a simulator from the command line without opening Xcode.

```
bazel run //platform/ios:App
```

If you want to build your own XCFramework, see the 'Build XCFramework' step in the [iOS CI workflow](../../.github/workflows/ios-ci.yml).

## Render Tests

To run the render tests, run the `RenderTest` target from iOS.

When running in a simulator, use

```
# check for 'DataContainer' of the app with `*.maplibre.RenderTestApp` id
xcrun simctl listapps booted
```

to get the data directory of the render test app. This allows you to inspect test results. When adding new tests, the generated expectations and `actual.png` file can be copied into the source directory from here.

## Documentation

We use [DocC](https://www.swift.org/documentation/docc) for documentation. To build the documentation locally, run the following command from the root directory of the repository:

Expand All @@ -8,7 +98,7 @@ platform/ios/scripts/docc.sh preview

You need to have [aws-cli](https://github.com/aws/aws-cli) installed to download the resources from S3 (see below).

## Resources
### Resources

Resources like images should not be checked in but should be uploaded to the [S3 Bucket](https://s3.eu-central-1.amazonaws.com/maplibre-native/index.html#ios-documentation-resources/). You can share a `.zip` with all files that should be added in the PR.

Expand All @@ -28,7 +118,7 @@ resources=(
)
```

## Examples
### Examples

The code samples in the documentation should ideally be compiled on CI so they do not go out of date.

Expand Down
Loading

0 comments on commit 04be6ec

Please sign in to comment.