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

[shared_preferences_foundation] Add Swift Package Manager compatibility to shared_preferences_foundation #146918

Closed
1 of 2 tasks
Tracked by #146922
vashworth opened this issue Apr 17, 2024 · 1 comment · Fixed by flutter/packages#6640
Assignees
Labels
a: plugins Support for writing, building, and running plugin packages fyi-ecosystem For the attention of Ecosystem team p: shared_preferences Plugin to read and write Shared Preferences P2 Important issues not at the top of the work list platform-ios iOS applications specifically platform-mac Building on or for macOS specifically team-ios Owned by iOS platform team triaged-ios Triaged by iOS platform team

Comments

@vashworth
Copy link
Contributor

vashworth commented Apr 17, 2024

Prerequisites:


Follow "Converting an existing Swift Flutter Plugin to a Swift Package" instructions to make shared_preferences_foundation plugin compatible with Swift Package Manager and CocoaPods.

To validate all is working, run the following commands

// Disable swift package manager
flutter config --no-enable-swift-package-manager

// Validate podspec
dart run script/tool/bin/flutter_plugin_tools.dart podspec-check --packages=shared_preferences_foundation

// Create, build, delete an app that has a dependency on all packages
.ci/scripts/create_all_packages_app.sh
.ci/scripts/build_all_packages_app.sh ios debug --no-codesign
.ci/scripts/build_all_packages_app.sh macos debug
rm -rf all_packages

// Build example with CocoaPods
dart run script/tool/bin/flutter_plugin_tools.dart build-examples --ios --packages=shared_preferences_foundation
dart run script/tool/bin/flutter_plugin_tools.dart build-examples --macos --packages=shared_preferences_foundation

// Run native tests
dart run script/tool/bin/flutter_plugin_tools.dart native-test --ios --packages=shared_preferences_foundation
dart run script/tool/bin/flutter_plugin_tools.dart native-test --macos --packages=shared_preferences_foundation

// Build example with swift package manager
dart run script/tool/bin/flutter_plugin_tools.dart build-examples --ios --swift-package-manager --packages=shared_preferences_foundation
dart run script/tool/bin/flutter_plugin_tools.dart build-examples --macos --swift-package-manager --packages=shared_preferences_foundation

// Run native tests
dart run script/tool/bin/flutter_plugin_tools.dart native-test --ios --packages=shared_preferences_foundation
dart run script/tool/bin/flutter_plugin_tools.dart native-test --macos --packages=shared_preferences_foundation

// Create, build, delete an app that has a dependency on all packages
.ci/scripts/create_all_packages_app.sh
.ci/scripts/build_all_packages_app.sh ios debug --no-codesign
.ci/scripts/build_all_packages_app.sh macos debug
rm -rf all_packages
@vashworth vashworth added platform-ios iOS applications specifically platform-mac Building on or for macOS specifically p: shared_preferences Plugin to read and write Shared Preferences a: plugins Support for writing, building, and running plugin packages team-ios Owned by iOS platform team labels Apr 17, 2024
@vashworth vashworth self-assigned this Apr 17, 2024
@vashworth vashworth added P2 Important issues not at the top of the work list fyi-ecosystem For the attention of Ecosystem team triaged-ios Triaged by iOS platform team labels Apr 17, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this issue May 6, 2024
…ity (#6640)

Makes `shared_preferences_foundation` available as a Swift Package to Flutter. Also, remains compatible with CocoaPods.

Fixes flutter/flutter#146918.
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 20, 2024
TecHaxter pushed a commit to TecHaxter/flutter_packages that referenced this issue May 22, 2024
…ity (flutter#6640)

Makes `shared_preferences_foundation` available as a Swift Package to Flutter. Also, remains compatible with CocoaPods.

Fixes flutter/flutter#146918.
arc-yong pushed a commit to Arctuition/packages-arc that referenced this issue Jun 14, 2024
…ity (flutter#6640)

Makes `shared_preferences_foundation` available as a Swift Package to Flutter. Also, remains compatible with CocoaPods.

Fixes flutter/flutter#146918.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: plugins Support for writing, building, and running plugin packages fyi-ecosystem For the attention of Ecosystem team p: shared_preferences Plugin to read and write Shared Preferences P2 Important issues not at the top of the work list platform-ios iOS applications specifically platform-mac Building on or for macOS specifically team-ios Owned by iOS platform team triaged-ios Triaged by iOS platform team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant