Skip to content

Add Swift Package Manager support for iOS#604

Open
Wreos wants to merge 1 commit intodeepak786:masterfrom
Wreos:add-swift-package-manager-support
Open

Add Swift Package Manager support for iOS#604
Wreos wants to merge 1 commit intodeepak786:masterfrom
Wreos:add-swift-package-manager-support

Conversation

@Wreos
Copy link
Contributor

@Wreos Wreos commented Feb 14, 2026

Summary

Adds Swift Package Manager (SPM) support for iOS while maintaining full CocoaPods compatibility.

Changes

  • Add Package.swift with Intercom SDK 19.5.1 dependency
  • ✅ Restructure source files to intercom_flutter/Sources/intercom_flutter/
  • ✅ Update podspec to reference new SPM directory structure
  • ✅ Remove duplicate Intercom dependency declaration
  • ✅ Add .gitignore entries for SPM build artifacts (.build/, .swiftpm/)
  • ✅ Update example app Xcode project to demonstrate SPM integration

Testing

  • CocoaPods: pod install successful, source files correctly referenced
  • Swift Package Manager: swift package resolve successful, Intercom SDK 19.5.1 downloaded
  • ✅ Both package managers use identical source files and SDK version

Implementation Details

  • Follows Flutter's official SPM migration guide
  • Uses exact: "19.5.1" version constraint to match CocoaPods behavior
  • Maintains Objective-C compatibility with proper header structure
  • Example app updated to show SPM integration in practice

Resolves #491

Implements SPM support alongside existing CocoaPods integration.

Changes:
- Add Package.swift with Intercom SDK 19.5.1 dependency
- Move source files to intercom_flutter/Sources/intercom_flutter/
- Update podspec paths and remove duplicate dependency
- Add .gitignore for SPM build artifacts
- Update example app Xcode project for SPM integration

Both package managers now use the same source files and SDK version.
Tested with both CocoaPods and SPM - all working correctly.

Resolves deepak786#491
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.

Add Swift Package Manager support

1 participant