Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[WIP] Add Swift Package Manager support#1440

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
engels-all-win-software wants to merge3 commits intoBaseflow:main
base:main
Choose a base branch
Loading
fromengels-all-win-software:main

Conversation

@engels-all-win-software
Copy link

@engels-all-win-softwareengels-all-win-software commentedFeb 3, 2025
edited
Loading

This PR relates to#1439

This pull request (PR) aims to implement Swift Package Manager (SPM) support while maintaining CocoaPods. It also tracks progress on streamlining the developer experience. This PR is open for discussion, welcoming new ideas and feedback on any issues or omissions.

I've implemented an SPM file and updated the podspec file to point to the new source files. I've also created the folder structure suggested by the Flutter team in their SPM migration article:https://docs.flutter.dev/packages-and-plugins/swift-package-manager/for-plugin-authors#116-tab-panel.

To run the Example app with SPM, remove (or rename) the Podfile and executepod deintegrate in the example app's iOS folder. Then, enable SPM in Flutter withflutter config --enable-swift-package-manager and executeflutter run with the following environment variable exports:

PERMISSION_EVENTS=1 PERMISSION_EVENTS_FULL_ACCESS=1 PERMISSION_REMINDERS=1 PERMISSION_CONTACTS=1 PERMISSION_CAMERA=1 PERMISSION_MICROPHONE=1 PERMISSION_SPEECH_RECOGNIZER=1 PERMISSION_PHOTOS=1 PERMISSION_LOCATION=1 PERMISSION_LOCATION_WHENINUSE=1 PERMISSION_NOTIFICATIONS=1 PERMISSION_MEDIA_LIBRARY=1 PERMISSION_SENSORS=1 PERMISSION_BLUETOOTH=1 PERMISSION_APP_TRACKING_TRANSPARENCY=1 PERMISSION_CRITICAL_ALERTS=1 PERMISSION_ASSISTANT=1 flutter run

I've chosen to activate permission modules through environment variables, similar to the approach described here:Conditionally compile code in a Flutter plugin using Swift Package Manager. This simplifies the process. A potential improvement is creating an xcconfig file containing the desired permissions as variables. This file could then be imported into the Release or Debug xcconfig files, making it a one-time setup and eliminating the need to export these variables for each run.

Here are some useful links with additional information:

Pre-launch Checklist

  • I made sure the project builds.
  • [ x I read theContributor Guide and followed the process outlined there for submitting PRs.
  • I updatedpubspec.yaml with an appropriate new version according to thepub versioning philosophy, or this PR is does not need version changes.
  • I updatedCHANGELOG.md to add a description of the change.
  • I updated/added relevant documentation (doc comments with///).
  • I rebased ontomain.
  • I added new tests to check the change I am making, or this PR does not need tests.
  • I made sure all existing and new tests are passing.
  • I randart format . and committed any changes.
  • I ranflutter analyze and fixed any errors.

@TimHoogstrate
Copy link
Contributor

I want to Link this geolocator PR, although you are probably related:Baseflow/flutter-geolocator#1630. One quick question:@engels-all-win-software, because this PR is already relatively old. Are you still available for doing some updates?

@TimHoogstrateTimHoogstrate self-assigned thisApr 10, 2025
@engels-all-win-software
Copy link
Author

engels-all-win-software commentedApr 23, 2025
edited
Loading

Hey@TimHoogstrate yeah, I want to keep this updated, sorry for running late.

I was wondering which way should we turn to move forward in implementing this; based on the proposal I described , there are alternative ways to set the preprocessor macros like in a new xcconfig file containing the macros, this would streamline the process instead of passing environment variables to Xcode, also it'll feel familiar with the current podfile based approach. What are you thoughts on this?.

Currently updating this branch to resolve conflicts.

Once we have the approach for implementing Swift Package Manager, we can start writing a migration guide.

ened added a commit to ened/flutter-permission-handler that referenced this pull requestAug 1, 2025
- Add environment variable-based permission defines (PERMISSION_CAMERA, etc.)- Allow consumers to selectively enable only needed permissions- Default all permissions to 0 (disabled) for minimal footprint- Keep essential header search paths- Simplified structure without unnecessary framework dependenciesBased on approach fromBaseflow#1440
ened added a commit to ened/flutter-permission-handler that referenced this pull requestAug 1, 2025
- Move source files to SPM-compliant structure (ios/permission_handler_apple/Sources/)- Add Package.swift with environment-based permission defines- Update podspec to reference new file locations- Add GitHub workflow matrix testing for both CocoaPods and SPM- Maintain backward compatibility with existing CocoaPods setupFollows onBaseflow#1440 andfixesBaseflow#1439
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

@TimHoogstrateTimHoogstrate

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@engels-all-win-software@TimHoogstrate

[8]ページ先頭

©2009-2025 Movatter.jp