This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

iOSDFULibrary in a Objective-c project

Hi all,

I am trying to add the iOSDFULibrary library to an existing Objective-c project via Cocoapods (Xcode 8.2.1 - target iOS 10).

I have followed the steps reported in the library documentation (iOSDFULibrary on github). This is the output of the "pod install" command:

Downloading dependencies
Using Zip (0.6.0)
Using iOSDFULibrary (3.0.3) 
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 2 total pods installed.

When I open the Cocoapods created workspace I get the error shown in the picture:

image description

If I convert the libraries, I get a lot of compilation errors. If I otherwise let them untouched, I get this:

“Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.

What is the right procedure to add the library to my project?

P.S.: Everything works as expected in a Swift project but I wouldn't migrate my project to Swift right now just to add the library.

Related