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.

Parents
  • Sorry about that bug, we are currently reviewing what causes this issue, it's quite simple to fix for now.

    follow the following steps:

    1. Run pod install on your project

    2. When Xcode asks to migrate to newer version, select later

    3. Select to the Pods target as shown:
      image description

    4. Select the pods project build settings as shown:
      image description

    5. Select Build settings and search for legacy

    6. Set Use Legacy Swift Language Version to NO:
      image description

    7. Go through all the other installed Pods and change the same setting to NO on all of them (for example: iOSDFULibrary and Zip in your case

    Please follow our github page for iOSDFULibrary for updates on when we find a fix for this bug.

    Sorry for the inconvenience!

  • I followed all the steps you suggested, unfortunately nothing changed.

Reply Children
No Data
Related