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

[Bug]: iOS Compilation error with version 0.14.2 after enforcing minimal iOS platform ver to 11.0 #156

Closed
1 task done
yanivshaked opened this issue Nov 2, 2021 · 8 comments · Fixed by #157
Closed
1 task done
Labels
bug🐞 Something isn't working

Comments

@yanivshaked
Copy link
Contributor

yanivshaked commented Nov 2, 2021

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I have changed the minimal iOS platform to 11.0 in my Podfile:

platform :ios, '11.0'
deployment_target = '11.0'

Also updated the minimal deployment version in Xcode.
When building the project, I'm getting the following error messages:


❌  /Users/twelvetwelve/.pub-cache/hosted/pub.dartlang.org/facebook_app_events-0.14.2/ios/Classes/SwiftFacebookAppEventsPlugin.swift:91:98: cannot convert value of type '[String : Any]' to expected argument type '[AppEvents.ParameterName : Any]'

            AppEvents.logEvent(AppEvents.Name(eventName), valueToSum: valueToDouble, parameters: parameters)
                        ^



❌  /Users/twelvetwelve/.pub-cache/hosted/pub.dartlang.org/facebook_app_events-0.14.2/ios/Classes/SwiftFacebookAppEventsPlugin.swift:93:71: cannot convert value of type '[String : Any]' to expected argument type '[AppEvents.ParameterName : Any]'

            AppEvents.logEvent(AppEvents.Name(eventName), parameters: parameters)
                                                                                                 ^


Expected Behavior

Build should be successful.

Steps To Reproduce

Using Xcode 13.1, flutter version 2.5.3:

  1. Change minimal version of your project to iOS version 11.
  2. Build the project.

Platform

iOS

Flutter Doctor

[✓] Flutter (Channel stable, 2.5.3, on macOS 11.4 20F71 darwin-arm, locale en-IL)
    • Flutter version 2.5.3 at /Users/twelvetwelve/Development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 18116933e7 (3 weeks ago), 2021-10-15 10:46:35 -0700
    • Engine revision d3ea636dc5
    • Dart version 2.14.4

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 13.1, Build version 13A1030d
    • CocoaPods version 1.11.2

[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).

[✓] VS Code (version 1.54.3)
    • VS Code at /Users/twelvetwelve/Downloads/Visual Studio Code.app/Contents
    • Flutter extension version 3.22.0

[!] Connected device
    ! No devices available

! Doctor found issues in 4 categories.
@yanivshaked yanivshaked added the bug🐞 Something isn't working label Nov 2, 2021
@RicardoRB
Copy link

Same problem here, but I'm using:

platform :ios, '10.0'

I don't think the target version is related but the type param:

SwiftFacebookAppEventsPlugin.swift:91:98: error: cannot convert value of type '[String : Any]' to expected argument type '[AppEvents.ParameterName : Any]'

@yanivshaked
Copy link
Contributor Author

I agree, but I'm not sure why this error came up along with the minimal iOS version change. (Build was working fine up to that point)

@yanivshaked
Copy link
Contributor Author

@RicardoRB You are welcome to try:

  facebook_app_events:
    git:
      url: https://github.com/yanivshaked/flutter_facebook_app_events.git
      ref: "fbc72fb"

If it works, I will issue a PR.

@RicardoRB
Copy link

Did it work for you? It seems like the right answer, but I don't know if now I can send a string, and it would be converted as AppEvents.ParameterName

@yanivshaked
Copy link
Contributor Author

It should work, I'm testing it

@RicardoRB
Copy link

It worked to me 👌

@yanivshaked
Copy link
Contributor Author

👍

@DennisAlund
Copy link
Member

Thank you for your contribution. PR #157 has been merged and is released in v0.14.3

@DennisAlund DennisAlund linked a pull request Nov 4, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug🐞 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants