├── .circleci └── config.yml ├── .github └── workflows │ ├── create_new_release.yml │ └── merge_release_pr.yml ├── .gitignore ├── .img ├── spmx-1.png ├── spmx-2.png ├── spmx-3.png └── spmx-4.png ├── CODEOWNERS ├── LICENSE.md ├── Package.swift ├── README.md ├── Sources └── MapboxCommonWrapper │ └── Shim.swift ├── Tests ├── Integration │ ├── Carthage │ │ ├── .gitignore │ │ └── Cartfile │ ├── CocoaPods │ │ ├── .gitignore │ │ ├── Gemfile │ │ ├── Podfile │ │ ├── Sources │ │ │ ├── AppDelegate.swift │ │ │ └── Info.plist │ │ └── project.yml │ ├── SPM │ │ ├── .gitignore │ │ ├── Sources │ │ │ ├── AppDelegate.swift │ │ │ └── Info.plist │ │ └── project.yml │ ├── ensure_netrc.sh │ ├── test_carthage.sh │ ├── test_cocoapods.sh │ └── test_spm.sh ├── LinuxMain.swift └── MapboxCommonTests │ ├── MapboxCommonTests.swift │ └── XCTestManifests.swift └── scripts └── release ├── .gitignore ├── Package.swift ├── Sources └── set-marketing-version │ └── main.swift └── check-license.sh /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2.1 2 | 3 | orbs: 4 | slack: circleci/slack@4.12.1 5 | 6 | workflows: 7 | version: 2 8 | default: 9 | jobs: 10 | - macos-job: 11 | name: SPM 12 | xcode: "15.2.0" 13 | spm: true 14 | - macos-job: 15 | name: Carthage 16 | carthage: true 17 | - macos-job: 18 | name: CocoaPods 19 | cocoapods: true 20 | - verify_branch: 21 | name: Verify branch 22 | 23 | jobs: 24 | macos-job: 25 | parameters: 26 | xcode: 27 | type: string 28 | default: "15.2.0" 29 | cocoapods: 30 | type: boolean 31 | default: false 32 | carthage: 33 | type: boolean 34 | default: false 35 | spm: 36 | type: boolean 37 | default: false 38 | macos: 39 | xcode: << parameters.xcode >> 40 | environment: 41 | HOMEBREW_NO_AUTO_UPDATE: 1 42 | steps: 43 | - checkout 44 | - run: 45 | name: Ensure netrc 46 | command: Tests/Integration/ensure_netrc.sh 47 | - run: 48 | name: Install XcodeGen 49 | command: brew install xcodegen 50 | - when: 51 | condition: << parameters.carthage >> 52 | steps: 53 | - run: 54 | name: Install Carthage 55 | command: | 56 | max_retries=3 57 | attempt=0 58 | while (( attempt < max_retries )); do 59 | ((attempt++)) 60 | sudo softwareupdate --install-rosetta --agree-to-license 61 | if [[ $? -eq 0 ]]; then 62 | attempt=max_retries 63 | echo "Rosetta installed" 64 | else 65 | echo "Rosetta installation failed on attempt $attempt" 66 | fi 67 | 68 | sleep 1 69 | done 70 | 71 | attempt=0 72 | while (( attempt < max_retries )); do 73 | ((attempt++)) 74 | rm -rf Carthage.pkg 75 | curl -OL "https://github.com/Carthage/Carthage/releases/download/0.39.1/Carthage.pkg" 76 | sudo installer -pkg Carthage.pkg -target / 77 | 78 | if [[ $? -eq 0 ]]; then 79 | attempt=max_retries 80 | echo "Carthage installed" 81 | else 82 | echo "Carthage installation failed on attempt $attempt" 83 | fi 84 | 85 | sleep 1 86 | done 87 | 88 | - run: 89 | name: Test Integration via Carthage 90 | command: Tests/Integration/test_carthage.sh 91 | - when: 92 | condition: << parameters.cocoapods >> 93 | steps: 94 | - run: 95 | name: Test Integration via CocoaPods 96 | command: Tests/Integration/test_cocoapods.sh 97 | - when: 98 | condition: << parameters.spm >> 99 | steps: 100 | - run: 101 | name: Build release script 102 | command: | 103 | pushd scripts/release 104 | swift build 105 | popd 106 | - run: 107 | name: SPM SSH fix 108 | command: | 109 | rm ~/.ssh/id_rsa 110 | for ip in $(dig @8.8.8.8 github.com +short); do ssh-keyscan github.com,$ip; ssh-keyscan $ip; done 2>/dev/null >> ~/.ssh/known_hosts || true 111 | - run: 112 | name: Build and Run using SPM 113 | command: Tests/Integration/test_spm.sh 114 | - run: 115 | name: Verify LICENSE.md is up-to-date 116 | command: ./scripts/release/check-license.sh 117 | verify_branch: 118 | docker: 119 | - image: cimg/base:stable 120 | resource_class: small 121 | steps: 122 | - run: 123 | name: Verify version 124 | command: | 125 | echo "We check branch here instead of running job with filter because we need to run it on every PR to make job mandatory in GH." 126 | if [[ ${CIRCLE_BRANCH} == release* ]]; then 127 | VERSION=$(echo "${CIRCLE_BRANCH}" | sed -E "s/^release[\/-]v//") 128 | MAJOR=$(echo "${VERSION}" | cut -d. -f1) 129 | MINOR=$(echo "${VERSION}" | cut -d. -f2) 130 | echo "Version: ${VERSION} MAJOR: ${MAJOR} MINOR: ${MINOR}" 131 | if [[ "${MAJOR}" -eq 24 ]]; then 132 | if [[ "${MINOR}" -lt 6 ]]; then 133 | echo "Version ${VERSION} is not allowed to be released from the main branch because of incorrect dependencies in SPM. Please use lts branch (see lts/v24.5 for example)." 134 | exit 1 135 | fi 136 | fi 137 | fi 138 | -------------------------------------------------------------------------------- /.github/workflows/create_new_release.yml: -------------------------------------------------------------------------------- 1 | name: Create new release 2 | on: 3 | pull_request: 4 | types: closed 5 | 6 | jobs: 7 | create-new-release: 8 | if: | 9 | github.event.pull_request.merged && 10 | (startsWith(github.head_ref, 'release-v') || 11 | startsWith(github.head_ref, 'release/v')) && 12 | (startsWith(github.base_ref, 'main') || 13 | startsWith(github.base_ref, 'lts/v')) 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v2 17 | with: 18 | fetch-depth: 0 19 | - name: Create release 20 | run: | 21 | VERSION=$(echo "${GITHUB_HEAD_REF}" | sed -E "s/^release[\/-]//") 22 | MARK_PRERELEASE="" 23 | if [[ $VERSION == *"-daily-"* ]]; then 24 | echo "Do not mark daily releases as latest!" 25 | MARK_PRERELEASE="--prerelease --latest=false" 26 | fi 27 | gh release create $VERSION $MARK_PRERELEASE --notes "Bump to $VERSION" --title "Release-$VERSION" --target "${GITHUB_HEAD_REF}" 28 | env: 29 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 30 | -------------------------------------------------------------------------------- /.github/workflows/merge_release_pr.yml: -------------------------------------------------------------------------------- 1 | name: Merge release pr 2 | on: 3 | pull_request: 4 | types: opened 5 | 6 | jobs: 7 | approve-release-pull-request: 8 | if: | 9 | (startsWith(github.head_ref, 'release-v') || 10 | startsWith(github.head_ref, 'release/v') || 11 | startsWith(github.base_ref, 'main')) && 12 | startsWith(github.event.pull_request.user.login, 'mapbox-github-ci-writer-public-') && 13 | github.event.pull_request.user.id == '93400552' 14 | runs-on: ubuntu-latest 15 | steps: 16 | - name: Approve Pull Request 17 | run: gh pr review $PR --approve 18 | env: 19 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 20 | PR: ${{ github.event.pull_request.html_url }} 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .build 2 | .swiftpm 3 | Package.resolved 4 | -------------------------------------------------------------------------------- /.img/spmx-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/mapbox-common-ios/fae12447171dded9e764b5c3f909ce409165e8fc/.img/spmx-1.png -------------------------------------------------------------------------------- /.img/spmx-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/mapbox-common-ios/fae12447171dded9e764b5c3f909ce409165e8fc/.img/spmx-2.png -------------------------------------------------------------------------------- /.img/spmx-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/mapbox-common-ios/fae12447171dded9e764b5c3f909ce409165e8fc/.img/spmx-3.png -------------------------------------------------------------------------------- /.img/spmx-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/mapbox-common-ios/fae12447171dded9e764b5c3f909ce409165e8fc/.img/spmx-4.png -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @mapbox/core-sdk 2 | Package.swift 3 | README.md 4 | Tests/Integration/Carthage/Cartfile 5 | Tests/Integration/CocoaPods/Podfile 6 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Mapbox Common SDK 2 | 3 | Copyright (c) 2021 - Mapbox, Inc. 4 | 5 | You may use this code with your Mapbox account and under the 6 | Mapbox Terms of Service (https://www.mapbox.com/tos/). 7 | 8 | All other rights reserved. 9 | 10 | =========================================================================== 11 | 12 | Mapbox Common SDK uses portions of cheap-ruler-cpp-internal 13 | 14 | ISC License 15 | 16 | Copyright (c) 2017, Mapbox 17 | 18 | Permission to use, copy, modify, and/or distribute this software for any purpose 19 | with or without fee is hereby granted, provided that the above copyright notice 20 | and this permission notice appear in all copies. 21 | 22 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 23 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 24 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 25 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 26 | OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 27 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 28 | THIS SOFTWARE. 29 | 30 | =========================================================================== 31 | 32 | Mapbox Common SDK uses portions of geojson-cpp-internal 33 | 34 | Copyright (c) 2016, Mapbox 35 | 36 | Permission to use, copy, modify, and/or distribute this software for any 37 | purpose with or without fee is hereby granted, provided that the above 38 | copyright notice and this permission notice appear in all copies. 39 | 40 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 41 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 42 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 43 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 44 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 45 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 46 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 47 | 48 | =========================================================================== 49 | 50 | Mapbox Common SDK uses portions of geometry-hpp-internal 51 | 52 | Copyright (c) 2016, Mapbox 53 | 54 | Permission to use, copy, modify, and/or distribute this software for any 55 | purpose with or without fee is hereby granted, provided that the above 56 | copyright notice and this permission notice appear in all copies. 57 | 58 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 59 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 60 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 61 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 62 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 63 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 64 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 65 | =========================================================================== 66 | 67 | Mapbox Common SDK uses portions of jni-hpp-internal 68 | 69 | Copyright © 2016, Mapbox 70 | 71 | Permission to use, copy, modify, and/or distribute this software for any 72 | purpose with or without fee is hereby granted, provided that the above 73 | copyright notice and this permission notice appear in all copies. 74 | 75 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 76 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 77 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 78 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 79 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 80 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 81 | PERFORMANCE OF THIS SOFTWARE. 82 | 83 | 84 | The above license excludes the files test/android/jni.h and test/openjdk/jni.h, which are 85 | included for testing purposes and covered by their respective copyrights and licenses. 86 | 87 | =========================================================================== 88 | 89 | Mapbox Common SDK uses portions of supercluster-hpp-internal 90 | 91 | Copyright (c) 2016, Mapbox 92 | 93 | Permission to use, copy, modify, and/or distribute this software for any 94 | purpose with or without fee is hereby granted, provided that the above 95 | copyright notice and this permission notice appear in all copies. 96 | 97 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 98 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 99 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 100 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 101 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 102 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 103 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 104 | 105 | =========================================================================== 106 | 107 | Mapbox Common SDK uses portions of Obfuscate 108 | 109 | This is free and unencumbered software released into the public domain. 110 | 111 | Anyone is free to copy, modify, publish, use, compile, sell, or 112 | distribute this software, either in source code form or as a compiled 113 | binary, for any purpose, commercial or non-commercial, and by any 114 | means. 115 | 116 | In jurisdictions that recognize copyright laws, the author or authors 117 | of this software dedicate any and all copyright interest in the 118 | software to the public domain. We make this dedication for the benefit 119 | of the public at large and to the detriment of our heirs and 120 | successors. We intend this dedication to be an overt act of 121 | relinquishment in perpetuity of all present and future rights to this 122 | software under copyright law. 123 | 124 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 125 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 126 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 127 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 128 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 129 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 130 | OTHER DEALINGS IN THE SOFTWARE. 131 | 132 | For more information, please refer to 133 | 134 | =========================================================================== 135 | 136 | Mapbox Common SDK uses portions of kdbush.hpp 137 | 138 | Copyright (c) 2016, Vladimir Agafonkin 139 | 140 | Permission to use, copy, modify, and/or distribute this software for any 141 | purpose with or without fee is hereby granted, provided that the above 142 | copyright notice and this permission notice appear in all copies. 143 | 144 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 145 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 146 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 147 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 148 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 149 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 150 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 151 | 152 | =========================================================================== 153 | 154 | Mapbox Common SDK uses portions of args 155 | 156 | Copyright (c) 2016-2017 Taylor C. Richberger and Pavel Belikov 157 | 158 | 159 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 160 | 161 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 162 | 163 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 164 | 165 | =========================================================================== 166 | 167 | Mapbox Common SDK uses portions of expected-lite 168 | 169 | Boost Software License - Version 1.0 - August 17th, 2003 170 | 171 | Permission is hereby granted, free of charge, to any person or organization 172 | obtaining a copy of the software and accompanying documentation covered by 173 | this license (the "Software") to use, reproduce, display, distribute, 174 | execute, and transmit the Software, and to prepare derivative works of the 175 | Software, and to permit third-parties to whom the Software is furnished to 176 | do so, all subject to the following: 177 | 178 | The copyright notices in the Software and this entire statement, including 179 | the above license grant, this restriction and the following disclaimer, 180 | must be included in all copies of the Software, in whole or in part, and 181 | all derivative works of the Software, unless such copies or derivative 182 | works are solely in the form of machine-executable object code generated by 183 | a source language processor. 184 | 185 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 186 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 187 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 188 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 189 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 190 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 191 | DEALINGS IN THE SOFTWARE. 192 | 193 | =========================================================================== 194 | 195 | Mapbox Common SDK uses portions of filesystem 196 | 197 | Copyright (c) 2018, Steffen Schümann 198 | 199 | Permission is hereby granted, free of charge, to any person obtaining a copy 200 | of this software and associated documentation files (the "Software"), to deal 201 | in the Software without restriction, including without limitation the rights 202 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 203 | copies of the Software, and to permit persons to whom the Software is 204 | furnished to do so, subject to the following conditions: 205 | 206 | The above copyright notice and this permission notice shall be included in all 207 | copies or substantial portions of the Software. 208 | 209 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 210 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 211 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 212 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 213 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 214 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 215 | SOFTWARE. 216 | 217 | =========================================================================== 218 | 219 | Mapbox Common SDK uses portions of pixelmatch-cpp 220 | 221 | Copyright (c) 2015, Mapbox 222 | 223 | Permission to use, copy, modify, and/or distribute this software for any purpose 224 | with or without fee is hereby granted, provided that the above copyright notice 225 | and this permission notice appear in all copies. 226 | 227 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 228 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 229 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 230 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 231 | OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 232 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 233 | THIS SOFTWARE. 234 | 235 | =========================================================================== 236 | 237 | Mapbox Common SDK uses portions of rapidjson 238 | 239 | Tencent is pleased to support the open source community by making RapidJSON available. 240 | 241 | Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. 242 | 243 | If you have downloaded a copy of the RapidJSON binary from Tencent, please note that the RapidJSON binary is licensed under the MIT License. 244 | If you have downloaded a copy of the RapidJSON source code from Tencent, please note that RapidJSON source code is licensed under the MIT License, except for the third-party components listed below which are subject to different license terms. Your integration of RapidJSON into your own projects may require compliance with the MIT License, as well as the other licenses applicable to the third-party components included within RapidJSON. To avoid the problematic JSON license in your own projects, it's sufficient to exclude the bin/jsonchecker/ directory, as it's the only code under the JSON license. 245 | A copy of the MIT License is included in this file. 246 | 247 | Other dependencies and licenses: 248 | 249 | Open Source Software Licensed Under the BSD License: 250 | -------------------------------------------------------------------- 251 | 252 | The msinttypes r29 253 | Copyright (c) 2006-2013 Alexander Chemeris 254 | All rights reserved. 255 | 256 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 257 | 258 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 259 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 260 | * Neither the name of copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 261 | 262 | THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 263 | 264 | Open Source Software Licensed Under the JSON License: 265 | -------------------------------------------------------------------- 266 | 267 | json.org 268 | Copyright (c) 2002 JSON.org 269 | All Rights Reserved. 270 | 271 | JSON_checker 272 | Copyright (c) 2002 JSON.org 273 | All Rights Reserved. 274 | 275 | 276 | Terms of the JSON License: 277 | --------------------------------------------------- 278 | 279 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 280 | 281 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 282 | 283 | The Software shall be used for Good, not Evil. 284 | 285 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 286 | 287 | 288 | Terms of the MIT License: 289 | -------------------------------------------------------------------- 290 | 291 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 292 | 293 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 294 | 295 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 296 | 297 | =========================================================================== 298 | 299 | Mapbox Common SDK uses portions of shelf-pack-cpp 300 | 301 | ISC License 302 | 303 | Copyright (c) 2017, Mapbox 304 | 305 | Permission to use, copy, modify, and/or distribute this software for any purpose 306 | with or without fee is hereby granted, provided that the above copyright notice 307 | and this permission notice appear in all copies. 308 | 309 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 310 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 311 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 312 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 313 | OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 314 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 315 | THIS SOFTWARE. 316 | 317 | =========================================================================== 318 | 319 | Mapbox Common SDK uses portions of asio 320 | 321 | Boost Software License - Version 1.0 - August 17th, 2003 322 | 323 | Permission is hereby granted, free of charge, to any person or organization 324 | obtaining a copy of the software and accompanying documentation covered by 325 | this license (the "Software") to use, reproduce, display, distribute, 326 | execute, and transmit the Software, and to prepare derivative works of the 327 | Software, and to permit third-parties to whom the Software is furnished to 328 | do so, all subject to the following: 329 | 330 | The copyright notices in the Software and this entire statement, including 331 | the above license grant, this restriction and the following disclaimer, 332 | must be included in all copies of the Software, in whole or in part, and 333 | all derivative works of the Software, unless such copies or derivative 334 | works are solely in the form of machine-executable object code generated by 335 | a source language processor. 336 | 337 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 338 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 339 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 340 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 341 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 342 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 343 | DEALINGS IN THE SOFTWARE. 344 | 345 | =========================================================================== 346 | 347 | Mapbox Common SDK uses portions of brotli 348 | 349 | Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. 350 | 351 | Permission is hereby granted, free of charge, to any person obtaining a copy 352 | of this software and associated documentation files (the "Software"), to deal 353 | in the Software without restriction, including without limitation the rights 354 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 355 | copies of the Software, and to permit persons to whom the Software is 356 | furnished to do so, subject to the following conditions: 357 | 358 | The above copyright notice and this permission notice shall be included in 359 | all copies or substantial portions of the Software. 360 | 361 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 362 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 363 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 364 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 365 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 366 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 367 | THE SOFTWARE. 368 | 369 | =========================================================================== 370 | 371 | Mapbox Common SDK uses portions of curl 372 | 373 | COPYRIGHT AND PERMISSION NOTICE 374 | 375 | Copyright (c) 1996 - 2023, Daniel Stenberg, , and many 376 | contributors, see the THANKS file. 377 | 378 | All rights reserved. 379 | 380 | Permission to use, copy, modify, and distribute this software for any purpose 381 | with or without fee is hereby granted, provided that the above copyright 382 | notice and this permission notice appear in all copies. 383 | 384 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 385 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 386 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN 387 | NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 388 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 389 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 390 | OR OTHER DEALINGS IN THE SOFTWARE. 391 | 392 | Except as contained in this notice, the name of a copyright holder shall not 393 | be used in advertising or otherwise to promote the sale, use or other dealings 394 | in this Software without prior written authorization of the copyright holder. 395 | 396 | =========================================================================== 397 | 398 | Mapbox Common SDK uses portions of cpp-httplib 399 | 400 | The MIT License (MIT) 401 | 402 | Copyright (c) 2017 yhirose 403 | 404 | Permission is hereby granted, free of charge, to any person obtaining a copy 405 | of this software and associated documentation files (the "Software"), to deal 406 | in the Software without restriction, including without limitation the rights 407 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 408 | copies of the Software, and to permit persons to whom the Software is 409 | furnished to do so, subject to the following conditions: 410 | 411 | The above copyright notice and this permission notice shall be included in all 412 | copies or substantial portions of the Software. 413 | 414 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 415 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 416 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 417 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 418 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 419 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 420 | SOFTWARE. 421 | 422 | 423 | =========================================================================== 424 | 425 | Mapbox Common SDK uses portions of date 426 | 427 | Copyright (c) 2015, 2016, 2017 Howard Hinnant 428 | Copyright (c) 2016 Adrian Colomitchi 429 | Copyright (c) 2017 Florian Dang 430 | Copyright (c) 2017 Paul Thompson 431 | Copyright (c) 2018, 2019 Tomasz Kamiński 432 | Copyright (c) 2019 Jiangang Zhuang 433 | 434 | Permission is hereby granted, free of charge, to any person obtaining a copy 435 | of this software and associated documentation files (the "Software"), to deal 436 | in the Software without restriction, including without limitation the rights 437 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 438 | copies of the Software, and to permit persons to whom the Software is 439 | furnished to do so, subject to the following conditions: 440 | 441 | The above copyright notice and this permission notice shall be included in all 442 | copies or substantial portions of the Software. 443 | 444 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 445 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 446 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 447 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 448 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 449 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 450 | SOFTWARE. 451 | 452 | =========================================================================== 453 | 454 | Mapbox Common SDK uses portions of fmt 455 | 456 | Copyright (c) 2012 - present, Victor Zverovich 457 | 458 | Permission is hereby granted, free of charge, to any person obtaining 459 | a copy of this software and associated documentation files (the 460 | "Software"), to deal in the Software without restriction, including 461 | without limitation the rights to use, copy, modify, merge, publish, 462 | distribute, sublicense, and/or sell copies of the Software, and to 463 | permit persons to whom the Software is furnished to do so, subject to 464 | the following conditions: 465 | 466 | The above copyright notice and this permission notice shall be 467 | included in all copies or substantial portions of the Software. 468 | 469 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 470 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 471 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 472 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 473 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 474 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 475 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 476 | 477 | --- Optional exception to the license --- 478 | 479 | As an exception, if, as a result of your compiling your source code, portions 480 | of this Software are embedded into a machine-executable object form of such 481 | source code, you may redistribute such embedded portions in such object form 482 | without including the above copyright and permission notices. 483 | 484 | =========================================================================== 485 | 486 | Mapbox Common SDK uses portions of gzip-hpp 487 | 488 | Copyright (c) 2017, Mapbox Inc. 489 | All rights reserved. 490 | 491 | Redistribution and use in source and binary forms, with or without 492 | modification, are permitted provided that the following conditions 493 | are met: 494 | 495 | - Redistributions of source code must retain the above copyright notice, 496 | this list of conditions and the following disclaimer. 497 | - Redistributions in binary form must reproduce the above copyright notice, 498 | this list of conditions and the following disclaimer in the documentation 499 | and/or other materials provided with the distribution. 500 | 501 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 502 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 503 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 504 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 505 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 506 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 507 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 508 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 509 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 510 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 511 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 512 | =========================================================================== 513 | 514 | Mapbox Common SDK uses portions of mapbox-license-checker 515 | 516 | Copyright (c) 2020 - Mapbox, Inc. 517 | 518 | You may use this code with your Mapbox account and under the 519 | Mapbox Terms of Service (https://www.mapbox.com/tos/). 520 | 521 | All other rights reserved. 522 | =========================================================================== 523 | 524 | Mapbox Common SDK uses portions of protozero 525 | 526 | protozero copyright (c) Mapbox. 527 | 528 | Redistribution and use in source and binary forms, with or without 529 | modification, are permitted provided that the following conditions are 530 | met: 531 | 532 | * Redistributions of source code must retain the above copyright 533 | notice, this list of conditions and the following disclaimer. 534 | * Redistributions in binary form must reproduce the above copyright 535 | notice, this list of conditions and the following disclaimer in 536 | the documentation and/or other materials provided with the 537 | distribution. 538 | 539 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 540 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 541 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 542 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 543 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 544 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 545 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 546 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 547 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 548 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 549 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 550 | 551 | =========================================================================== 552 | 553 | Mapbox Common SDK uses portions of wagyu 554 | 555 | Parts of the code in the Wagyu Library are derived from the version of the 556 | Clipper Library by Angus Johnson listed below. 557 | 558 | Author : Angus Johnson 559 | Version : 6.4.0 560 | Date : 2 July 2015 561 | Website : http://www.angusj.com 562 | 563 | Copyright for portions of the derived code in the Wagyu library are held 564 | by Angus Johnson, 2010-2015. Wagyu also includes portions of the Google C++ 565 | Testing Framework (Google Test) whose copyright is held by Google Inc. All 566 | other copyright for the Wagyu Library are held by Mapbox, 2016. This code is 567 | published in accordance with, and retains the same license as the Clipper 568 | Library by Angus Johnson. 569 | 570 | Copyright (c) 2010-2015, Angus Johnson 571 | Copyright (c) 2016-2020, Mapbox 572 | 573 | Permission is hereby granted, free of charge, to any person or organization 574 | obtaining a copy of the software and accompanying documentation covered by 575 | this license (the "Software") to use, reproduce, display, distribute, 576 | execute, and transmit the Software, and to prepare derivative works of the 577 | Software, and to permit third-parties to whom the Software is furnished to 578 | do so, all subject to the following: 579 | 580 | The copyright notices in the Software and this entire statement, including 581 | the above license grant, this restriction and the following disclaimer, 582 | must be included in all copies of the Software, in whole or in part, and 583 | all derivative works of the Software, unless such copies or derivative 584 | works are solely in the form of machine-executable object code generated by 585 | a source language processor. 586 | 587 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 588 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 589 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 590 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 591 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 592 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 593 | DEALINGS IN THE SOFTWARE. 594 | 595 | -------------------------------------------------------------------------- 596 | 597 | Wagyu includes portions of The Google C++ Testing Framework (Google Test) 598 | 599 | Copyright 2005, Google Inc. 600 | All rights reserved. 601 | 602 | Redistribution and use in source and binary forms, with or without 603 | modification, are permitted provided that the following conditions are 604 | met: 605 | 606 | * Redistributions of source code must retain the above copyright 607 | notice, this list of conditions and the following disclaimer. 608 | * Redistributions in binary form must reproduce the above 609 | copyright notice, this list of conditions and the following disclaimer 610 | in the documentation and/or other materials provided with the 611 | distribution. 612 | * Neither the name of Google Inc. nor the names of its 613 | contributors may be used to endorse or promote products derived from 614 | this software without specific prior written permission. 615 | 616 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 617 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 618 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 619 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 620 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 621 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 622 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 623 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 624 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 625 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 626 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 627 | 628 | =========================================================================== 629 | 630 | Mapbox Common SDK uses portions of perfetto 631 | 632 | Apache License 633 | Version 2.0, January 2004 634 | http://www.apache.org/licenses/ 635 | 636 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 637 | 638 | 1. Definitions. 639 | 640 | "License" shall mean the terms and conditions for use, reproduction, 641 | and distribution as defined by Sections 1 through 9 of this document. 642 | 643 | "Licensor" shall mean the copyright owner or entity authorized by 644 | the copyright owner that is granting the License. 645 | 646 | "Legal Entity" shall mean the union of the acting entity and all 647 | other entities that control, are controlled by, or are under common 648 | control with that entity. For the purposes of this definition, 649 | "control" means (i) the power, direct or indirect, to cause the 650 | direction or management of such entity, whether by contract or 651 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 652 | outstanding shares, or (iii) beneficial ownership of such entity. 653 | 654 | "You" (or "Your") shall mean an individual or Legal Entity 655 | exercising permissions granted by this License. 656 | 657 | "Source" form shall mean the preferred form for making modifications, 658 | including but not limited to software source code, documentation 659 | source, and configuration files. 660 | 661 | "Object" form shall mean any form resulting from mechanical 662 | transformation or translation of a Source form, including but 663 | not limited to compiled object code, generated documentation, 664 | and conversions to other media types. 665 | 666 | "Work" shall mean the work of authorship, whether in Source or 667 | Object form, made available under the License, as indicated by a 668 | copyright notice that is included in or attached to the work 669 | (an example is provided in the Appendix below). 670 | 671 | "Derivative Works" shall mean any work, whether in Source or Object 672 | form, that is based on (or derived from) the Work and for which the 673 | editorial revisions, annotations, elaborations, or other modifications 674 | represent, as a whole, an original work of authorship. For the purposes 675 | of this License, Derivative Works shall not include works that remain 676 | separable from, or merely link (or bind by name) to the interfaces of, 677 | the Work and Derivative Works thereof. 678 | 679 | "Contribution" shall mean any work of authorship, including 680 | the original version of the Work and any modifications or additions 681 | to that Work or Derivative Works thereof, that is intentionally 682 | submitted to Licensor for inclusion in the Work by the copyright owner 683 | or by an individual or Legal Entity authorized to submit on behalf of 684 | the copyright owner. For the purposes of this definition, "submitted" 685 | means any form of electronic, verbal, or written communication sent 686 | to the Licensor or its representatives, including but not limited to 687 | communication on electronic mailing lists, source code control systems, 688 | and issue tracking systems that are managed by, or on behalf of, the 689 | Licensor for the purpose of discussing and improving the Work, but 690 | excluding communication that is conspicuously marked or otherwise 691 | designated in writing by the copyright owner as "Not a Contribution." 692 | 693 | "Contributor" shall mean Licensor and any individual or Legal Entity 694 | on behalf of whom a Contribution has been received by Licensor and 695 | subsequently incorporated within the Work. 696 | 697 | 2. Grant of Copyright License. Subject to the terms and conditions of 698 | this License, each Contributor hereby grants to You a perpetual, 699 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 700 | copyright license to reproduce, prepare Derivative Works of, 701 | publicly display, publicly perform, sublicense, and distribute the 702 | Work and such Derivative Works in Source or Object form. 703 | 704 | 3. Grant of Patent License. Subject to the terms and conditions of 705 | this License, each Contributor hereby grants to You a perpetual, 706 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 707 | (except as stated in this section) patent license to make, have made, 708 | use, offer to sell, sell, import, and otherwise transfer the Work, 709 | where such license applies only to those patent claims licensable 710 | by such Contributor that are necessarily infringed by their 711 | Contribution(s) alone or by combination of their Contribution(s) 712 | with the Work to which such Contribution(s) was submitted. If You 713 | institute patent litigation against any entity (including a 714 | cross-claim or counterclaim in a lawsuit) alleging that the Work 715 | or a Contribution incorporated within the Work constitutes direct 716 | or contributory patent infringement, then any patent licenses 717 | granted to You under this License for that Work shall terminate 718 | as of the date such litigation is filed. 719 | 720 | 4. Redistribution. You may reproduce and distribute copies of the 721 | Work or Derivative Works thereof in any medium, with or without 722 | modifications, and in Source or Object form, provided that You 723 | meet the following conditions: 724 | 725 | (a) You must give any other recipients of the Work or 726 | Derivative Works a copy of this License; and 727 | 728 | (b) You must cause any modified files to carry prominent notices 729 | stating that You changed the files; and 730 | 731 | (c) You must retain, in the Source form of any Derivative Works 732 | that You distribute, all copyright, patent, trademark, and 733 | attribution notices from the Source form of the Work, 734 | excluding those notices that do not pertain to any part of 735 | the Derivative Works; and 736 | 737 | (d) If the Work includes a "NOTICE" text file as part of its 738 | distribution, then any Derivative Works that You distribute must 739 | include a readable copy of the attribution notices contained 740 | within such NOTICE file, excluding those notices that do not 741 | pertain to any part of the Derivative Works, in at least one 742 | of the following places: within a NOTICE text file distributed 743 | as part of the Derivative Works; within the Source form or 744 | documentation, if provided along with the Derivative Works; or, 745 | within a display generated by the Derivative Works, if and 746 | wherever such third-party notices normally appear. The contents 747 | of the NOTICE file are for informational purposes only and 748 | do not modify the License. You may add Your own attribution 749 | notices within Derivative Works that You distribute, alongside 750 | or as an addendum to the NOTICE text from the Work, provided 751 | that such additional attribution notices cannot be construed 752 | as modifying the License. 753 | 754 | You may add Your own copyright statement to Your modifications and 755 | may provide additional or different license terms and conditions 756 | for use, reproduction, or distribution of Your modifications, or 757 | for any such Derivative Works as a whole, provided Your use, 758 | reproduction, and distribution of the Work otherwise complies with 759 | the conditions stated in this License. 760 | 761 | 5. Submission of Contributions. Unless You explicitly state otherwise, 762 | any Contribution intentionally submitted for inclusion in the Work 763 | by You to the Licensor shall be under the terms and conditions of 764 | this License, without any additional terms or conditions. 765 | Notwithstanding the above, nothing herein shall supersede or modify 766 | the terms of any separate license agreement you may have executed 767 | with Licensor regarding such Contributions. 768 | 769 | 6. Trademarks. This License does not grant permission to use the trade 770 | names, trademarks, service marks, or product names of the Licensor, 771 | except as required for reasonable and customary use in describing the 772 | origin of the Work and reproducing the content of the NOTICE file. 773 | 774 | 7. Disclaimer of Warranty. Unless required by applicable law or 775 | agreed to in writing, Licensor provides the Work (and each 776 | Contributor provides its Contributions) on an "AS IS" BASIS, 777 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 778 | implied, including, without limitation, any warranties or conditions 779 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 780 | PARTICULAR PURPOSE. You are solely responsible for determining the 781 | appropriateness of using or redistributing the Work and assume any 782 | risks associated with Your exercise of permissions under this License. 783 | 784 | 8. Limitation of Liability. In no event and under no legal theory, 785 | whether in tort (including negligence), contract, or otherwise, 786 | unless required by applicable law (such as deliberate and grossly 787 | negligent acts) or agreed to in writing, shall any Contributor be 788 | liable to You for damages, including any direct, indirect, special, 789 | incidental, or consequential damages of any character arising as a 790 | result of this License or out of the use or inability to use the 791 | Work (including but not limited to damages for loss of goodwill, 792 | work stoppage, computer failure or malfunction, or any and all 793 | other commercial damages or losses), even if such Contributor 794 | has been advised of the possibility of such damages. 795 | 796 | 9. Accepting Warranty or Additional Liability. While redistributing 797 | the Work or Derivative Works thereof, You may choose to offer, 798 | and charge a fee for, acceptance of support, warranty, indemnity, 799 | or other liability obligations and/or rights consistent with this 800 | License. However, in accepting such obligations, You may act only 801 | on Your own behalf and on Your sole responsibility, not on behalf 802 | of any other Contributor, and only if You agree to indemnify, 803 | defend, and hold each Contributor harmless for any liability 804 | incurred by, or claims asserted against, such Contributor by reason 805 | of your accepting any such warranty or additional liability. 806 | 807 | END OF TERMS AND CONDITIONS 808 | 809 | Copyright (c) 2017, The Android Open Source Project 810 | 811 | Licensed under the Apache License, Version 2.0 (the "License"); 812 | you may not use this file except in compliance with the License. 813 | 814 | Unless required by applicable law or agreed to in writing, software 815 | distributed under the License is distributed on an "AS IS" BASIS, 816 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 817 | See the License for the specific language governing permissions and 818 | limitations under the License. 819 | 820 | 821 | 822 | =========================================================================== 823 | 824 | Mapbox Common SDK uses portions of eigen 825 | 826 | Eigen is primarily MPL2 licensed. See COPYING.MPL2 and these links: 827 | http://www.mozilla.org/MPL/2.0/ 828 | http://www.mozilla.org/MPL/2.0/FAQ.html 829 | 830 | Some files contain third-party code under BSD or LGPL licenses, whence the other 831 | COPYING.* files here. 832 | 833 | All the LGPL code is either LGPL 2.1-only, or LGPL 2.1-or-later. 834 | For this reason, the COPYING.LGPL file contains the LGPL 2.1 text. 835 | 836 | If you want to guarantee that the Eigen code that you are #including is licensed 837 | under the MPL2 and possibly more permissive licenses (like BSD), #define this 838 | preprocessor symbol: 839 | EIGEN_MPL2_ONLY 840 | For example, with most compilers, you could add this to your project CXXFLAGS: 841 | -DEIGEN_MPL2_ONLY 842 | This will cause a compilation error to be generated if you #include any code that is 843 | LGPL licensed. 844 | Mozilla Public License Version 2.0 845 | ================================== 846 | 847 | 1. Definitions 848 | -------------- 849 | 850 | 1.1. "Contributor" 851 | means each individual or legal entity that creates, contributes to 852 | the creation of, or owns Covered Software. 853 | 854 | 1.2. "Contributor Version" 855 | means the combination of the Contributions of others (if any) used 856 | by a Contributor and that particular Contributor's Contribution. 857 | 858 | 1.3. "Contribution" 859 | means Covered Software of a particular Contributor. 860 | 861 | 1.4. "Covered Software" 862 | means Source Code Form to which the initial Contributor has attached 863 | the notice in Exhibit A, the Executable Form of such Source Code 864 | Form, and Modifications of such Source Code Form, in each case 865 | including portions thereof. 866 | 867 | 1.5. "Incompatible With Secondary Licenses" 868 | means 869 | 870 | (a) that the initial Contributor has attached the notice described 871 | in Exhibit B to the Covered Software; or 872 | 873 | (b) that the Covered Software was made available under the terms of 874 | version 1.1 or earlier of the License, but not also under the 875 | terms of a Secondary License. 876 | 877 | 1.6. "Executable Form" 878 | means any form of the work other than Source Code Form. 879 | 880 | 1.7. "Larger Work" 881 | means a work that combines Covered Software with other material, in 882 | a separate file or files, that is not Covered Software. 883 | 884 | 1.8. "License" 885 | means this document. 886 | 887 | 1.9. "Licensable" 888 | means having the right to grant, to the maximum extent possible, 889 | whether at the time of the initial grant or subsequently, any and 890 | all of the rights conveyed by this License. 891 | 892 | 1.10. "Modifications" 893 | means any of the following: 894 | 895 | (a) any file in Source Code Form that results from an addition to, 896 | deletion from, or modification of the contents of Covered 897 | Software; or 898 | 899 | (b) any new file in Source Code Form that contains any Covered 900 | Software. 901 | 902 | 1.11. "Patent Claims" of a Contributor 903 | means any patent claim(s), including without limitation, method, 904 | process, and apparatus claims, in any patent Licensable by such 905 | Contributor that would be infringed, but for the grant of the 906 | License, by the making, using, selling, offering for sale, having 907 | made, import, or transfer of either its Contributions or its 908 | Contributor Version. 909 | 910 | 1.12. "Secondary License" 911 | means either the GNU General Public License, Version 2.0, the GNU 912 | Lesser General Public License, Version 2.1, the GNU Affero General 913 | Public License, Version 3.0, or any later versions of those 914 | licenses. 915 | 916 | 1.13. "Source Code Form" 917 | means the form of the work preferred for making modifications. 918 | 919 | 1.14. "You" (or "Your") 920 | means an individual or a legal entity exercising rights under this 921 | License. For legal entities, "You" includes any entity that 922 | controls, is controlled by, or is under common control with You. For 923 | purposes of this definition, "control" means (a) the power, direct 924 | or indirect, to cause the direction or management of such entity, 925 | whether by contract or otherwise, or (b) ownership of more than 926 | fifty percent (50%) of the outstanding shares or beneficial 927 | ownership of such entity. 928 | 929 | 2. License Grants and Conditions 930 | -------------------------------- 931 | 932 | 2.1. Grants 933 | 934 | Each Contributor hereby grants You a world-wide, royalty-free, 935 | non-exclusive license: 936 | 937 | (a) under intellectual property rights (other than patent or trademark) 938 | Licensable by such Contributor to use, reproduce, make available, 939 | modify, display, perform, distribute, and otherwise exploit its 940 | Contributions, either on an unmodified basis, with Modifications, or 941 | as part of a Larger Work; and 942 | 943 | (b) under Patent Claims of such Contributor to make, use, sell, offer 944 | for sale, have made, import, and otherwise transfer either its 945 | Contributions or its Contributor Version. 946 | 947 | 2.2. Effective Date 948 | 949 | The licenses granted in Section 2.1 with respect to any Contribution 950 | become effective for each Contribution on the date the Contributor first 951 | distributes such Contribution. 952 | 953 | 2.3. Limitations on Grant Scope 954 | 955 | The licenses granted in this Section 2 are the only rights granted under 956 | this License. No additional rights or licenses will be implied from the 957 | distribution or licensing of Covered Software under this License. 958 | Notwithstanding Section 2.1(b) above, no patent license is granted by a 959 | Contributor: 960 | 961 | (a) for any code that a Contributor has removed from Covered Software; 962 | or 963 | 964 | (b) for infringements caused by: (i) Your and any other third party's 965 | modifications of Covered Software, or (ii) the combination of its 966 | Contributions with other software (except as part of its Contributor 967 | Version); or 968 | 969 | (c) under Patent Claims infringed by Covered Software in the absence of 970 | its Contributions. 971 | 972 | This License does not grant any rights in the trademarks, service marks, 973 | or logos of any Contributor (except as may be necessary to comply with 974 | the notice requirements in Section 3.4). 975 | 976 | 2.4. Subsequent Licenses 977 | 978 | No Contributor makes additional grants as a result of Your choice to 979 | distribute the Covered Software under a subsequent version of this 980 | License (see Section 10.2) or under the terms of a Secondary License (if 981 | permitted under the terms of Section 3.3). 982 | 983 | 2.5. Representation 984 | 985 | Each Contributor represents that the Contributor believes its 986 | Contributions are its original creation(s) or it has sufficient rights 987 | to grant the rights to its Contributions conveyed by this License. 988 | 989 | 2.6. Fair Use 990 | 991 | This License is not intended to limit any rights You have under 992 | applicable copyright doctrines of fair use, fair dealing, or other 993 | equivalents. 994 | 995 | 2.7. Conditions 996 | 997 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted 998 | in Section 2.1. 999 | 1000 | 3. Responsibilities 1001 | ------------------- 1002 | 1003 | 3.1. Distribution of Source Form 1004 | 1005 | All distribution of Covered Software in Source Code Form, including any 1006 | Modifications that You create or to which You contribute, must be under 1007 | the terms of this License. You must inform recipients that the Source 1008 | Code Form of the Covered Software is governed by the terms of this 1009 | License, and how they can obtain a copy of this License. You may not 1010 | attempt to alter or restrict the recipients' rights in the Source Code 1011 | Form. 1012 | 1013 | 3.2. Distribution of Executable Form 1014 | 1015 | If You distribute Covered Software in Executable Form then: 1016 | 1017 | (a) such Covered Software must also be made available in Source Code 1018 | Form, as described in Section 3.1, and You must inform recipients of 1019 | the Executable Form how they can obtain a copy of such Source Code 1020 | Form by reasonable means in a timely manner, at a charge no more 1021 | than the cost of distribution to the recipient; and 1022 | 1023 | (b) You may distribute such Executable Form under the terms of this 1024 | License, or sublicense it under different terms, provided that the 1025 | license for the Executable Form does not attempt to limit or alter 1026 | the recipients' rights in the Source Code Form under this License. 1027 | 1028 | 3.3. Distribution of a Larger Work 1029 | 1030 | You may create and distribute a Larger Work under terms of Your choice, 1031 | provided that You also comply with the requirements of this License for 1032 | the Covered Software. If the Larger Work is a combination of Covered 1033 | Software with a work governed by one or more Secondary Licenses, and the 1034 | Covered Software is not Incompatible With Secondary Licenses, this 1035 | License permits You to additionally distribute such Covered Software 1036 | under the terms of such Secondary License(s), so that the recipient of 1037 | the Larger Work may, at their option, further distribute the Covered 1038 | Software under the terms of either this License or such Secondary 1039 | License(s). 1040 | 1041 | 3.4. Notices 1042 | 1043 | You may not remove or alter the substance of any license notices 1044 | (including copyright notices, patent notices, disclaimers of warranty, 1045 | or limitations of liability) contained within the Source Code Form of 1046 | the Covered Software, except that You may alter any license notices to 1047 | the extent required to remedy known factual inaccuracies. 1048 | 1049 | 3.5. Application of Additional Terms 1050 | 1051 | You may choose to offer, and to charge a fee for, warranty, support, 1052 | indemnity or liability obligations to one or more recipients of Covered 1053 | Software. However, You may do so only on Your own behalf, and not on 1054 | behalf of any Contributor. You must make it absolutely clear that any 1055 | such warranty, support, indemnity, or liability obligation is offered by 1056 | You alone, and You hereby agree to indemnify every Contributor for any 1057 | liability incurred by such Contributor as a result of warranty, support, 1058 | indemnity or liability terms You offer. You may include additional 1059 | disclaimers of warranty and limitations of liability specific to any 1060 | jurisdiction. 1061 | 1062 | 4. Inability to Comply Due to Statute or Regulation 1063 | --------------------------------------------------- 1064 | 1065 | If it is impossible for You to comply with any of the terms of this 1066 | License with respect to some or all of the Covered Software due to 1067 | statute, judicial order, or regulation then You must: (a) comply with 1068 | the terms of this License to the maximum extent possible; and (b) 1069 | describe the limitations and the code they affect. Such description must 1070 | be placed in a text file included with all distributions of the Covered 1071 | Software under this License. Except to the extent prohibited by statute 1072 | or regulation, such description must be sufficiently detailed for a 1073 | recipient of ordinary skill to be able to understand it. 1074 | 1075 | 5. Termination 1076 | -------------- 1077 | 1078 | 5.1. The rights granted under this License will terminate automatically 1079 | if You fail to comply with any of its terms. However, if You become 1080 | compliant, then the rights granted under this License from a particular 1081 | Contributor are reinstated (a) provisionally, unless and until such 1082 | Contributor explicitly and finally terminates Your grants, and (b) on an 1083 | ongoing basis, if such Contributor fails to notify You of the 1084 | non-compliance by some reasonable means prior to 60 days after You have 1085 | come back into compliance. Moreover, Your grants from a particular 1086 | Contributor are reinstated on an ongoing basis if such Contributor 1087 | notifies You of the non-compliance by some reasonable means, this is the 1088 | first time You have received notice of non-compliance with this License 1089 | from such Contributor, and You become compliant prior to 30 days after 1090 | Your receipt of the notice. 1091 | 1092 | 5.2. If You initiate litigation against any entity by asserting a patent 1093 | infringement claim (excluding declaratory judgment actions, 1094 | counter-claims, and cross-claims) alleging that a Contributor Version 1095 | directly or indirectly infringes any patent, then the rights granted to 1096 | You by any and all Contributors for the Covered Software under Section 1097 | 2.1 of this License shall terminate. 1098 | 1099 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all 1100 | end user license agreements (excluding distributors and resellers) which 1101 | have been validly granted by You or Your distributors under this License 1102 | prior to termination shall survive termination. 1103 | 1104 | ************************************************************************ 1105 | * * 1106 | * 6. Disclaimer of Warranty * 1107 | * ------------------------- * 1108 | * * 1109 | * Covered Software is provided under this License on an "as is" * 1110 | * basis, without warranty of any kind, either expressed, implied, or * 1111 | * statutory, including, without limitation, warranties that the * 1112 | * Covered Software is free of defects, merchantable, fit for a * 1113 | * particular purpose or non-infringing. The entire risk as to the * 1114 | * quality and performance of the Covered Software is with You. * 1115 | * Should any Covered Software prove defective in any respect, You * 1116 | * (not any Contributor) assume the cost of any necessary servicing, * 1117 | * repair, or correction. This disclaimer of warranty constitutes an * 1118 | * essential part of this License. No use of any Covered Software is * 1119 | * authorized under this License except under this disclaimer. * 1120 | * * 1121 | ************************************************************************ 1122 | 1123 | ************************************************************************ 1124 | * * 1125 | * 7. Limitation of Liability * 1126 | * -------------------------- * 1127 | * * 1128 | * Under no circumstances and under no legal theory, whether tort * 1129 | * (including negligence), contract, or otherwise, shall any * 1130 | * Contributor, or anyone who distributes Covered Software as * 1131 | * permitted above, be liable to You for any direct, indirect, * 1132 | * special, incidental, or consequential damages of any character * 1133 | * including, without limitation, damages for lost profits, loss of * 1134 | * goodwill, work stoppage, computer failure or malfunction, or any * 1135 | * and all other commercial damages or losses, even if such party * 1136 | * shall have been informed of the possibility of such damages. This * 1137 | * limitation of liability shall not apply to liability for death or * 1138 | * personal injury resulting from such party's negligence to the * 1139 | * extent applicable law prohibits such limitation. Some * 1140 | * jurisdictions do not allow the exclusion or limitation of * 1141 | * incidental or consequential damages, so this exclusion and * 1142 | * limitation may not apply to You. * 1143 | * * 1144 | ************************************************************************ 1145 | 1146 | 8. Litigation 1147 | ------------- 1148 | 1149 | Any litigation relating to this License may be brought only in the 1150 | courts of a jurisdiction where the defendant maintains its principal 1151 | place of business and such litigation shall be governed by laws of that 1152 | jurisdiction, without reference to its conflict-of-law provisions. 1153 | Nothing in this Section shall prevent a party's ability to bring 1154 | cross-claims or counter-claims. 1155 | 1156 | 9. Miscellaneous 1157 | ---------------- 1158 | 1159 | This License represents the complete agreement concerning the subject 1160 | matter hereof. If any provision of this License is held to be 1161 | unenforceable, such provision shall be reformed only to the extent 1162 | necessary to make it enforceable. Any law or regulation which provides 1163 | that the language of a contract shall be construed against the drafter 1164 | shall not be used to construe this License against a Contributor. 1165 | 1166 | 10. Versions of the License 1167 | --------------------------- 1168 | 1169 | 10.1. New Versions 1170 | 1171 | Mozilla Foundation is the license steward. Except as provided in Section 1172 | 10.3, no one other than the license steward has the right to modify or 1173 | publish new versions of this License. Each version will be given a 1174 | distinguishing version number. 1175 | 1176 | 10.2. Effect of New Versions 1177 | 1178 | You may distribute the Covered Software under the terms of the version 1179 | of the License under which You originally received the Covered Software, 1180 | or under the terms of any subsequent version published by the license 1181 | steward. 1182 | 1183 | 10.3. Modified Versions 1184 | 1185 | If you create software not governed by this License, and you want to 1186 | create a new license for such software, you may create and use a 1187 | modified version of this License if you rename the license and remove 1188 | any references to the name of the license steward (except to note that 1189 | such modified license differs from this License). 1190 | 1191 | 10.4. Distributing Source Code Form that is Incompatible With Secondary 1192 | Licenses 1193 | 1194 | If You choose to distribute Source Code Form that is Incompatible With 1195 | Secondary Licenses under the terms of this version of the License, the 1196 | notice described in Exhibit B of this License must be attached. 1197 | 1198 | Exhibit A - Source Code Form License Notice 1199 | ------------------------------------------- 1200 | 1201 | This Source Code Form is subject to the terms of the Mozilla Public 1202 | License, v. 2.0. If a copy of the MPL was not distributed with this 1203 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 1204 | 1205 | If it is not possible or desirable to put the notice in a particular 1206 | file, then You may include the notice in a location (such as a LICENSE 1207 | file in a relevant directory) where a recipient would be likely to look 1208 | for such a notice. 1209 | 1210 | You may add additional accurate notices of copyright ownership. 1211 | 1212 | Exhibit B - "Incompatible With Secondary Licenses" Notice 1213 | --------------------------------------------------------- 1214 | 1215 | This Source Code Form is "Incompatible With Secondary Licenses", as 1216 | defined by the Mozilla Public License, v. 2.0. 1217 | Minpack Copyright Notice (1999) University of Chicago. All rights reserved 1218 | 1219 | Redistribution and use in source and binary forms, with or 1220 | without modification, are permitted provided that the 1221 | following conditions are met: 1222 | 1223 | 1. Redistributions of source code must retain the above 1224 | copyright notice, this list of conditions and the following 1225 | disclaimer. 1226 | 1227 | 2. Redistributions in binary form must reproduce the above 1228 | copyright notice, this list of conditions and the following 1229 | disclaimer in the documentation and/or other materials 1230 | provided with the distribution. 1231 | 1232 | 3. The end-user documentation included with the 1233 | redistribution, if any, must include the following 1234 | acknowledgment: 1235 | 1236 | "This product includes software developed by the 1237 | University of Chicago, as Operator of Argonne National 1238 | Laboratory. 1239 | 1240 | Alternately, this acknowledgment may appear in the software 1241 | itself, if and wherever such third-party acknowledgments 1242 | normally appear. 1243 | 1244 | 4. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS" 1245 | WITHOUT WARRANTY OF ANY KIND. THE COPYRIGHT HOLDER, THE 1246 | UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND 1247 | THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR 1248 | IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES 1249 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE 1250 | OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY 1251 | OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR 1252 | USEFULNESS OF THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF 1253 | THE SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4) 1254 | DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION 1255 | UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL 1256 | BE CORRECTED. 1257 | 1258 | 5. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT 1259 | HOLDER, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF 1260 | ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT, 1261 | INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF 1262 | ANY KIND OR NATURE, INCLUDING BUT NOT LIMITED TO LOSS OF 1263 | PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, WHETHER 1264 | SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT 1265 | (INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, 1266 | EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE 1267 | POSSIBILITY OF SUCH LOSS OR DAMAGES. 1268 | /* 1269 | Copyright (c) 2011, Intel Corporation. All rights reserved. 1270 | 1271 | Redistribution and use in source and binary forms, with or without modification, 1272 | are permitted provided that the following conditions are met: 1273 | 1274 | * Redistributions of source code must retain the above copyright notice, this 1275 | list of conditions and the following disclaimer. 1276 | * Redistributions in binary form must reproduce the above copyright notice, 1277 | this list of conditions and the following disclaimer in the documentation 1278 | and/or other materials provided with the distribution. 1279 | * Neither the name of Intel Corporation nor the names of its contributors may 1280 | be used to endorse or promote products derived from this software without 1281 | specific prior written permission. 1282 | 1283 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 1284 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 1285 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 1286 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 1287 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 1288 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 1289 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 1290 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1291 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 1292 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1293 | */ 1294 | /* 1295 | Apache License 1296 | Version 2.0, January 2004 1297 | http://www.apache.org/licenses/ 1298 | 1299 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1300 | 1301 | 1. Definitions. 1302 | 1303 | "License" shall mean the terms and conditions for use, reproduction, 1304 | and distribution as defined by Sections 1 through 9 of this document. 1305 | 1306 | "Licensor" shall mean the copyright owner or entity authorized by 1307 | the copyright owner that is granting the License. 1308 | 1309 | "Legal Entity" shall mean the union of the acting entity and all 1310 | other entities that control, are controlled by, or are under common 1311 | control with that entity. For the purposes of this definition, 1312 | "control" means (i) the power, direct or indirect, to cause the 1313 | direction or management of such entity, whether by contract or 1314 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 1315 | outstanding shares, or (iii) beneficial ownership of such entity. 1316 | 1317 | "You" (or "Your") shall mean an individual or Legal Entity 1318 | exercising permissions granted by this License. 1319 | 1320 | "Source" form shall mean the preferred form for making modifications, 1321 | including but not limited to software source code, documentation 1322 | source, and configuration files. 1323 | 1324 | "Object" form shall mean any form resulting from mechanical 1325 | transformation or translation of a Source form, including but 1326 | not limited to compiled object code, generated documentation, 1327 | and conversions to other media types. 1328 | 1329 | "Work" shall mean the work of authorship, whether in Source or 1330 | Object form, made available under the License, as indicated by a 1331 | copyright notice that is included in or attached to the work 1332 | (an example is provided in the Appendix below). 1333 | 1334 | "Derivative Works" shall mean any work, whether in Source or Object 1335 | form, that is based on (or derived from) the Work and for which the 1336 | editorial revisions, annotations, elaborations, or other modifications 1337 | represent, as a whole, an original work of authorship. For the purposes 1338 | of this License, Derivative Works shall not include works that remain 1339 | separable from, or merely link (or bind by name) to the interfaces of, 1340 | the Work and Derivative Works thereof. 1341 | 1342 | "Contribution" shall mean any work of authorship, including 1343 | the original version of the Work and any modifications or additions 1344 | to that Work or Derivative Works thereof, that is intentionally 1345 | submitted to Licensor for inclusion in the Work by the copyright owner 1346 | or by an individual or Legal Entity authorized to submit on behalf of 1347 | the copyright owner. For the purposes of this definition, "submitted" 1348 | means any form of electronic, verbal, or written communication sent 1349 | to the Licensor or its representatives, including but not limited to 1350 | communication on electronic mailing lists, source code control systems, 1351 | and issue tracking systems that are managed by, or on behalf of, the 1352 | Licensor for the purpose of discussing and improving the Work, but 1353 | excluding communication that is conspicuously marked or otherwise 1354 | designated in writing by the copyright owner as "Not a Contribution." 1355 | 1356 | "Contributor" shall mean Licensor and any individual or Legal Entity 1357 | on behalf of whom a Contribution has been received by Licensor and 1358 | subsequently incorporated within the Work. 1359 | 1360 | 2. Grant of Copyright License. Subject to the terms and conditions of 1361 | this License, each Contributor hereby grants to You a perpetual, 1362 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 1363 | copyright license to reproduce, prepare Derivative Works of, 1364 | publicly display, publicly perform, sublicense, and distribute the 1365 | Work and such Derivative Works in Source or Object form. 1366 | 1367 | 3. Grant of Patent License. Subject to the terms and conditions of 1368 | this License, each Contributor hereby grants to You a perpetual, 1369 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 1370 | (except as stated in this section) patent license to make, have made, 1371 | use, offer to sell, sell, import, and otherwise transfer the Work, 1372 | where such license applies only to those patent claims licensable 1373 | by such Contributor that are necessarily infringed by their 1374 | Contribution(s) alone or by combination of their Contribution(s) 1375 | with the Work to which such Contribution(s) was submitted. If You 1376 | institute patent litigation against any entity (including a 1377 | cross-claim or counterclaim in a lawsuit) alleging that the Work 1378 | or a Contribution incorporated within the Work constitutes direct 1379 | or contributory patent infringement, then any patent licenses 1380 | granted to You under this License for that Work shall terminate 1381 | as of the date such litigation is filed. 1382 | 1383 | 4. Redistribution. You may reproduce and distribute copies of the 1384 | Work or Derivative Works thereof in any medium, with or without 1385 | modifications, and in Source or Object form, provided that You 1386 | meet the following conditions: 1387 | 1388 | (a) You must give any other recipients of the Work or 1389 | Derivative Works a copy of this License; and 1390 | 1391 | (b) You must cause any modified files to carry prominent notices 1392 | stating that You changed the files; and 1393 | 1394 | (c) You must retain, in the Source form of any Derivative Works 1395 | that You distribute, all copyright, patent, trademark, and 1396 | attribution notices from the Source form of the Work, 1397 | excluding those notices that do not pertain to any part of 1398 | the Derivative Works; and 1399 | 1400 | (d) If the Work includes a "NOTICE" text file as part of its 1401 | distribution, then any Derivative Works that You distribute must 1402 | include a readable copy of the attribution notices contained 1403 | within such NOTICE file, excluding those notices that do not 1404 | pertain to any part of the Derivative Works, in at least one 1405 | of the following places: within a NOTICE text file distributed 1406 | as part of the Derivative Works; within the Source form or 1407 | documentation, if provided along with the Derivative Works; or, 1408 | within a display generated by the Derivative Works, if and 1409 | wherever such third-party notices normally appear. The contents 1410 | of the NOTICE file are for informational purposes only and 1411 | do not modify the License. You may add Your own attribution 1412 | notices within Derivative Works that You distribute, alongside 1413 | or as an addendum to the NOTICE text from the Work, provided 1414 | that such additional attribution notices cannot be construed 1415 | as modifying the License. 1416 | 1417 | You may add Your own copyright statement to Your modifications and 1418 | may provide additional or different license terms and conditions 1419 | for use, reproduction, or distribution of Your modifications, or 1420 | for any such Derivative Works as a whole, provided Your use, 1421 | reproduction, and distribution of the Work otherwise complies with 1422 | the conditions stated in this License. 1423 | 1424 | 5. Submission of Contributions. Unless You explicitly state otherwise, 1425 | any Contribution intentionally submitted for inclusion in the Work 1426 | by You to the Licensor shall be under the terms and conditions of 1427 | this License, without any additional terms or conditions. 1428 | Notwithstanding the above, nothing herein shall supersede or modify 1429 | the terms of any separate license agreement you may have executed 1430 | with Licensor regarding such Contributions. 1431 | 1432 | 6. Trademarks. This License does not grant permission to use the trade 1433 | names, trademarks, service marks, or product names of the Licensor, 1434 | except as required for reasonable and customary use in describing the 1435 | origin of the Work and reproducing the content of the NOTICE file. 1436 | 1437 | 7. Disclaimer of Warranty. Unless required by applicable law or 1438 | agreed to in writing, Licensor provides the Work (and each 1439 | Contributor provides its Contributions) on an "AS IS" BASIS, 1440 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 1441 | implied, including, without limitation, any warranties or conditions 1442 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 1443 | PARTICULAR PURPOSE. You are solely responsible for determining the 1444 | appropriateness of using or redistributing the Work and assume any 1445 | risks associated with Your exercise of permissions under this License. 1446 | 1447 | 8. Limitation of Liability. In no event and under no legal theory, 1448 | whether in tort (including negligence), contract, or otherwise, 1449 | unless required by applicable law (such as deliberate and grossly 1450 | negligent acts) or agreed to in writing, shall any Contributor be 1451 | liable to You for damages, including any direct, indirect, special, 1452 | incidental, or consequential damages of any character arising as a 1453 | result of this License or out of the use or inability to use the 1454 | Work (including but not limited to damages for loss of goodwill, 1455 | work stoppage, computer failure or malfunction, or any and all 1456 | other commercial damages or losses), even if such Contributor 1457 | has been advised of the possibility of such damages. 1458 | 1459 | 9. Accepting Warranty or Additional Liability. While redistributing 1460 | the Work or Derivative Works thereof, You may choose to offer, 1461 | and charge a fee for, acceptance of support, warranty, indemnity, 1462 | or other liability obligations and/or rights consistent with this 1463 | License. However, in accepting such obligations, You may act only 1464 | on Your own behalf and on Your sole responsibility, not on behalf 1465 | of any other Contributor, and only if You agree to indemnify, 1466 | defend, and hold each Contributor harmless for any liability 1467 | incurred by, or claims asserted against, such Contributor by reason 1468 | of your accepting any such warranty or additional liability. 1469 | 1470 | END OF TERMS AND CONDITIONS 1471 | 1472 | APPENDIX: How to apply the Apache License to your work. 1473 | 1474 | To apply the Apache License to your work, attach the following 1475 | boilerplate notice, with the fields enclosed by brackets "[]" 1476 | replaced with your own identifying information. (Don't include 1477 | the brackets!) The text should be enclosed in the appropriate 1478 | comment syntax for the file format. We also recommend that a 1479 | file or class name and description of purpose be included on the 1480 | same "printed page" as the copyright notice for easier 1481 | identification within third-party archives. 1482 | 1483 | Copyright [yyyy] [name of copyright owner] 1484 | 1485 | Licensed under the Apache License, Version 2.0 (the "License"); 1486 | you may not use this file except in compliance with the License. 1487 | You may obtain a copy of the License at 1488 | 1489 | http://www.apache.org/licenses/LICENSE-2.0 1490 | 1491 | Unless required by applicable law or agreed to in writing, software 1492 | distributed under the License is distributed on an "AS IS" BASIS, 1493 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1494 | See the License for the specific language governing permissions and 1495 | limitations under the License. 1496 | */ 1497 | =========================================================================== 1498 | 1499 | Mapbox Common SDK uses portions of flatbuffers 1500 | 1501 | 1502 | Apache License 1503 | Version 2.0, January 2004 1504 | http://www.apache.org/licenses/ 1505 | 1506 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1507 | 1508 | 1. Definitions. 1509 | 1510 | "License" shall mean the terms and conditions for use, reproduction, 1511 | and distribution as defined by Sections 1 through 9 of this document. 1512 | 1513 | "Licensor" shall mean the copyright owner or entity authorized by 1514 | the copyright owner that is granting the License. 1515 | 1516 | "Legal Entity" shall mean the union of the acting entity and all 1517 | other entities that control, are controlled by, or are under common 1518 | control with that entity. For the purposes of this definition, 1519 | "control" means (i) the power, direct or indirect, to cause the 1520 | direction or management of such entity, whether by contract or 1521 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 1522 | outstanding shares, or (iii) beneficial ownership of such entity. 1523 | 1524 | "You" (or "Your") shall mean an individual or Legal Entity 1525 | exercising permissions granted by this License. 1526 | 1527 | "Source" form shall mean the preferred form for making modifications, 1528 | including but not limited to software source code, documentation 1529 | source, and configuration files. 1530 | 1531 | "Object" form shall mean any form resulting from mechanical 1532 | transformation or translation of a Source form, including but 1533 | not limited to compiled object code, generated documentation, 1534 | and conversions to other media types. 1535 | 1536 | "Work" shall mean the work of authorship, whether in Source or 1537 | Object form, made available under the License, as indicated by a 1538 | copyright notice that is included in or attached to the work 1539 | (an example is provided in the Appendix below). 1540 | 1541 | "Derivative Works" shall mean any work, whether in Source or Object 1542 | form, that is based on (or derived from) the Work and for which the 1543 | editorial revisions, annotations, elaborations, or other modifications 1544 | represent, as a whole, an original work of authorship. For the purposes 1545 | of this License, Derivative Works shall not include works that remain 1546 | separable from, or merely link (or bind by name) to the interfaces of, 1547 | the Work and Derivative Works thereof. 1548 | 1549 | "Contribution" shall mean any work of authorship, including 1550 | the original version of the Work and any modifications or additions 1551 | to that Work or Derivative Works thereof, that is intentionally 1552 | submitted to Licensor for inclusion in the Work by the copyright owner 1553 | or by an individual or Legal Entity authorized to submit on behalf of 1554 | the copyright owner. For the purposes of this definition, "submitted" 1555 | means any form of electronic, verbal, or written communication sent 1556 | to the Licensor or its representatives, including but not limited to 1557 | communication on electronic mailing lists, source code control systems, 1558 | and issue tracking systems that are managed by, or on behalf of, the 1559 | Licensor for the purpose of discussing and improving the Work, but 1560 | excluding communication that is conspicuously marked or otherwise 1561 | designated in writing by the copyright owner as "Not a Contribution." 1562 | 1563 | "Contributor" shall mean Licensor and any individual or Legal Entity 1564 | on behalf of whom a Contribution has been received by Licensor and 1565 | subsequently incorporated within the Work. 1566 | 1567 | 2. Grant of Copyright License. Subject to the terms and conditions of 1568 | this License, each Contributor hereby grants to You a perpetual, 1569 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 1570 | copyright license to reproduce, prepare Derivative Works of, 1571 | publicly display, publicly perform, sublicense, and distribute the 1572 | Work and such Derivative Works in Source or Object form. 1573 | 1574 | 3. Grant of Patent License. Subject to the terms and conditions of 1575 | this License, each Contributor hereby grants to You a perpetual, 1576 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 1577 | (except as stated in this section) patent license to make, have made, 1578 | use, offer to sell, sell, import, and otherwise transfer the Work, 1579 | where such license applies only to those patent claims licensable 1580 | by such Contributor that are necessarily infringed by their 1581 | Contribution(s) alone or by combination of their Contribution(s) 1582 | with the Work to which such Contribution(s) was submitted. If You 1583 | institute patent litigation against any entity (including a 1584 | cross-claim or counterclaim in a lawsuit) alleging that the Work 1585 | or a Contribution incorporated within the Work constitutes direct 1586 | or contributory patent infringement, then any patent licenses 1587 | granted to You under this License for that Work shall terminate 1588 | as of the date such litigation is filed. 1589 | 1590 | 4. Redistribution. You may reproduce and distribute copies of the 1591 | Work or Derivative Works thereof in any medium, with or without 1592 | modifications, and in Source or Object form, provided that You 1593 | meet the following conditions: 1594 | 1595 | (a) You must give any other recipients of the Work or 1596 | Derivative Works a copy of this License; and 1597 | 1598 | (b) You must cause any modified files to carry prominent notices 1599 | stating that You changed the files; and 1600 | 1601 | (c) You must retain, in the Source form of any Derivative Works 1602 | that You distribute, all copyright, patent, trademark, and 1603 | attribution notices from the Source form of the Work, 1604 | excluding those notices that do not pertain to any part of 1605 | the Derivative Works; and 1606 | 1607 | (d) If the Work includes a "NOTICE" text file as part of its 1608 | distribution, then any Derivative Works that You distribute must 1609 | include a readable copy of the attribution notices contained 1610 | within such NOTICE file, excluding those notices that do not 1611 | pertain to any part of the Derivative Works, in at least one 1612 | of the following places: within a NOTICE text file distributed 1613 | as part of the Derivative Works; within the Source form or 1614 | documentation, if provided along with the Derivative Works; or, 1615 | within a display generated by the Derivative Works, if and 1616 | wherever such third-party notices normally appear. The contents 1617 | of the NOTICE file are for informational purposes only and 1618 | do not modify the License. You may add Your own attribution 1619 | notices within Derivative Works that You distribute, alongside 1620 | or as an addendum to the NOTICE text from the Work, provided 1621 | that such additional attribution notices cannot be construed 1622 | as modifying the License. 1623 | 1624 | You may add Your own copyright statement to Your modifications and 1625 | may provide additional or different license terms and conditions 1626 | for use, reproduction, or distribution of Your modifications, or 1627 | for any such Derivative Works as a whole, provided Your use, 1628 | reproduction, and distribution of the Work otherwise complies with 1629 | the conditions stated in this License. 1630 | 1631 | 5. Submission of Contributions. Unless You explicitly state otherwise, 1632 | any Contribution intentionally submitted for inclusion in the Work 1633 | by You to the Licensor shall be under the terms and conditions of 1634 | this License, without any additional terms or conditions. 1635 | Notwithstanding the above, nothing herein shall supersede or modify 1636 | the terms of any separate license agreement you may have executed 1637 | with Licensor regarding such Contributions. 1638 | 1639 | 6. Trademarks. This License does not grant permission to use the trade 1640 | names, trademarks, service marks, or product names of the Licensor, 1641 | except as required for reasonable and customary use in describing the 1642 | origin of the Work and reproducing the content of the NOTICE file. 1643 | 1644 | 7. Disclaimer of Warranty. Unless required by applicable law or 1645 | agreed to in writing, Licensor provides the Work (and each 1646 | Contributor provides its Contributions) on an "AS IS" BASIS, 1647 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 1648 | implied, including, without limitation, any warranties or conditions 1649 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 1650 | PARTICULAR PURPOSE. You are solely responsible for determining the 1651 | appropriateness of using or redistributing the Work and assume any 1652 | risks associated with Your exercise of permissions under this License. 1653 | 1654 | 8. Limitation of Liability. In no event and under no legal theory, 1655 | whether in tort (including negligence), contract, or otherwise, 1656 | unless required by applicable law (such as deliberate and grossly 1657 | negligent acts) or agreed to in writing, shall any Contributor be 1658 | liable to You for damages, including any direct, indirect, special, 1659 | incidental, or consequential damages of any character arising as a 1660 | result of this License or out of the use or inability to use the 1661 | Work (including but not limited to damages for loss of goodwill, 1662 | work stoppage, computer failure or malfunction, or any and all 1663 | other commercial damages or losses), even if such Contributor 1664 | has been advised of the possibility of such damages. 1665 | 1666 | 9. Accepting Warranty or Additional Liability. While redistributing 1667 | the Work or Derivative Works thereof, You may choose to offer, 1668 | and charge a fee for, acceptance of support, warranty, indemnity, 1669 | or other liability obligations and/or rights consistent with this 1670 | License. However, in accepting such obligations, You may act only 1671 | on Your own behalf and on Your sole responsibility, not on behalf 1672 | of any other Contributor, and only if You agree to indemnify, 1673 | defend, and hold each Contributor harmless for any liability 1674 | incurred by, or claims asserted against, such Contributor by reason 1675 | of your accepting any such warranty or additional liability. 1676 | 1677 | END OF TERMS AND CONDITIONS 1678 | 1679 | APPENDIX: How to apply the Apache License to your work. 1680 | 1681 | To apply the Apache License to your work, attach the following 1682 | boilerplate notice, with the fields enclosed by brackets "[]" 1683 | replaced with your own identifying information. (Don't include 1684 | the brackets!) The text should be enclosed in the appropriate 1685 | comment syntax for the file format. We also recommend that a 1686 | file or class name and description of purpose be included on the 1687 | same "printed page" as the copyright notice for easier 1688 | identification within third-party archives. 1689 | 1690 | Copyright [yyyy] [name of copyright owner] 1691 | 1692 | Licensed under the Apache License, Version 2.0 (the "License"); 1693 | you may not use this file except in compliance with the License. 1694 | You may obtain a copy of the License at 1695 | 1696 | http://www.apache.org/licenses/LICENSE-2.0 1697 | 1698 | Unless required by applicable law or agreed to in writing, software 1699 | distributed under the License is distributed on an "AS IS" BASIS, 1700 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1701 | See the License for the specific language governing permissions and 1702 | limitations under the License. 1703 | 1704 | =========================================================================== 1705 | 1706 | Mapbox Common SDK uses portions of linalg 1707 | 1708 | This is free and unencumbered software released into the public domain. 1709 | 1710 | Anyone is free to copy, modify, publish, use, compile, sell, or 1711 | distribute this software, either in source code form or as a compiled 1712 | binary, for any purpose, commercial or non-commercial, and by any 1713 | means. 1714 | 1715 | In jurisdictions that recognize copyright laws, the author or authors 1716 | of this software dedicate any and all copyright interest in the 1717 | software to the public domain. We make this dedication for the benefit 1718 | of the public at large and to the detriment of our heirs and 1719 | successors. We intend this dedication to be an overt act of 1720 | relinquishment in perpetuity of all present and future rights to this 1721 | software under copyright law. 1722 | 1723 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 1724 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1725 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1726 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 1727 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1728 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1729 | OTHER DEALINGS IN THE SOFTWARE. 1730 | 1731 | For more information, please refer to 1732 | =========================================================================== 1733 | 1734 | Mapbox Common SDK uses portions of mapbox-adas-data 1735 | 1736 | Copyright © 2021 Mapbox, Inc. 1737 | Unauthorized copying of this source code, via any medium is strictly prohibited. 1738 | Proprietary and confidential. 1739 | 1740 | Use of any work based on a compiled binary form of this source code is governed by Mapbox Terms of Service (available at: https://www.mapbox.com/tos/). 1741 | All other rights reserved. 1742 | 1743 | =========================================================================== 1744 | 1745 | Mapbox Common SDK uses portions of mapbox-navigation-hd-data 1746 | 1747 | Copyright © 2024 Mapbox, Inc. Unauthorized copying of this source code, via any medium is strictly prohibited. Proprietary and confidential. 1748 | 1749 | Use of any work based on a compiled binary form of this source code is governed by Mapbox Terms of Service (available at: https://www.mapbox.com/tos/). All other rights reserved. 1750 | 1751 | =========================================================================== 1752 | 1753 | Mapbox Common SDK uses portions of protobuf 1754 | 1755 | Copyright 2008 Google Inc. All rights reserved. 1756 | 1757 | Redistribution and use in source and binary forms, with or without 1758 | modification, are permitted provided that the following conditions are 1759 | met: 1760 | 1761 | * Redistributions of source code must retain the above copyright 1762 | notice, this list of conditions and the following disclaimer. 1763 | * Redistributions in binary form must reproduce the above 1764 | copyright notice, this list of conditions and the following disclaimer 1765 | in the documentation and/or other materials provided with the 1766 | distribution. 1767 | * Neither the name of Google Inc. nor the names of its 1768 | contributors may be used to endorse or promote products derived from 1769 | this software without specific prior written permission. 1770 | 1771 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1772 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1773 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1774 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1775 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1776 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1777 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1778 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1779 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1780 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1781 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1782 | 1783 | Code generated by the Protocol Buffer compiler is owned by the owner 1784 | of the input file used when generating it. This code is not 1785 | standalone and requires a support library to be linked with it. This 1786 | support library is itself covered by the above license. 1787 | 1788 | =========================================================================== 1789 | 1790 | Mapbox Common SDK uses portions of valhalla-internal 1791 | 1792 | The MIT License (MIT) 1793 | 1794 | Copyright (c) 2019-2020 Mapbox, Valhalla contributors 1795 | Copyright (c) 2018-2019 Valhalla contributors 1796 | Copyright (c) 2015-2017 Mapillary AB, Mapzen 1797 | 1798 | Permission is hereby granted, free of charge, to any person obtaining a copy 1799 | of this software and associated documentation files (the "Software"), to deal 1800 | in the Software without restriction, including without limitation the rights 1801 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 1802 | copies of the Software, and to permit persons to whom the Software is 1803 | furnished to do so, subject to the following conditions: 1804 | 1805 | The above copyright notice and this permission notice shall be included in 1806 | all copies or substantial portions of the Software. 1807 | 1808 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1809 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1810 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1811 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1812 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 1813 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 1814 | THE SOFTWARE. 1815 | 1816 | =========================================================================== 1817 | 1818 | Mapbox Common SDK uses portions of network-uri 1819 | 1820 | Boost Software License - Version 1.0 - August 17th, 2003 1821 | 1822 | Permission is hereby granted, free of charge, to any person or organization 1823 | obtaining a copy of the software and accompanying documentation covered by 1824 | this license (the "Software") to use, reproduce, display, distribute, 1825 | execute, and transmit the Software, and to prepare derivative works of the 1826 | Software, and to permit third-parties to whom the Software is furnished to 1827 | do so, all subject to the following: 1828 | 1829 | The copyright notices in the Software and this entire statement, including 1830 | the above license grant, this restriction and the following disclaimer, 1831 | must be included in all copies of the Software, in whole or in part, and 1832 | all derivative works of the Software, unless such copies or derivative 1833 | works are solely in the form of machine-executable object code generated by 1834 | a source language processor. 1835 | 1836 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1837 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1838 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 1839 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 1840 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 1841 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1842 | DEALINGS IN THE SOFTWARE. 1843 | 1844 | =========================================================================== 1845 | 1846 | Mapbox Common SDK uses portions of Clipper2 1847 | 1848 | Boost Software License - Version 1.0 - August 17th, 2003 1849 | 1850 | Permission is hereby granted, free of charge, to any person or organization 1851 | obtaining a copy of the software and accompanying documentation covered by 1852 | this license (the "Software") to use, reproduce, display, distribute, 1853 | execute, and transmit the Software, and to prepare derivative works of the 1854 | Software, and to permit third-parties to whom the Software is furnished to 1855 | do so, all subject to the following: 1856 | 1857 | The copyright notices in the Software and this entire statement, including 1858 | the above license grant, this restriction and the following disclaimer, 1859 | must be included in all copies of the Software, in whole or in part, and 1860 | all derivative works of the Software, unless such copies or derivative 1861 | works are solely in the form of machine-executable object code generated by 1862 | a source language processor. 1863 | 1864 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1865 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1866 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 1867 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 1868 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 1869 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1870 | DEALINGS IN THE SOFTWARE. 1871 | 1872 | =========================================================================== 1873 | 1874 | Mapbox Common SDK uses portions of geographiclib 1875 | 1876 | The MIT License (MIT). 1877 | 1878 | Copyright (c) 2008-2023, Charles Karney 1879 | 1880 | Permission is hereby granted, free of charge, to any person 1881 | obtaining a copy of this software and associated documentation 1882 | files (the "Software"), to deal in the Software without 1883 | restriction, including without limitation the rights to use, copy, 1884 | modify, merge, publish, distribute, sublicense, and/or sell copies 1885 | of the Software, and to permit persons to whom the Software is 1886 | furnished to do so, subject to the following conditions: 1887 | 1888 | The above copyright notice and this permission notice shall be 1889 | included in all copies or substantial portions of the Software. 1890 | 1891 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 1892 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1893 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 1894 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 1895 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 1896 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 1897 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1898 | DEALINGS IN THE SOFTWARE. 1899 | 1900 | =========================================================================== 1901 | 1902 | Mapbox Common SDK uses portions of gzip-hpp 1903 | 1904 | Copyright (c) 2017, Mapbox Inc. 1905 | All rights reserved. 1906 | 1907 | Redistribution and use in source and binary forms, with or without 1908 | modification, are permitted provided that the following conditions 1909 | are met: 1910 | 1911 | - Redistributions of source code must retain the above copyright notice, 1912 | this list of conditions and the following disclaimer. 1913 | - Redistributions in binary form must reproduce the above copyright notice, 1914 | this list of conditions and the following disclaimer in the documentation 1915 | and/or other materials provided with the distribution. 1916 | 1917 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1918 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1919 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1920 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1921 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1922 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 1923 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 1924 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 1925 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 1926 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 1927 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1928 | =========================================================================== 1929 | 1930 | Mapbox Common SDK uses portions of minimp3 1931 | 1932 | CC0 1.0 Universal 1933 | 1934 | Statement of Purpose 1935 | 1936 | The laws of most jurisdictions throughout the world automatically confer 1937 | exclusive Copyright and Related Rights (defined below) upon the creator and 1938 | subsequent owner(s) (each and all, an "owner") of an original work of 1939 | authorship and/or a database (each, a "Work"). 1940 | 1941 | Certain owners wish to permanently relinquish those rights to a Work for the 1942 | purpose of contributing to a commons of creative, cultural and scientific 1943 | works ("Commons") that the public can reliably and without fear of later 1944 | claims of infringement build upon, modify, incorporate in other works, reuse 1945 | and redistribute as freely as possible in any form whatsoever and for any 1946 | purposes, including without limitation commercial purposes. These owners may 1947 | contribute to the Commons to promote the ideal of a free culture and the 1948 | further production of creative, cultural and scientific works, or to gain 1949 | reputation or greater distribution for their Work in part through the use and 1950 | efforts of others. 1951 | 1952 | For these and/or other purposes and motivations, and without any expectation 1953 | of additional consideration or compensation, the person associating CC0 with a 1954 | Work (the "Affirmer"), to the extent that he or she is an owner of Copyright 1955 | and Related Rights in the Work, voluntarily elects to apply CC0 to the Work 1956 | and publicly distribute the Work under its terms, with knowledge of his or her 1957 | Copyright and Related Rights in the Work and the meaning and intended legal 1958 | effect of CC0 on those rights. 1959 | 1960 | 1. Copyright and Related Rights. A Work made available under CC0 may be 1961 | protected by copyright and related or neighboring rights ("Copyright and 1962 | Related Rights"). Copyright and Related Rights include, but are not limited 1963 | to, the following: 1964 | 1965 | i. the right to reproduce, adapt, distribute, perform, display, communicate, 1966 | and translate a Work; 1967 | 1968 | ii. moral rights retained by the original author(s) and/or performer(s); 1969 | 1970 | iii. publicity and privacy rights pertaining to a person's image or likeness 1971 | depicted in a Work; 1972 | 1973 | iv. rights protecting against unfair competition in regards to a Work, 1974 | subject to the limitations in paragraph 4(a), below; 1975 | 1976 | v. rights protecting the extraction, dissemination, use and reuse of data in 1977 | a Work; 1978 | 1979 | vi. database rights (such as those arising under Directive 96/9/EC of the 1980 | European Parliament and of the Council of 11 March 1996 on the legal 1981 | protection of databases, and under any national implementation thereof, 1982 | including any amended or successor version of such directive); and 1983 | 1984 | vii. other similar, equivalent or corresponding rights throughout the world 1985 | based on applicable law or treaty, and any national implementations thereof. 1986 | 1987 | 2. Waiver. To the greatest extent permitted by, but not in contravention of, 1988 | applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and 1989 | unconditionally waives, abandons, and surrenders all of Affirmer's Copyright 1990 | and Related Rights and associated claims and causes of action, whether now 1991 | known or unknown (including existing as well as future claims and causes of 1992 | action), in the Work (i) in all territories worldwide, (ii) for the maximum 1993 | duration provided by applicable law or treaty (including future time 1994 | extensions), (iii) in any current or future medium and for any number of 1995 | copies, and (iv) for any purpose whatsoever, including without limitation 1996 | commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes 1997 | the Waiver for the benefit of each member of the public at large and to the 1998 | detriment of Affirmer's heirs and successors, fully intending that such Waiver 1999 | shall not be subject to revocation, rescission, cancellation, termination, or 2000 | any other legal or equitable action to disrupt the quiet enjoyment of the Work 2001 | by the public as contemplated by Affirmer's express Statement of Purpose. 2002 | 2003 | 3. Public License Fallback. Should any part of the Waiver for any reason be 2004 | judged legally invalid or ineffective under applicable law, then the Waiver 2005 | shall be preserved to the maximum extent permitted taking into account 2006 | Affirmer's express Statement of Purpose. In addition, to the extent the Waiver 2007 | is so judged Affirmer hereby grants to each affected person a royalty-free, 2008 | non transferable, non sublicensable, non exclusive, irrevocable and 2009 | unconditional license to exercise Affirmer's Copyright and Related Rights in 2010 | the Work (i) in all territories worldwide, (ii) for the maximum duration 2011 | provided by applicable law or treaty (including future time extensions), (iii) 2012 | in any current or future medium and for any number of copies, and (iv) for any 2013 | purpose whatsoever, including without limitation commercial, advertising or 2014 | promotional purposes (the "License"). The License shall be deemed effective as 2015 | of the date CC0 was applied by Affirmer to the Work. Should any part of the 2016 | License for any reason be judged legally invalid or ineffective under 2017 | applicable law, such partial invalidity or ineffectiveness shall not 2018 | invalidate the remainder of the License, and in such case Affirmer hereby 2019 | affirms that he or she will not (i) exercise any of his or her remaining 2020 | Copyright and Related Rights in the Work or (ii) assert any associated claims 2021 | and causes of action with respect to the Work, in either case contrary to 2022 | Affirmer's express Statement of Purpose. 2023 | 2024 | 4. Limitations and Disclaimers. 2025 | 2026 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 2027 | surrendered, licensed or otherwise affected by this document. 2028 | 2029 | b. Affirmer offers the Work as-is and makes no representations or warranties 2030 | of any kind concerning the Work, express, implied, statutory or otherwise, 2031 | including without limitation warranties of title, merchantability, fitness 2032 | for a particular purpose, non infringement, or the absence of latent or 2033 | other defects, accuracy, or the present or absence of errors, whether or not 2034 | discoverable, all to the greatest extent permissible under applicable law. 2035 | 2036 | c. Affirmer disclaims responsibility for clearing rights of other persons 2037 | that may apply to the Work or any use thereof, including without limitation 2038 | any person's Copyright and Related Rights in the Work. Further, Affirmer 2039 | disclaims responsibility for obtaining any necessary consents, permissions 2040 | or other rights required for any use of the Work. 2041 | 2042 | d. Affirmer understands and acknowledges that Creative Commons is not a 2043 | party to this document and has no duty or obligation with respect to this 2044 | CC0 or use of the Work. 2045 | 2046 | For more information, please see 2047 | 2048 | 2049 | 2050 | =========================================================================== 2051 | 2052 | Mapbox Common SDK uses portions of sigslot 2053 | 2054 | MIT License 2055 | 2056 | Copyright (c) 2017 Pierre-Antoine Lacaze 2057 | 2058 | Permission is hereby granted, free of charge, to any person obtaining a copy 2059 | of this software and associated documentation files (the "Software"), to deal 2060 | in the Software without restriction, including without limitation the rights 2061 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 2062 | copies of the Software, and to permit persons to whom the Software is 2063 | furnished to do so, subject to the following conditions: 2064 | 2065 | The above copyright notice and this permission notice shall be included in all 2066 | copies or substantial portions of the Software. 2067 | 2068 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 2069 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 2070 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 2071 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 2072 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 2073 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 2074 | SOFTWARE. 2075 | 2076 | =========================================================================== 2077 | 2078 | Mapbox Common SDK uses portions of span-lite 2079 | 2080 | Boost Software License - Version 1.0 - August 17th, 2003 2081 | 2082 | Permission is hereby granted, free of charge, to any person or organization 2083 | obtaining a copy of the software and accompanying documentation covered by 2084 | this license (the "Software") to use, reproduce, display, distribute, 2085 | execute, and transmit the Software, and to prepare derivative works of the 2086 | Software, and to permit third-parties to whom the Software is furnished to 2087 | do so, all subject to the following: 2088 | 2089 | The copyright notices in the Software and this entire statement, including 2090 | the above license grant, this restriction and the following disclaimer, 2091 | must be included in all copies of the Software, in whole or in part, and 2092 | all derivative works of the Software, unless such copies or derivative 2093 | works are solely in the form of machine-executable object code generated by 2094 | a source language processor. 2095 | 2096 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 2097 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 2098 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 2099 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 2100 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 2101 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 2102 | DEALINGS IN THE SOFTWARE. 2103 | 2104 | =========================================================================== 2105 | 2106 | Mapbox Common SDK uses portions of spdlog 2107 | 2108 | The MIT License (MIT) 2109 | 2110 | Copyright (c) 2016 Gabi Melman. 2111 | 2112 | Permission is hereby granted, free of charge, to any person obtaining a copy 2113 | of this software and associated documentation files (the "Software"), to deal 2114 | in the Software without restriction, including without limitation the rights 2115 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 2116 | copies of the Software, and to permit persons to whom the Software is 2117 | furnished to do so, subject to the following conditions: 2118 | 2119 | The above copyright notice and this permission notice shall be included in 2120 | all copies or substantial portions of the Software. 2121 | 2122 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 2123 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 2124 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 2125 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 2126 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 2127 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 2128 | THE SOFTWARE. 2129 | 2130 | -- NOTE: Third party dependency used by this software -- 2131 | This software depends on the fmt lib (MIT License), 2132 | and users must comply to its license: https://github.com/fmtlib/fmt/blob/master/LICENSE.rst 2133 | 2134 | 2135 | =========================================================================== 2136 | 2137 | Mapbox Common SDK uses portions of tiny-AES-c 2138 | 2139 | This is free and unencumbered software released into the public domain. 2140 | 2141 | Anyone is free to copy, modify, publish, use, compile, sell, or 2142 | distribute this software, either in source code form or as a compiled 2143 | binary, for any purpose, commercial or non-commercial, and by any 2144 | means. 2145 | 2146 | In jurisdictions that recognize copyright laws, the author or authors 2147 | of this software dedicate any and all copyright interest in the 2148 | software to the public domain. We make this dedication for the benefit 2149 | of the public at large and to the detriment of our heirs and 2150 | successors. We intend this dedication to be an overt act of 2151 | relinquishment in perpetuity of all present and future rights to this 2152 | software under copyright law. 2153 | 2154 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 2155 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 2156 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 2157 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 2158 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 2159 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 2160 | OTHER DEALINGS IN THE SOFTWARE. 2161 | 2162 | For more information, please refer to 2163 | 2164 | =========================================================================== 2165 | 2166 | Mapbox Common SDK uses portions of uri 2167 | 2168 | Boost Software License - Version 1.0 - August 17th, 2003 2169 | 2170 | Permission is hereby granted, free of charge, to any person or organization 2171 | obtaining a copy of the software and accompanying documentation covered by 2172 | this license (the "Software") to use, reproduce, display, distribute, 2173 | execute, and transmit the Software, and to prepare derivative works of the 2174 | Software, and to permit third-parties to whom the Software is furnished to 2175 | do so, all subject to the following: 2176 | 2177 | The copyright notices in the Software and this entire statement, including 2178 | the above license grant, this restriction and the following disclaimer, 2179 | must be included in all copies of the Software, in whole or in part, and 2180 | all derivative works of the Software, unless such copies or derivative 2181 | works are solely in the form of machine-executable object code generated by 2182 | a source language processor. 2183 | 2184 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 2185 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 2186 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 2187 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 2188 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 2189 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 2190 | DEALINGS IN THE SOFTWARE. 2191 | 2192 | =========================================================================== 2193 | 2194 | Mapbox Common SDK uses portions of zlib 2195 | 2196 | Copyright notice: 2197 | 2198 | (C) 1995-2022 Jean-loup Gailly and Mark Adler 2199 | 2200 | This software is provided 'as-is', without any express or implied 2201 | warranty. In no event will the authors be held liable for any damages 2202 | arising from the use of this software. 2203 | 2204 | Permission is granted to anyone to use this software for any purpose, 2205 | including commercial applications, and to alter it and redistribute it 2206 | freely, subject to the following restrictions: 2207 | 2208 | 1. The origin of this software must not be misrepresented; you must not 2209 | claim that you wrote the original software. If you use this software 2210 | in a product, an acknowledgment in the product documentation would be 2211 | appreciated but is not required. 2212 | 2. Altered source versions must be plainly marked as such, and must not be 2213 | misrepresented as being the original software. 2214 | 3. This notice may not be removed or altered from any source distribution. 2215 | 2216 | Jean-loup Gailly Mark Adler 2217 | jloup@gzip.org madler@alumni.caltech.edu 2218 | 2219 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.9 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | 4 | import PackageDescription 5 | import Foundation 6 | 7 | let commonVersion = "24.10.1" 8 | let commonChecksum = "49b24e8b2def452aca40f8ecb3f3986a7d242dda295dd7af8ad4be3c96a8bb5f" 9 | 10 | let turfVersion: Version = "4.0.0" 11 | 12 | let package = Package( 13 | name: "MapboxCommon", 14 | platforms: [.iOS(.v12), .macOS(.v10_15), .custom("visionos", versionString: "1.0")], 15 | products: [ 16 | .library(name: "MapboxCommon", targets: ["MapboxCommonWrapper"]), 17 | ], 18 | dependencies: [ 19 | .package(url: "https://github.com/mapbox/turf-swift.git", exact: turfVersion) 20 | ], 21 | targets: [ 22 | .target(name: "MapboxCommonWrapper", dependencies: [ 23 | .product(name: "Turf", package: "turf-swift"), 24 | .target(name: "MapboxCommon") 25 | ]), 26 | .binaryTarget( 27 | name: "MapboxCommon", 28 | url: "https://api.mapbox.com/downloads/v2/mapbox-common/releases/ios/packages/\(commonVersion)/MapboxCommon.zip", 29 | checksum: commonChecksum 30 | ), 31 | .testTarget( 32 | name: "MapboxCommonTests", 33 | dependencies: ["MapboxCommon"] 34 | ) 35 | ], 36 | cxxLanguageStandard: .cxx17 37 | ) 38 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # mapbox-common-ios 2 | 3 | MapboxCommon provides common functionality among all Mapbox SDKs including: 4 | 5 | * [Maps](https://github.com/mapbox/mapbox-maps-ios) 6 | * [Navigation](https://github.com/mapbox/mapbox-navigation-ios) 7 | * [Search](https://github.com/mapbox/search-ios) 8 | 9 | To learn more about these SDKs please visit their repos on GitHub and the documentation at https://docs.mapbox.com/. 10 | 11 | ### Prerequisites 12 | 13 | Before you can download the Mapbox Common SDK, you need to create a token with `DOWNLOAD:READ` scope. 14 | Go to https://account.mapbox.com and click "Create token" 15 | 16 | ##### SPM, CocoaPods 17 | Insert or append the following to `~/.netrc` 18 | 19 | ```bash 20 | machine api.mapbox.com 21 | login mapbox 22 | password 23 | ``` 24 | 25 | ## Integration 26 | 27 | ##### Swift Package Manager 28 | 29 | ###### Using Xcode 30 | 31 |
Detailed Flow 32 | 33 | 34 | 35 | 36 |
37 | 38 | ###### Using SPM Package 📱🖥💻 39 | 40 | ```swift 41 | .package(url: "https://github.com/mapbox/mapbox-common-ios.git", from: "24.5.1"), 42 | ``` 43 | 44 | ##### CocoaPods 📱🖥💻 45 | 46 | ```ruby 47 | pod 'MapboxCommon', '24.5.1' 48 | ``` 49 | -------------------------------------------------------------------------------- /Sources/MapboxCommonWrapper/Shim.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mapbox/mapbox-common-ios/fae12447171dded9e764b5c3f909ce409165e8fc/Sources/MapboxCommonWrapper/Shim.swift -------------------------------------------------------------------------------- /Tests/Integration/Carthage/.gitignore: -------------------------------------------------------------------------------- 1 | Carthage/ 2 | Cartfile.resolved 3 | *.xcodeproj 4 | -------------------------------------------------------------------------------- /Tests/Integration/Carthage/Cartfile: -------------------------------------------------------------------------------- 1 | binary "https://api.mapbox.com/downloads/v2/carthage/mapbox-common/MapboxCommon.json" == 24.5.1 2 | -------------------------------------------------------------------------------- /Tests/Integration/CocoaPods/.gitignore: -------------------------------------------------------------------------------- 1 | *.xcodeproj 2 | *.xcworkspace 3 | Pods/ 4 | Podfile.lock 5 | Gemfile.lock 6 | -------------------------------------------------------------------------------- /Tests/Integration/CocoaPods/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | gem 'cocoapods' 3 | # activesupport-7.1.0 causes the following error: https://app.circleci.com/pipelines/github/mapbox/mapbox-common-ios/698/workflows/41765281-efa2-44f7-ae02-dfeb308224f4/jobs/1891 4 | gem 'activesupport', '7.0.8' 5 | # required if we don't want to bump rails a major, due to error "uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger" 6 | gem 'concurrent-ruby', '1.3.4' 7 | -------------------------------------------------------------------------------- /Tests/Integration/CocoaPods/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '12.0' 2 | 3 | target 'PodInstall' do 4 | pod 'MapboxCommon', '24.5.1' 5 | end 6 | -------------------------------------------------------------------------------- /Tests/Integration/CocoaPods/Sources/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import MapboxCommon 3 | 4 | 5 | @UIApplicationMain 6 | class AppDelegate: UIResponder, UIApplicationDelegate { 7 | var window: UIWindow? 8 | 9 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 10 | assert(ValueConverter.toJson(forValue: 0) == "0") 11 | return true 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Tests/Integration/CocoaPods/Sources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | $(PRODUCT_NAME) 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 0.0.2 21 | CFBundleSignature 22 | MBGL 23 | CFBundleVersion 24 | 7877 25 | LSRequiresIPhoneOS 26 | 27 | MGLMapboxAccessToken 28 | $(MAPBOX_ACCESS_TOKEN) 29 | NSHumanReadableCopyright 30 | © 2014–2020 Mapbox 31 | NSLocationAlwaysAndWhenInUseUsageDescription 32 | The map will display your location. If you choose Always, the map may also use your location when it isn’t visible in order to improve OpenStreetMap and Mapbox products. 33 | NSLocationAlwaysUsageDescription 34 | The map will display your location. The map may also use your location when it isn’t visible in order to improve OpenStreetMap and Mapbox products. 35 | NSLocationWhenInUseUsageDescription 36 | The map will display your location. 37 | UILaunchStoryboardName 38 | LaunchScreen 39 | UIRequiredDeviceCapabilities 40 | 41 | armv7 42 | 43 | UISupportedInterfaceOrientations 44 | 45 | UIInterfaceOrientationPortrait 46 | UIInterfaceOrientationLandscapeLeft 47 | UIInterfaceOrientationLandscapeRight 48 | 49 | UISupportedInterfaceOrientations~ipad 50 | 51 | UIInterfaceOrientationPortrait 52 | UIInterfaceOrientationPortraitUpsideDown 53 | UIInterfaceOrientationLandscapeLeft 54 | UIInterfaceOrientationLandscapeRight 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /Tests/Integration/CocoaPods/project.yml: -------------------------------------------------------------------------------- 1 | name: PodInstall 2 | options: 3 | bundleIdPrefix: com.mapbox.common.integration.PodInstall 4 | targets: 5 | PodInstall: 6 | type: application 7 | platform: iOS 8 | deploymentTarget: "13.2" 9 | sources: [Sources] 10 | dependencies: 11 | - sdk: libc++.tbd 12 | settings: 13 | DEVELOPMENT_TEAM: "GJZR2MEM28" 14 | SUPPORTS_MACCATALYST: YES 15 | DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER: YES 16 | OTHER_LDFLAGS: "-lc++" 17 | -------------------------------------------------------------------------------- /Tests/Integration/SPM/.gitignore: -------------------------------------------------------------------------------- 1 | *.xcodeproj 2 | -------------------------------------------------------------------------------- /Tests/Integration/SPM/Sources/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import MapboxCommon 3 | 4 | 5 | @UIApplicationMain 6 | class AppDelegate: UIResponder, UIApplicationDelegate { 7 | var window: UIWindow? 8 | 9 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 10 | assert(ValueConverter.toJson(forValue: 0) == "0") 11 | return true 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Tests/Integration/SPM/Sources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | $(PRODUCT_NAME) 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 0.0.2 21 | CFBundleSignature 22 | MBGL 23 | CFBundleVersion 24 | 7877 25 | LSRequiresIPhoneOS 26 | 27 | MGLMapboxAccessToken 28 | $(MAPBOX_ACCESS_TOKEN) 29 | NSHumanReadableCopyright 30 | © 2014–2020 Mapbox 31 | NSLocationAlwaysAndWhenInUseUsageDescription 32 | The map will display your location. If you choose Always, the map may also use your location when it isn’t visible in order to improve OpenStreetMap and Mapbox products. 33 | NSLocationAlwaysUsageDescription 34 | The map will display your location. The map may also use your location when it isn’t visible in order to improve OpenStreetMap and Mapbox products. 35 | NSLocationWhenInUseUsageDescription 36 | The map will display your location. 37 | UILaunchStoryboardName 38 | LaunchScreen 39 | UIRequiredDeviceCapabilities 40 | 41 | armv7 42 | 43 | UISupportedInterfaceOrientations 44 | 45 | UIInterfaceOrientationPortrait 46 | UIInterfaceOrientationLandscapeLeft 47 | UIInterfaceOrientationLandscapeRight 48 | 49 | UISupportedInterfaceOrientations~ipad 50 | 51 | UIInterfaceOrientationPortrait 52 | UIInterfaceOrientationPortraitUpsideDown 53 | UIInterfaceOrientationLandscapeLeft 54 | UIInterfaceOrientationLandscapeRight 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /Tests/Integration/SPM/project.yml: -------------------------------------------------------------------------------- 1 | name: SPMTest 2 | options: 3 | bundleIdPrefix: com.mapbox.common.SPM 4 | packages: 5 | MapboxCommon: 6 | url: git@github.com:mapbox/mapbox-common-ios.git 7 | branch: release/v24.5.1 8 | targets: 9 | SPMTest: 10 | type: application 11 | platform: iOS 12 | deploymentTarget: "13.2" 13 | sources: [Sources] 14 | dependencies: 15 | - sdk: libc++.tbd 16 | - package: MapboxCommon 17 | settings: 18 | DEVELOPMENT_TEAM: "GJZR2MEM28" 19 | OTHER_LDFLAGS: "-lc++" 20 | -------------------------------------------------------------------------------- /Tests/Integration/ensure_netrc.sh: -------------------------------------------------------------------------------- 1 | HOMEDIR=~ 2 | eval HOMEDIR=$HOMEDIR 3 | FILE="$HOMEDIR/.netrc" 4 | SDK_HOST="api.mapbox.com" 5 | 6 | if grep -q $SDK_HOST $FILE; then 7 | echo "Entry for SDK Registry, not appending credentials." 8 | else 9 | echo "machine api.mapbox.com" >> ~/.netrc 10 | echo "login mapbox" >> ~/.netrc 11 | echo "password ${MAPBOX_DOWNLOAD_TOKEN}" >> ~/.netrc 12 | chmod 600 ~/.netrc 13 | echo "Entry added to netrc" 14 | fi 15 | -------------------------------------------------------------------------------- /Tests/Integration/test_carthage.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | set -euo pipefail 3 | 4 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | ROOT_DIR="${DIR}/../.." 6 | pushd "${ROOT_DIR}/Tests/Integration/Carthage" 7 | 8 | carthage update --platform iOS --use-netrc --use-xcframeworks 9 | 10 | popd 11 | -------------------------------------------------------------------------------- /Tests/Integration/test_cocoapods.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | set -euo pipefail 3 | 4 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 | ROOT_DIR="${DIR}/../.." 6 | pushd "${ROOT_DIR}/Tests/Integration/CocoaPods" 7 | 8 | echo Publishing to Cocoapods takes a long time so try to build and wait for up to 2 hours 9 | 10 | retries=40 11 | 12 | for ((i=0; i [XCTestCaseEntry] { 5 | return [ 6 | testCase(MapboxCommonTests.allTests), 7 | ] 8 | } 9 | #endif 10 | -------------------------------------------------------------------------------- /scripts/release/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /.build 3 | /Packages 4 | /*.xcodeproj 5 | xcuserdata/ 6 | -------------------------------------------------------------------------------- /scripts/release/Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.9 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | 4 | import PackageDescription 5 | 6 | let package = Package( 7 | name: "set-marketing-version", 8 | platforms: [.macOS(.v10_14)], 9 | dependencies: [ 10 | .package(url: "https://github.com/apple/swift-argument-parser", from: "0.2.0"), 11 | ], 12 | targets: [ 13 | // Targets are the basic building blocks of a package. A target can define a module or a test suite. 14 | // Targets can depend on other targets in this package, and on products in packages which this package depends on. 15 | .executableTarget( 16 | name: "set-marketing-version", 17 | dependencies: [ 18 | .product(name: "ArgumentParser", package: "swift-argument-parser"), 19 | ]) 20 | ] 21 | ) 22 | -------------------------------------------------------------------------------- /scripts/release/Sources/set-marketing-version/main.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import ArgumentParser 3 | 4 | extension String { 5 | mutating func replacingLineContaining(_ find: String, with replace: String) { 6 | let content = components(separatedBy: .newlines) 7 | var newContent = [String]() 8 | for line in content { 9 | guard line.contains(find) else { 10 | newContent.append(line) 11 | continue 12 | } 13 | newContent.append(replace) 14 | } 15 | self = newContent.joined(separator: "\n") 16 | } 17 | } 18 | 19 | let fm = FileManager.default 20 | 21 | struct MarketingVersion: ParsableCommand { 22 | @Argument(help: "The new marketing version.") 23 | var marketingVersion: String 24 | 25 | var projectPathURL: URL { 26 | let currentDirectoryURL = URL(fileURLWithPath: fm.currentDirectoryPath) 27 | let buildURL = URL(fileURLWithPath: CommandLine.arguments[0], relativeTo: currentDirectoryURL) 28 | return buildURL.appendingPathComponent("../../../../../../") 29 | } 30 | 31 | var isPreRelease: Bool { 32 | if marketingVersion.rangeOfCharacter(from: CharacterSet.letters) != nil { 33 | return true 34 | } 35 | if marketingVersion.rangeOfCharacter(from: CharacterSet(["-", "-"])) != nil { 36 | return true 37 | } 38 | return false 39 | } 40 | 41 | func replaceLineContaining(_ find: String, with replace: String, in url: URL) throws { 42 | var content = try String(contentsOfFile: url.path) 43 | content.replacingLineContaining(find, with: replace) 44 | try fm.removeItem(atPath: url.path) 45 | try content.write(toFile: url.path, atomically: true, encoding: .utf8) 46 | } 47 | 48 | func runCarthageVersionUpdate() throws { 49 | let cartfileURL = projectPathURL.appendingPathComponent("Tests/Integration/Carthage/Cartfile") 50 | try replaceLineContaining("binary \"https://api.mapbox.com/downloads/v2/carthage/mapbox-common/", 51 | with: "binary \"https://api.mapbox.com/downloads/v2/carthage/mapbox-common/MapboxCommon.json\" == \(marketingVersion)", 52 | in: cartfileURL) 53 | } 54 | 55 | func runCocoaPodsVersionUpdate() throws { 56 | let podfileURL = projectPathURL.appendingPathComponent("Tests/Integration/CocoaPods/Podfile") 57 | try replaceLineContaining("pod 'MapboxCommon'", 58 | with: " pod 'MapboxCommon', '\(marketingVersion)'", 59 | in: podfileURL) 60 | } 61 | 62 | func runSPMVersionUpdate() throws { 63 | let spmManifestURL = projectPathURL.appendingPathComponent("Tests/Integration/SPM/project.yml") 64 | try replaceLineContaining("branch: release/v", 65 | with: " branch: release/v\(marketingVersion)", 66 | in: spmManifestURL) 67 | let spmPackageURL = projectPathURL.appendingPathComponent("Package.swift") 68 | try replaceLineContaining("let version =", 69 | with: "let version = \"\(marketingVersion)\"", 70 | in: spmPackageURL) 71 | } 72 | 73 | func runReadmeVersionUpdate() throws { 74 | let readmeURL = projectPathURL.appendingPathComponent("README.md") 75 | 76 | try replaceLineContaining(".package(url: \"https://github.com/mapbox/mapbox-common-ios.git\", from:", 77 | with: ".package(url: \"https://github.com/mapbox/mapbox-common-ios.git\", from: \"\(marketingVersion)\"),", 78 | in: readmeURL) 79 | 80 | try replaceLineContaining("pod 'MapboxCommon'", 81 | with: "pod 'MapboxCommon', '\(marketingVersion)'", 82 | in: readmeURL) 83 | } 84 | 85 | mutating func run() throws { 86 | try runCocoaPodsVersionUpdate() 87 | try runSPMVersionUpdate() 88 | try runCarthageVersionUpdate() 89 | 90 | if isPreRelease { 91 | print("Not updating README.md because this is a proper release.") 92 | } else { 93 | print("Updating README.md because this is not a pre-release.") 94 | try runReadmeVersionUpdate() 95 | } 96 | } 97 | } 98 | 99 | MarketingVersion.main() 100 | -------------------------------------------------------------------------------- /scripts/release/check-license.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # This script fetches the LICENSE.md from the version specified in Package.swift 3 | # and outputs whether it matches the LICENSE.md in this repository. It modifies the 4 | # LICENSE.md file so a commit of the file will update the license. 5 | 6 | set -eo pipefail 7 | 8 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 9 | ROOT_DIR="${DIR}/../.." 10 | pushd "${ROOT_DIR}" 11 | 12 | VERSION=$(awk '/let commonVersion/{print $NF}' "${ROOT_DIR}/Package.swift") 13 | VERSION=${VERSION:1:${#VERSION}-2} 14 | 15 | curl -n "https://api.mapbox.com/downloads/v2/mapbox-common/releases/ios/packages/${VERSION}/MapboxCommon.zip" --output temp-license.zip 16 | rm -rf "${ROOT_DIR}/LICENSE.md.old" 17 | mv "${ROOT_DIR}/LICENSE.md" "${ROOT_DIR}/LICENSE.md.old" 18 | unzip -p temp-license.zip LICENSE.md > "${ROOT_DIR}/LICENSE.md" 19 | rm -rf temp-license.zip 20 | 21 | OLD_LICENSE="${ROOT_DIR}/LICENSE.md.old" 22 | NEW_LICENSE="${ROOT_DIR}/LICENSE.md" 23 | 24 | STATUS="$(cmp --silent $OLD_LICENSE $NEW_LICENSE; echo $?)" 25 | 26 | if [[ $STATUS -ne 0 ]]; then # if status isn't equal to 0, then execute code 27 | echo "The LICENSE.md in the binary and inside this repository doesn't match." 28 | else 29 | echo "The LICENSE.md in the binary and inside this repository matches." 30 | fi 31 | rm -rf "${ROOT_DIR}/LICENSE.md.old" 32 | exit 0 33 | --------------------------------------------------------------------------------