Skip to content

Add Swift Package Manager support for iOS - #9

Merged
yazanalkamsheh merged 1 commit into
yazanalkamsheh:masterfrom
TeddyYeung:codex/add-ios-spm-support
Oct 27, 2026
Merged

yazanalkamsheh merged 1 commit into
yazanalkamsheh:masterfrom
TeddyYeung:codex/add-ios-spm-support

Conversation

@TeddyYeung

@TeddyYeung TeddyYeung commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds Swift Package Manager support for the iOS implementation.

This keeps the existing CocoaPods integration unchanged and adds the Flutter SPM package layout under ios/flutter_jailbreak_detection_plus.

Changes

  • Add ios/flutter_jailbreak_detection_plus/Package.swift.
  • Add an SPM source target that registers the existing flutter_jailbreak_detection method channel.
  • Depend on IOSSecuritySuite through SwiftPM, starting from 2.2.0.
  • Ignore local SwiftPM build directories.

Compatibility

  • Dart API is unchanged.
  • Android is unchanged.
  • CocoaPods files are unchanged.
  • The SPM path uses iOS 11.0 because IOSSecuritySuite's Swift package declares iOS 11 support. The existing podspec remains at iOS 10.0.

Validation

  • swift package dump-package from ios/flutter_jailbreak_detection_plus: passed.
  • flutter pub get: passed for root and example.
  • dart analyze --no-fatal-warnings: completed with the existing example/pubspec.yaml deprecated author warning.
  • flutter build ios --simulator with flutter config --no-enable-swift-package-manager: passed.
  • pod lib lint ios/flutter_jailbreak_detection_plus.podspec --configuration=Debug --skip-tests --use-modular-headers --allow-warnings: passed.
  • pod lib lint ios/flutter_jailbreak_detection_plus.podspec --configuration=Debug --skip-tests --use-modular-headers --use-libraries --allow-warnings: passed.
  • flutter build ios --simulator with flutter config --enable-swift-package-manager: passed.

Notes

  • flutter test at the package root currently fails because there is no root test/ directory.
  • flutter test in example/ currently fails because the existing widget test expects Running on: text, while the current example UI renders Jailbroken: and Developer mode:.
  • flutter pub publish --dry-run was attempted and exits non-zero because of pre-existing checked-in files ignored by .gitignore; the dry-run archive includes the new SPM package files.

@TeddyYeung
TeddyYeung force-pushed the codex/add-ios-spm-support branch from 7c55eb7 to 4540dc2 Compare June 26, 2026 04:24
@TeddyYeung
TeddyYeung marked this pull request as ready for review June 26, 2026 04:24
@TeddyYeung
TeddyYeung force-pushed the codex/add-ios-spm-support branch from 4540dc2 to cb2f76d Compare June 26, 2026 08:53
@TeddyYeung

Copy link
Copy Markdown
Contributor Author

Hi @yazanalkamsheh, this PR has been approved and shows no merge conflicts (mergeable, clean state). Could you please review and merge when you have a chance? Thanks!

@TeddyYeung

Copy link
Copy Markdown
Contributor Author

Hi @yazanalkamsheh 👋 Just a gentle bump on this one.

The PR is still mergeable with no conflicts. Since Flutter is moving to Swift Package Manager for iOS, this would help projects migrating off CocoaPods.

Is there anything you'd like me to change before it can be merged? Happy to adjust anything. Thanks for maintaining this plugin!

@TeddyYeung

Copy link
Copy Markdown
Contributor Author

Hi @yazanalkamsheh, one last follow-up on this PR.

I noticed the last commit on this repo was in October 2025, so I wanted to check in: are you still able to maintain this package?

If you're busy or no longer plan to work on it, I'd be happy to help, either by being added as a collaborator/uploader to merge and publish SPM support, or by taking over maintenance if you'd prefer to hand it off. If the package is discontinued, it would also help to mark it as such so people know where to go.

Either way, thanks for creating and maintaining this plugin. A short reply would be much appreciated!

@yazanalkamsheh
yazanalkamsheh merged commit f107d92 into yazanalkamsheh:master Oct 27, 2026
@yazanalkamsheh

Copy link
Copy Markdown
Owner

Hi @TeddyYeung , thanks a lot for the PR and sorry for the long delay!

I've reviewed and verified it (iOS simulator build via SwiftPM works), and merged it into master. SPM support will go out in the next release.

And yes, I'm still maintaining the package. Thanks for the offer to help, and thanks for your patience. 🙏

@TeddyYeung

Copy link
Copy Markdown
Contributor Author

Thanks a lot for reviewing and merging this, and for getting 1.10.8 out so quickly. Good to know the package is still actively maintained. If anything SPM-related comes up later, feel free to ping me.

@yazanalkamsheh

Copy link
Copy Markdown
Owner

Haha, better late than never! 😅 Thanks again for your contribution, @TeddyYeung !

I'd be happy to have you contribute more to the project! Feel free to open PRs for any improvements or fixes, and I'll review and merge them. I might occasionally miss GitHub notifications when I'm busy, so feel free to reach out to me on LinkedIn if there's anything that needs my attention.

Here's my LinkedIn: https://www.linkedin.com/in/yazan-alkamsheh/

Looking forward to collaborating more! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants