Add MapLibre.podspec (#1514)

This commit is contained in:
Bart Louwers
2023-08-14 11:47:56 +02:00
committed by GitHub
parent 5a4d391523
commit b5d2662ca9
7 changed files with 28 additions and 107 deletions

View File

@@ -22,6 +22,8 @@ jobs:
- run: chmod +x scripts/deploy-swift-package.sh
- run: bazel/example_config.bzl bazel/config.bzl
- name: Build, package, and upload iOS release
run: scripts/deploy-swift-package.sh
env:

View File

@@ -92,9 +92,9 @@ info_plist(
)
apple_xcframework(
name = "Mapbox.dynamic",
name = "MapLibre.dynamic",
bundle_id = "com.maplibre.mapbox",
bundle_name = "Mapbox",
bundle_name = "MapLibre",
data = glob([
"resources/*.lproj/**",
"resources/*.xcassets/**",

View File

@@ -0,0 +1,18 @@
Pod::Spec.new do |s|
version = '6.0.0-pre0'
s.name = 'MapLibre'
s.version = version
s.license = { :type => 'BSD', :file => 'LICENSE.md' }
s.homepage = 'https://maplibre.org/'
s.authors = { 'MapLibre' => '' }
s.summary = 'Open source vector map solution for iOS with full styling capabilities.'
s.platform = :ios
s.source = {
:http => "https://github.com/maplibre/maplibre-native/releases/download/ios-v#{version.to_s}/MapLibre-#{version.to_s}.zip",
:flatten => false
}
m.social_media_url = 'https://mastodon.social/@maplibre'
s.ios.deployment_target = '11.0'
s.ios.vendored_frameworks = "**/MapLibre.xcframework"
end

View File

@@ -1,34 +0,0 @@
Pod::Spec.new do |m|
version = '5.9.0'
m.name = 'Mapbox-iOS-SDK-snapshot-dynamic'
m.version = "#{version}-snapshot"
m.summary = 'Open source vector map solution for iOS with full styling capabilities.'
m.description = 'Open source, OpenGL-based vector map solution for iOS with full styling capabilities and Cocoa Touch APIs.'
m.homepage = 'https://docs.mapbox.com/ios/maps/'
m.license = { :type => 'BSD', :file => 'LICENSE.md' }
m.author = { 'Mapbox' => 'mobile@mapbox.com' }
m.screenshot = "https://docs.mapbox.com/ios/api/maps/#{version}/img/screenshot.png"
m.social_media_url = 'https://twitter.com/mapbox'
m.documentation_url = 'https://docs.mapbox.com/ios/api/maps/'
m.source = {
:http => "https://mapbox.s3.amazonaws.com/mapbox-gl-native/ios/builds/mapbox-ios-sdk-snapshot-dynamic.zip",
:flatten => true
}
m.platform = :ios
m.ios.deployment_target = '9.0'
m.requires_arc = true
m.vendored_frameworks = 'dynamic/Mapbox.framework'
m.module_name = 'Mapbox'
m.preserve_path = '**/*.bcsymbolmap'
m.dependency "MapboxMobileEvents", "0.10.2"
end

View File

@@ -1,34 +0,0 @@
Pod::Spec.new do |m|
version = '5.9.0'
m.name = 'Mapbox-iOS-SDK-stripped'
m.version = "#{version}-stripped"
m.summary = 'Open source vector map solution for iOS with full styling capabilities.'
m.description = 'Open source, OpenGL-based vector map solution for iOS with full styling capabilities and Cocoa Touch APIs.'
m.homepage = 'https://docs.mapbox.com/ios/maps/'
m.license = { :type => 'BSD', :file => 'LICENSE.md' }
m.author = { 'Mapbox' => 'mobile@mapbox.com' }
m.screenshot = "https://docs.mapbox.com/ios/api/maps/#{version}/img/screenshot.png"
m.social_media_url = 'https://twitter.com/mapbox'
m.documentation_url = 'https://docs.mapbox.com/ios/api/maps/'
m.source = {
:http => "https://mapbox.s3.amazonaws.com/mapbox-gl-native/ios/builds/mapbox-ios-sdk-#{m.version.to_s}-dynamic.zip",
:flatten => true
}
m.platform = :ios
m.ios.deployment_target = '9.0'
m.requires_arc = true
m.vendored_frameworks = 'dynamic/Mapbox.framework'
m.module_name = 'Mapbox'
m.preserve_path = '**/*.bcsymbolmap'
m.dependency "MapboxMobileEvents", "0.10.2"
end

View File

@@ -1,33 +0,0 @@
Pod::Spec.new do |m|
version = '5.9.0'
m.name = 'Mapbox-iOS-SDK'
m.version = version
m.summary = 'Open source vector map solution for iOS with full styling capabilities.'
m.description = 'Open source, OpenGL-based vector map solution for iOS with full styling capabilities and Cocoa Touch APIs.'
m.homepage = 'https://docs.mapbox.com/ios/maps/'
m.license = { :type => 'BSD', :file => 'LICENSE.md' }
m.author = { 'Mapbox' => 'mobile@mapbox.com' }
m.screenshot = "https://docs.mapbox.com/ios/api/maps/#{version}/img/screenshot.png"
m.social_media_url = 'https://twitter.com/mapbox'
m.documentation_url = 'https://docs.mapbox.com/ios/api/maps/'
m.source = {
:http => "https://mapbox.s3.amazonaws.com/mapbox-gl-native/ios/builds/mapbox-ios-sdk-#{m.version.to_s}-dynamic.zip",
:flatten => true
}
m.platform = :ios
m.ios.deployment_target = '9.0'
m.requires_arc = true
m.vendored_frameworks = 'dynamic/Mapbox.framework'
m.module_name = 'Mapbox'
m.preserve_path = '**/*.bcsymbolmap'
m.dependency "MapboxMobileEvents", "0.10.2"
end

View File

@@ -82,15 +82,15 @@ npm install --ignore-scripts
mkdir -p ${BINARY_DIRECTORY}
step "Building XCFramework"
bazel build //platform/ios:Mapbox.dynamic
bazel build //platform/ios:MapLibre.dynamic
step "Copying Bazel output"
BUILT_XCFRAMEWORK="$(bazel cquery --output=files //platform/ios:Mapbox.dynamic)"
BUILT_XCFRAMEWORK="$(bazel cquery --output=files //platform/ios:MapLibre.dynamic)"
MAPLIBRE_ZIP_FILE="MapLibre-${PUBLISH_VERSION}.zip"
cp "$BUILT_XCFRAMEWORK" "$MAPLIBRE_ZIP_FILE"
step "Create GitHub release…"
RELEASE_NOTES=$( ./platform/ios/scripts/release-notes.js github )
RELEASE_NOTES=$( ./scripts/release-notes.js github )
if [[ -z "${RELEASE_NOTES}" ]]; then
echo "Release notes cannot be empty."
@@ -109,7 +109,7 @@ MAPLIBRE_ZIP_FILE_URL=$EXT_TARGET_GITHUB_URL
step "Creating Swift package…"
rm -f Package.swift
cp platform/ios/scripts/swift_package_template.swift Package.swift
cp scripts/swift_package_template.swift Package.swift
setTarget() {
local token=$1
@@ -152,3 +152,5 @@ curl -v -X POST \
-d "{\"tag_name\":\"${PUBLISH_VERSION}\"}"
step "Finished deploying ${PUBLISH_VERSION} in $(($SECONDS / 60)) minutes and $(($SECONDS % 60)) seconds"
pod trunk push MapLibre.podspec