question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`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

See original GitHub issue

Prerequisites

Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • [Y] I am running the latest version
  • [Y] I checked the documentation and found no answer
  • [Y] I checked to make sure that this issue has not already been filed

Expected Behavior

Please describe the behavior you are expecting

Current Behavior

What is the current behavior? I follow this https://blog.expo.io/so-you-want-to-build-a-bluetooth-app-with-react-native-and-expo-6ea6a31a151d article to make a project

Steps to Reproduce

  1. step 1

At step pod install came out this error [!] Unable to determine Swift version for the following pods:

  • react-native-ble-plx-swift does not specify a Swift version and none of the targets (myapp2) 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.

Solve

According to this issue https://github.com/CocoaPods/CocoaPods/issues/7327 I modified react-native-ble-plx-swift.podspec one line code s.pod_target_xcconfig = { ‘SWIFT_VERSION’ => ‘4.1’ } --> s.swift_version = “4.1” And it works for me

Here’s the code

` require ‘json’

package = JSON.parse(File.read(File.join(dir, ‘package.json’)))

Pod::Spec.new do |s| s.name = “react-native-ble-plx-swift” s.version = package[‘version’] s.summary = “React Native Bluetooth Low Energy library - Swift static library”

s.authors = { “Przemysław Lenart” => “przemek.lenart@gmail.com” } s.homepage = “https://github.com/Polidea/react-native-ble-plx#readme” s.license = “Apache License 2.0” s.platform = :ios, “8.0”

s.source = { :git => “https://github.com/Polidea/react-native-ble-plx.git” } s.source_files = “ios/**/*.{swift}” s.swift_version = “4.1” end `

Context

  • Library version: 1.0.3
  • Platform: Android/iOS
  • Platform logs (logcat/XCode):10.2,1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8

github_iconTop GitHub Comments

11reactions
hugAdmincommented, Jul 23, 2019

I discovered this thread https://github.com/kiwi-bop/flutter_crashlytics/issues/22 and the solution of adding a new Swift file in the project fixed the issue for me

3reactions
hugAdmincommented, Jul 22, 2019

Just to bump this up. I am also having the exact issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pod install error on new project: TensorFlowLiteSwift - iOS
Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod. Here's the Podfile:...
Read more >
Setting SWIFT_VERSION in Nativescript | by Arnav Gupta
Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.
Read more >
Error when running flutter app on mac emulator - Stack Overflow
Please contact the author or set the SWIFT_VERSION attribute in at least one of the targets that integrate this pod.
Read more >
set the `swift_version` attribute in at least one of the targets ...
Please contact the author or set the SWIFT_VERSION attribute in at least one of the targets that integrate this pod. Unable to determine...
Read more >
[Xcode] SWIFT_VERSION - newhowling
Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod. [Solution].
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found