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

How to resolve Unable to determine swift version #276

Open
soumyamahunt opened this issue Feb 1, 2022 · 3 comments
Open

How to resolve Unable to determine swift version #276

soumyamahunt opened this issue Feb 1, 2022 · 3 comments

Comments

@soumyamahunt
Copy link

When trying to package pod I am getting this following error:

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

- `AwesomeCache` does not specify a Swift version and none of the targets (`packager`) 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.
- `BarcodeScanner` does not specify a Swift version and none of the targets (`packager`) 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.
- `EasyTipView` does not specify a Swift version and none of the targets (`packager`) 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.

is there any way I can provide fall back swift version when determining fails?

@physxP
Copy link

physxP commented May 25, 2022

Did you find any solution for this? Facing similar problem

@ryan-cha
Copy link

➕ 1
Having same issue, too!

@physxP
Copy link

physxP commented Jul 24, 2022

I found a workaround. You basically add swift version inside modified podspec for your dependency library and host it on a private cocoapods repository.

For example for my project I needed tensorflow pod:

You can set up a private CocoaPods specs repository, and publish your custom TensorFlowLiteC framework to your private repo. You can copy this podspec file and modify a few values:

  ...
  s.swift_version    =  '5.0'
  ...
  s.version      = <your_desired_version_tag>
  ...
  # Note the `///`, two from the `file://` and one from the `/path`.
  s.source       = { :http => "file:///path/to/TensorFlowLiteC_framework.zip" }
  ...
  s.vendored_frameworks = 'TensorFlowLiteC.framework'
  ...

After creating your own TensorFlowLiteC.podspec file, you can follow the instructions on using private CocoaPods to use it in your own project. You can also modify the TensorFlowLite(Swift|ObjC).podspec to point to your custom TensorFlowLiteC pod and use either Swift or Objective-C pod in your app project.

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

3 participants