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

Unable to run pod install in iOS platform due to the SWIFT_VERSION . #4

Closed
tkhenghong opened this issue Oct 27, 2020 · 3 comments
Closed

Comments

@tkhenghong
Copy link

Hi, I'm using your plugin, version 0.1.0 to enable >60 fps for the Flutter app, but when I performed 'pod install' command in the ios directory, the pod command returned an error like below:

.....
[!] Unable to determine Swift version for the following pods:

- `flutter_displaymode` does not specify a Swift version and none of the targets (`Runner`) integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.

[!] Automatically assigning platform `iOS` with version `8.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

I found out that adding:

  ...
  # Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
  s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
  s.swift_versions = ['4.0', '4.2', '5.0']
  ...

in /ios/flutter_displaymode.podspec file will solve the issue. Thanks.

@ajinasokan
Copy link
Owner

Just to be clear this plugin is only for Android and on iOS it will throw a Missing Plugin Exception. AFAIK not giving swift version is not an issue, it will compile fine. The above message, I believe, is just a warning.

To solve this I will add:

s.swift_version = '5.0'

to the podspec. This seems to be the default one in the new Flutter templates.

@tkhenghong
Copy link
Author

Hi @ajinasokan , thanks for your reply. Your solution also works as well. I will look forward to your patched release. Thanks.

@ajinasokan
Copy link
Owner

ajinasokan commented Oct 28, 2020

This is released to pub as version 0.1.1

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

No branches or pull requests

2 participants