0

I'm trying to integrate the UniPay iOS SDK with my iOS app. I've imported the required IDTech.framework as instructed, added the Bridging Header File (set the Swift Compiler Build Settings to it already). I am now trying to import the needed IDTech.h header file in the Bridging Header with:

#ifndef Swift_Bridging_Header_h
#define Swift_Bridging_Header_h

#import <IDTech/IDTech.h>

#endif

however I get 2 issues from XCode 9.3.1: -Swift Compiler Error:

'IDTech/IDTech.h' file not found (CardSwipe-Bridging-Header.h) and

Failed to emit precompiled header '/User/..../Library/Developer/XCode/DerivedData/.....pch' fir bridging header

What am I doing wrong? Thanks in advance!

Community
  • 1
  • 1
  • Check this answer - https://stackoverflow.com/a/49762579/1009546 – battlmonstr Jun 06 '18 at 17:16
  • Did you try deep Clean( Option-Shift-Command-K ) and rebuild the project? – ericl Jun 06 '18 at 17:25
  • @ericl I tried the deep clean, still running into same issue – Gary Salgado Jun 07 '18 at 00:20
  • @battlmonstr I looked at it, I tried the adjusting of the User Header Search Paths and no dice. I'm getting the same 2 errors. – Gary Salgado Jun 07 '18 at 00:33
  • Don't use "User Header Search Paths", use "Header Search Paths", because you import with angle brackets. – battlmonstr Jun 07 '18 at 08:25
  • @battlmonstr I tried adding $(PROJ_DIR)/IDTech (the framework is in a folder named iDTech in the main project folder. Also tried $(PROJ_DIR)/IDTech/**, $(SRCROOT)/IDTech, $(SRCROOT)/IDTech/**, $(SRCROOT)/**, $(SRCROOT) both recurse and non-recursive (each) in the Header Search Paths and I'm getting the same error: 'IDTech/IDTech.h' file not found Cardswipe-Bridging-Header.h & Failed to emit precompiled header '/.../../ – Gary Salgado Jun 07 '18 at 12:07
  • If you have `IDTech.h` file at `$HOME/Desktop/MyProject/IDTech/IDTech.h`, and your xcodeproj is at `$HOME/Desktop/MyProject/MyProject.xcodeproj`, then normally you need to add `$(SRCROOT)` to the search paths. ( because `$SRCROOT = $HOME/Desktop/MyProject`). Things like `/**` are not supported there. – battlmonstr Jun 07 '18 at 12:44
  • @battlmonstr Yes, I tried it all ways, same issue. – Gary Salgado Jun 08 '18 at 00:47
  • Please write the full path to IDTech.h on your file system, the full project folder path, and the exact Header Search Path that you try to add, then I can help. – battlmonstr Jun 08 '18 at 08:19

0 Answers0