0

I am trying to implement SignalR using SwiftR framework available here. The framework is integrated successfully into the iPad App. However, when i checkin the code into my private repository on GitHub, the greenhouse CI kicks in and the build fails. The CI is unable to find the SwiftR references.

Error1: use of undeclared type 'Hub'

Code: var hub:Hub! (problem statement in BOLD)

Error2: 'SignalR' is unavailable: cannot find Swift declaration for this class

Code: var hubConnection:SignalR! (problem statement in BOLD)

Error3: 'SwiftR' is unavailable: cannot find Swift declaration for this class

Code: hubConnection = SwiftR.connect(URL) { [weak self] connection in} (problem statement in BOLD)

The code builds fine on my local machine running Xcode 7.3.1 targeted for iOS 8.4 and over. CI environment too is running Xcode 7.3.1. However, CI build fails with the above errors.

Uku Loskit
  • 40,868
  • 9
  • 92
  • 93
Deepak Badiger
  • 448
  • 7
  • 18

1 Answers1

0

Okay, it has been a long time since i asked this question and it took me some time to identify the issue and resolve. After some research and some serious thoughts, i realised that my app was running well on my machine running the simulator however, it failed to work under the archive mode. The culprit was fat framework that was supposed to be having the device support as well. I gave it a try by building the SwiftR framework individually for both x86_64 and arm modules. Then i created a fat framework out of it and checked it on github. Happily, CI built perfectly and the app is running fine now. Hope this helps others too.

Deepak Badiger
  • 448
  • 7
  • 18