Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add podspecs in correct Cocoapods layout #128

Merged
merged 10 commits into from
Jul 27, 2022
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/flutter_beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ jobs:
with:
channel: ${{ env.FLUTTER_CHANNEL }}
cache: true
- uses: maxim-lobanov/setup-cocoapods@v1
with:
podfile-path: example/ios/Podfile.lock
- run: flutter pub get
- name: Update pods
working-directory: example/ios
run: pod update
- name: Build iOS package
run: flutter build ios --simulator
- name: Upload Runner.app as artifact
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/flutter_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ jobs:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: ${{ env.FLUTTER_CHANNEL }}
cache: true
- uses: maxim-lobanov/setup-cocoapods@v1
with:
podfile-path: example/ios/Podfile.lock
- run: flutter pub get
- name: Update pods
working-directory: example/ios
run: pod update
- name: Build iOS package
run: flutter build ios --simulator
- name: Upload Runner.app as artifact
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Miscellaneous
*.class
*.lock
*.log
*.pyc
*.swp
Expand Down Expand Up @@ -48,6 +47,7 @@ version
.packages
.pub-cache/
.pub/
**/pubspec.lock
build/
flutter_*.png
linked_*.ds
Expand Down
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,15 @@ Documentation is available on the docs branch in the doc/api folder and automati
Please visit [https://github.com/maplibre/maplibre-gl-js](https://github.com/maplibre/maplibre-gl-js) and [https://github.com/maplibre/maplibre-gl-native](https://github.com/maplibre/maplibre-gl-native) for more information about the Maplibre libraries.

### iOS
To use this plugin with iOS, you may need to add two lines to your Podfile, as shown in the example app: https://github.com/m0nac0/flutter-maplibre-gl/blob/d23b2297f775ed6e686c31ee2e2318cc28c73a5e/example/ios/Podfile#L5-L6
... and run `pod update`
To use this plugin with iOS, you need to add the source repository and 2 additional pods to your Podfile, as shown in the example app: https://github.com/m0nac0/flutter-maplibre-gl/blob/main/example/ios/Podfile

```ruby
source 'https://cdn.cocoapods.org/'
source 'https://github.com/m0nac0/flutter-maplibre-podspecs.git'

pod 'MapLibre'
pod 'MapLibreAnnotationExtension'
```

## Supported API

Expand Down
1 change: 0 additions & 1 deletion example/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Miscellaneous
*.class
*.lock
*.log
*.pyc
*.swp
Expand Down
14 changes: 5 additions & 9 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
source 'https://cdn.cocoapods.org/'
source 'https://github.com/m0nac0/flutter-maplibre-podspecs.git'

# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
use_frameworks!

pod 'MapLibre', :git => 'https://github.com/m0nac0/maplibre-cocoapods.git'
pod 'MapLibreAnnotationExtension', :git => 'https://github.com/m0nac0/maplibre-annotation-extension.git'
pod 'MapLibre'
pod 'MapLibreAnnotationExtension'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down Expand Up @@ -39,13 +41,7 @@ target 'Runner' do
end

kuhnroyal marked this conversation as resolved.
Show resolved Hide resolved
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
54 changes: 54 additions & 0 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
PODS:
- device_info_plus (0.0.1):
- Flutter
- Flutter (1.0.0)
- location (0.0.1):
- Flutter
- MapLibre (5.12.2)
- maplibre_gl (0.0.1):
- Flutter
- MapLibre (~> 5.12.2)
- MapLibreAnnotationExtension (~> 0.0.1-beta.2)
- MapLibreAnnotationExtension (0.0.1-beta.2):
- MapLibre (~> 5.12.0)
- path_provider_ios (0.0.1):
- Flutter

DEPENDENCIES:
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- Flutter (from `Flutter`)
- location (from `.symlinks/plugins/location/ios`)
- MapLibre
- maplibre_gl (from `.symlinks/plugins/maplibre_gl/ios`)
- MapLibreAnnotationExtension
- path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)

SPEC REPOS:
https://github.com/m0nac0/flutter-maplibre-podspecs.git:
- MapLibre
- MapLibreAnnotationExtension

EXTERNAL SOURCES:
device_info_plus:
:path: ".symlinks/plugins/device_info_plus/ios"
Flutter:
:path: Flutter
location:
:path: ".symlinks/plugins/location/ios"
maplibre_gl:
:path: ".symlinks/plugins/maplibre_gl/ios"
path_provider_ios:
:path: ".symlinks/plugins/path_provider_ios/ios"

SPEC CHECKSUMS:
device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
location: 3a2eed4dd2fab25e7b7baf2a9efefe82b512d740
MapLibre: 5aa820115d91293a4d09e681e7470f88bd34b672
maplibre_gl: 2a0ce99f40b3a133b0e8b40b5ef37e0562165399
MapLibreAnnotationExtension: bc7f1041206218d7d24ba0908e3145cd54b86664
path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02

PODFILE CHECKSUM: 17402884ac1fb1b8596341d3b2550e1bb899a5ea

COCOAPODS: 1.11.3
29 changes: 21 additions & 8 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 50;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -166,7 +166,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1000;
LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "The Chromium Authors";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -247,17 +247,21 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/MapLibreAnnotationExtension/MapLibreAnnotationExtension.framework",
"${BUILT_PRODUCTS_DIR}/MapLibreAnnotationExtension-framework/MapLibreAnnotationExtension.framework",
"${BUILT_PRODUCTS_DIR}/device_info_plus/device_info_plus.framework",
"${BUILT_PRODUCTS_DIR}/location/location.framework",
"${BUILT_PRODUCTS_DIR}/maplibre_gl/maplibre_gl.framework",
"${BUILT_PRODUCTS_DIR}/path_provider/path_provider.framework",
"${BUILT_PRODUCTS_DIR}/path_provider_ios/path_provider_ios.framework",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/MapLibre/Mapbox.framework/Mapbox",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapLibreAnnotationExtension.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/device_info_plus.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/location.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/maplibre_gl.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_ios.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Mapbox.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand Down Expand Up @@ -375,7 +379,10 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
Expand Down Expand Up @@ -503,7 +510,10 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
Expand All @@ -527,7 +537,10 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
Expand Down
Loading