20

I have a project using some modules that I have installed via cocoapods. One of them is Charts. In order to migrate my project from Swift 1.2 to Swift 2 I have gone through the wizard that comes up when first opening the project with Xcode 7. The Charts module is already available for Swift 2, and I have changed my Podfile to contain the following in order to upgrade to this newer and not yet officially released version:

pod 'Charts', :git => 'https://github.com/danielgindi/ios-charts.git'

Now the project workspace opens fine in Xcode except one error message that I can't get rid of myself, and I cannot find any helpful informations in the web:

error message in Xcode

At the place where I import my "Charts" module the above mentioned error message pops up. First, I made sure the whole project is set to deployment target IOS 9.0 as it was 8.0 before.

deployment target for the project

As this didn't solve the issue, I have done Product -> Clean, Product -> Clean Build Folder and finally deleted the "Derived Data" folder's contents. I also have re-started Xcode after all these steps but the error still appears.

Does anybody have a clue what I could have missed? Thank you very much!

shim
  • 9,289
  • 12
  • 69
  • 108
Christian Anton
  • 357
  • 1
  • 4
  • 13
  • 1
    Dis you set the target's development target to iOS 9 too ? – Loegic Sep 21 '15 at 13:35
  • Where do you get the library, from the error message, seems like the library is bundled on iOS9. Could you try get the source code and compile it for target iOS 8 – Wingzero Sep 22 '15 at 01:18

7 Answers7

55

Same, in my case

Selected TARGETS,

then go to "Build Settings"

Search for "iOS Deployment target” in search bar

Changed it from iOS 8.2 to 9.0 - in all

description

Haroldo Gondim
  • 7,725
  • 9
  • 43
  • 62
ioopl
  • 1,735
  • 19
  • 19
  • 5
    Took me a while to find `TARGETS`. Show Project Navigator, click on Project Name, then you can see `Build Settings`, after searching for `iOS Deployment target`, you may have to click `All`. – paragbaxi Apr 13 '16 at 18:38
  • Thanks. I had changed the generic project deployment iOS value, but that didn't propagate to each target – Rembrandt Q. Einstein Sep 14 '16 at 15:32
  • Oh god, thank you so much! I really was about to munch my iMac because of this error! – X99 Dec 10 '17 at 15:55
4

In case you have to support older versions and you don't have the option to just upgrade the deployment target of your project to required version, try downgrade it in a pod itself:

  1. Select Pods project in Project Navigator
  2. Go through every pod in TARGETS list and change its Deployment Target to the version you need
  3. Clean and Build your project

Worked for me. show snapshot from Xcode

roxanneM
  • 853
  • 1
  • 7
  • 12
3

For me, wiping out DerivedData fixed the issue. It seems that clean does not wipe out swiftmodule files.

rm -rf ~/Library/Developer/Xcode/DerivedData

Paul Beusterien
  • 27,542
  • 6
  • 83
  • 139
2

Just put "platform :ios, '8.0'" or whatever is your version in your Podfile and it will be solved.

Paul Razvan Berg
  • 16,949
  • 9
  • 76
  • 114
2

You have to update podspec file to s.ios.deployment_target = '9.0'

Aleš Oskar Kocur
  • 1,381
  • 1
  • 13
  • 29
1

You need to go to Pods, and for every target inside that, set the same development target as you do for the main project, clean and build again.

Dragisa Dragisic
  • 731
  • 2
  • 9
  • 19
0

In my case, where the imported module of Pod FOO was failing because it needed version X:

  • main app/project/targets were all set to minimum deployment target >= X [OK]
  • pod FOO itself had correct >= X minimum deployment target in its podspec [OK]
  • another pod, BAR, was using pod FOO, and BAR's minimum deployment target was less than X. [FIXED: edit BAR's podspec and increase min deployment target to at least X]

tl;dr; it could be that you're using pod 1 which is using another pod 2; the problem is in pod 1's podspec

xaphod
  • 6,392
  • 2
  • 37
  • 45