1

I developed a swift based framework using xcode 6.4

I recently updated my xcode to 7.0 and found some surprises:

  1. some of the syntax in my code is no longer valid and as xcode 7 introduce Swift 2.0, so corrections needed to be done (not so horrible)

  2. When trying to embed my framework in an app in xcode 7 i got an error saying that the framework was built in a prior version of xcode and needed to be re built!? (So developers which use xcode 7 can no longer use my framework?)

  3. I built the framework in Xcode 7 and embeded it on the xcode 7 developed app - it works. But now when trying to embed the 7.0 built framework in xcode 6.4 app it dont work giving me the error:

dyld: Library not loaded: @rpath/libswiftWebKit.dylib Referenced from: ... Reason: image not found

So what does it mean? that i have to manage versions for xcode 6 and xcode 7? how can it be that building framework on xcode 7 dont work on apps being developed on earlier version? (6.4)

Someone can shade some light on this compatibility issue?

Michael A
  • 5,770
  • 16
  • 75
  • 127
  • Check out some of this stuff on the dyld error. I got one last night and had to update my certs, but other peoples seems to be corrected more easily: http://stackoverflow.com/questions/26024100/dyld-library-not-loaded-rpath-libswiftcore-dylib – Logan Oct 08 '15 at 14:43

1 Answers1

1

I have tried searching for published information on this topic from Apple, but can't find any.

Regarding your surprise 2), I do recall specific advice our Apple technical rep gave us a few months ago: don't build frameworks in Swift because the language is still evolving and your users will have compatibility issues. I am guessing he had Swift 2 in mind.

I asked about whether we could build a framework in Swift if we maintained multiple versions of it for each version of Swift, and he said that could work.

Regarding your surprise 3), this seems normal to me. I wouldn't expect an older version of Xcode to be able use binaries built in a newer version.

Mike Taverne
  • 9,156
  • 2
  • 42
  • 58