1

I think xcode is having a laugh at me.

I open my old project that uses charts library https://github.com/danielgindi/Charts/

and get error

No such module Charts

where I use

import Charts

I then tried to remove Charts from my project. Downloaded new project. And dragged Charts.xcodeproj file into my project - no change

The way my files physically are organized is:

 xcode-ios-projects
 - charts-ios
 - yourappplaform
 -- appcodegeneric (my source code and different .plist files for different apps)
 -- different-apps-asset-folder-1
 -- different-apps-asset-folder-2
 -- different-apps-asset-folder-x

Inside xcode IDE structure looks like this

appgeneric
- Charts.xcodeproj
- appcodegeneric
-- different-apps-asset-folder-1
-- different-apps-asset-folder-2
-- different-apps-asset-folder-x

I have updated xcode, charts etc. to newest. I have not yet updated to Swift 4 conversion process

It has been a long time since I touched my ios/swift project, so maybe I am missing something obvious - but this problem seems a bit odd to me.

UPDATE After using "Clean" I now get the following error when I "Build":

Module compiled with Swift 3.0.2 cannot be imported in Swift 3.3: /Users/myname/Library/Developer/Xcode/kukuhkhkuhkuh/Build/Products/Debug-iphonesimulator/Charts.framework/Modules/Charts.swiftmodule/x86_64.swiftmodule

However - after cleaning that folder manually in Finder... I know get the same error as in the beginning:

no such module 'Charts'

Tom
  • 3,587
  • 9
  • 69
  • 124
  • 1
    maybe try to clean it. do you use a package manager, as example cocoapods? – chronikum Jun 04 '18 at 12:28
  • No package manager - I only use Charts 3rd party library - and due to ages-ago old problems getting Swift libs working properly with package managers (I don't remember details now, but it was a mess years ago) - I have simply dragged the Charts.xcodeproj file into my project – Tom Jun 04 '18 at 12:31
  • Clean did no help - but now I get an error that shows xcode is hanging on to old verison of Charts in DerivedData... – Tom Jun 07 '18 at 05:52
  • 1
    Then remove DerivedData. Or use cocoa pods, it works like a charm (I'm also using this library in one of my projects). – Makalele Jun 07 '18 at 06:05
  • @Makalele Already tried removing DerivedData - no help. But yes, I guess trying a packagemanager is next up unless someone has an idea on how to solve this in Xcode. – Tom Jun 07 '18 at 06:20
  • 1
    check the target membership of the 'Charts' module – sanjaykmwt Jun 07 '18 at 07:07

1 Answers1

4

What I would try is to CMD+B for building it and if that does not help then try this :

enter image description here

AD Progress
  • 4,190
  • 1
  • 14
  • 33