1

I am trying create CI for my project using jenkins. Build is failing continuously because of the below mentioned issue. I have integrated charts as mentioned in USAGE tab. I can also reproduce the issue using terminal with 'XCODEBUILD' command.

and CI:

xcodebuild archive -scheme TeCharts1 -configuration Debug -archivePath /Users/xxxx/Desktop/test/test.xcarchive clean archive

Configuration details:

xcode 9.4.1

swift 4

Objective c project

fatal error:

'Charts/Charts.h' file not found

#import <Charts/Charts.h>
^
1 error generated.

error1

error2

I can use xcode to generate ipa. It took me a long time to look for an answer in google and stack overflow and i counld't find the answer.I have no idea. Please help me.

nevil
  • 11
  • 3
  • I guess you add the Charts via Cocoapods. And when you run your jenkins, you forgot to pod install. So it can't found your Charts – Quoc Nguyen Aug 21 '18 at 07:42
  • @ Quoc Nguyen i didn't use Cocoapods. In order to correctly compile: Drag the Charts.xcodeproj to your project Go to your target's settings, hit the "+" under the "Embedded Binaries" section, and select the Charts.framework @import Charts When using Swift in an ObjC project: You need to import your Bridging Header. Usually it is "YourProject-Swift.h", so in ChartsDemo it's "ChartsDemo-Swift.h". Do not try to actually include "ChartsDemo-Swift.h" in your project :-) (Xcode 8.2+) Under "Build Options", mark "Always Embed Swift Standard Libraries" i did this. – nevil Aug 21 '18 at 07:52
  • yeah, sorry about it – Quoc Nguyen Aug 21 '18 at 07:57
  • Still very grateful – nevil Aug 21 '18 at 08:05
  • I found some one has same problem, you can check it here, hope it help https://stackoverflow.com/questions/13416900/restkit-restkit-h-file-not-found-error-during-xcodebuild – Quoc Nguyen Aug 21 '18 at 08:15
  • The problem is not solved, I think it is a problem with the module of charts, I am replacing chart with PNChart – nevil Aug 24 '18 at 01:58

0 Answers0