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

MOBILE-4771: Research Flutter SPM support #245

Merged
merged 5 commits into from
Jan 13, 2025
Merged

MOBILE-4771: Research Flutter SPM support #245

merged 5 commits into from
Jan 13, 2025

Conversation

ilitvinenko
Copy link
Contributor

What do these changes do?

  • removes the obj-c version of plugin wrapper
  • adds support for SPM
  • adds different imports for cocoapods and SPM use case
  • added privacy manifest

Why are these changes necessary?

https://urbanairship.atlassian.net/browse/MOBILE-4771

How did you verify these changes?

run flutter with SPM disabled (i.e. the old cocoapods way), make sure the app runs and archives with no problem
run flutter with SPM, make sure the app runs and archives with no problem

Anything else a reviewer should know?

the proxy pr must be merged before urbanairship/airship-mobile-framework-proxy#75 as these changes require more classes exposed from the proxy via SPM

@ilitvinenko ilitvinenko requested a review from a team as a code owner January 6, 2025 17:40
.library( name: "airship-flutter", targets: ["airship_flutter"])
],
dependencies: [
.package(url: "https://github.com/urbanairship/airship-mobile-framework-proxy.git", from: "11.2.2")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to set the correct new version of the proxy once urbanairship/airship-mobile-framework-proxy#75 is merged and released

@crow
Copy link
Contributor

crow commented Jan 8, 2025

Looks good - we might want to get the proxy released and maybe generate/set up an spm_example variant? I just attempted this with the local version of the proxy but I'm not able to get it running. Will try to get it building from the local proxy maybe tomorrow.

@@ -2,7 +2,12 @@

import UIKit
import Flutter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does anything in this example actually need to change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i've updated the example app to support both cocoapods and spm framework usage. adding flutter is required as if there is no cocoapods, the flutter dependency is not added

@ilitvinenko
Copy link
Contributor Author

ilitvinenko commented Jan 8, 2025

Looks good - we might want to get the proxy released and maybe generate/set up an spm_example variant? I just attempted this with the local version of the proxy but I'm not able to get it running. Will try to get it building from the local proxy maybe tomorrow.

i was able to build it locally with the next settings:

  1. have the plugin locally
  2. update package json to use a commit version of the proxy, instead of version. i.e.
 .package(url: "https://github.com/urbanairship/airship-mobile-framework-proxy.git", revision: "593e96bb83ee9c0cd6b5897672eaa2c9fb861c69")
  1. enable flutter spm dependencies mode (https://docs.flutter.dev/packages-and-plugins/swift-package-manager/for-app-developers)
    flutter config --enable-swift-package-manager

let me know if the steps didn't work for you

@ilitvinenko ilitvinenko merged commit 3abb637 into main Jan 13, 2025
3 checks passed
@ilitvinenko ilitvinenko deleted the mobile-4771 branch January 13, 2025 19:05
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