Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: rely on anonymous access #40

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ permissions: {}
jobs:
build:
name: Buid iOS app
permissions:
contents: read
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -22,12 +24,6 @@ jobs:
with:
bundler-cache: true

- name: Configure Artifactory access
run: |
echo "machine repositories.tomtom.com" > ~/.netrc
echo "login ${{ secrets.ARTIFACTORY_USERNAME }}" >> ~/.netrc
echo "password ${{ secrets.ARTIFACTORY_PASSWORD }}" >> ~/.netrc

- name: Add Cocoapods repository
# Ensure we have repos dir created
# Workaround for https://github.com/jfrog/cocoapods-art/issues/32
Expand All @@ -38,10 +34,6 @@ jobs:
- name: Install Cocoapods dependencies
run: bundle exec pod install

- name: Clear .netrc file
if: always()
run: echo -n > ~/.netrc

- name: Build iOS app
run: >
xcodebuild
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/main-verification.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ permissions: {}

jobs:
build:
permissions:
contents: read
uses: ./.github/workflows/build.yaml
secrets: inherit

notify:
needs: build
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pr-verification.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ jobs:
uses: ./.github/workflows/quality-checks.yaml

build:
permissions:
contents: read
uses: ./.github/workflows/build.yaml
secrets: inherit
38 changes: 16 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

Hello and welcome to this repository with examples showcasing the [TomTom Navigation SDK for iOS].

> **Note** Navigation SDK for iOS is only available upon request. In order to get access, [contact us].

<div align="center">
<img align="center" src=".github/nav-sdk-phone.png" width="400"/>
</div>
Expand All @@ -15,7 +13,7 @@ Once you have gained access, set up the development environment by following:
1. Install Xcode if you don't already have it. Supported versions of Xcode are 13 to 14, inclusive.

2. We recommend using `rbenv` to handle `ruby` selection/installation.
1. Install `rbenv`
1. Install `rbenv`
```zsh
brew install rbenv
```
Expand Down Expand Up @@ -46,38 +44,31 @@ Once you have gained access, set up the development environment by following:
bundle install
```

4. Use the credentials obtained from `TomTom` to login to [Artifactory] and generate an identity token.
Identity tokens can be generated by expanding the user menu in the top-right corner, and select
`"Edit profile" → "Generate an Identity Token"`.
The identity token will be used to manage the access to private iOS [Cocoapods].
Access can be managed via a `.netrc` file. Create or extend a local `~/.netrc` with the following snippet:
```
machine repositories.tomtom.com
login <YOUR_EMAIL_ADDRESS>
password <YOUR_TOKEN>
```

5. Add a reference to the [Cocoapods] private repository:
4. Add a reference to the [Cocoapods] private repository:
```zsh
bundle exec pod repo-art add tomtom-sdk-cocoapods "https://repositories.tomtom.com/artifactory/api/pods/cocoapods"
```

6. Install the dependencies by executing the following command in **the project folder**.
5. Install the dependencies by executing the following command in **the project folder**.
```
bundle exec pod install
```

7. To update the SDK version, run the command:
6. To update the SDK version, run the command:
```
bundle exec pod repo-art update tomtom-sdk-cocoapods
```
8. Open the project’s `xcworkspace` and start developing your awesome application.
7. Open the project’s `xcworkspace` and start developing your awesome application.

## API Keys

Make sure you have the appropriate TomTom API key. If you don’t have an API Key, go to [How to get a TomTom API Key](https://developer.tomtom.com/how-to-get-tomtom-api-key) to learn how to create one. Using an invalid API key will cause issues loading the map or running navigation.
In order to manage, create or delete your API keys, you need to have a [TomTom Developer Portal] account.
If you don't have one, you need to [register] for one.
Follow the steps from [How to get a TomTom API Key] to learn how to create an API key.

Change your API key in the `Keys.swift` file.
> **Note** Using an invalid API key will cause issues loading the map or running navigation.

In order to insert your API key in the project, you need to change the `Keys.swift` file.

```swift
enum Keys {
Expand All @@ -86,6 +77,7 @@ enum Keys {
```

## Troubleshooting

If you have a **black screen** when launching the Basic driving app, please follow the steps below.

- Check that you have updated the `API key` with yours in the `Keys.swift` file.
Expand All @@ -96,6 +88,7 @@ If you have a **black screen** when launching the Basic driving app, please foll

If you get a warning about the device's architecture, please follow the steps below.
```

Warning: Error creating LLDB target at path '*' using an empty LLDB target which can cause slow memory reads from remote devices: the specified architecture 'arm64-*-*' is not compatible with 'x86_64-apple-ios*'
```

Expand All @@ -115,9 +108,10 @@ Please follow the steps below to run Rosetta during the build process:

---

[contact us]: https://developer.tomtom.com/tomtom-sdk-for-ios/request-access
[How to get a TomTom API Key]: https://developer.tomtom.com/how-to-get-tomtom-api-key
[register]: https://developer.tomtom.com/user/register
[rbenv documentation]: https://github.com/rbenv/rbenv#readme
[tomtom-navigation-ios-examples]: https://github.com/tomtom-international/tomtom-navigation-ios-examples
[Artifactory]: https://repositories.tomtom.com/ui
[Cocoapods]: (https://guides.cocoapods.org/using/getting-started.html)
[TomTom Navigation SDK for iOS]: https://developer.tomtom.com/ios/navigation/documentation/overview/introduction
[TomTom Developer Portal]: https://developer.tomtom.com/user/me/apps