Xcode 9.3 - Swift 4.1 runtime problem


#1

Yesterday, I was able to build our app including the EstimoteProximitySDK cocoa pod.
However, this morning I wanted to run the app on my phone which is running iOS 11.3, but Xcode 9.2 wouldn’t let me. I updated Xcode to 9.3, cleaned and rebuilt the app, but now I’m running into a crash when the app comes up.

dyld: Library not loaded: @rpath/libswiftCore.dylib
Referenced from: /Users/rick/Library/Developer/CoreSimulator/Devices/4CF5F5EE-2373-41D8-90AF-686D472DE56A/data/Containers/Bundle/Application/A7EBDF13-7CE3-4D41-AED6-0E9CF14CBABA/Essenza App.app/Frameworks/EstimoteProximitySDK.framework/EstimoteProximitySDK
Reason: Incompatible library version: EstimoteProximitySDK requires version 1.0.0 or later, but libswiftCore.dylib provides version 0.0.0

I went and downloaded Xcode 9.2, so I now have both versions installed. I can run fine using 9.2, but I cannot run using 9.3.

I’m guessing it has something to do with this:

Any suggestions on how to make the estimote SDK work with Xcode 9.3?


#2

This appears to be reproducible using the “Proximity for Multiple Beacons” template for Objective C. Note: This template appears to generate a weird syntax error at the bottom of the ViewController.m file when trying to return a CGSize. Code needed to be fixed to use CGSizeMake.

Anyway, when using Xcode 9.3, I encounter the same problem with this sample app. Builds fine, but I hit the same library issue when I run the app (I’m targeting 8+ running 11.3 in simulator).

I did a pod update and noticed it bumped the SDK from 0.11.2 to 0.11.3, but this didn’t change my outcome.

Any ideas?


#3

Can you try this version?

https://dl.dropboxusercontent.com/s/bpl3h3cmd3q4lok/EstimoteProximitySDK.framework_0.11.3_Swift4.1.zip

I’ve recompiled it with Xcode 9.3 and Swift 4.1.

The version currently in CocoaPods and on our GitHub was compiled with Swift 4.0. There were ABI (binary-level) changes in Swift 4.1, so you can’t use that version with the newest Xcode. I’m surprised it you even managed to compile your app, I’d expect Xcode to give you a compile error about mismatching Swift versions.


#4

Yes. That works. Our app doesn’t currently use any swift, so there were no source files to be mismatched. That’s also why I was using the obj c template.

Thank you!


#5

Hi,
We are also facing the same issue.
The Proximity SDK is not loading. Our app is in Objective C.

dyld: Library not loaded: @rpath/libswiftCore.dylib
_ Referenced from: /private/var/containers/Bundle/Application/C6E43730-4648-46C2-946D-67C3475CBAEB/devscanitss.app/Frameworks/EstimoteProximitySDK.framework/EstimoteProximitySDK_
_ Reason: image not found_

We followed this link for the integration. Tried with Pods and manual ways.
https://developer.estimote.com/proximity/ios-tutorial/

Could you please help on this?


#6

Are you by any chance using it in an Obj-C project? If yes, have you by any chance enabled the “Always Embed Swift Standard Libraries” option in build settings? I see it’s mentioned in the manual installation instructions on GitHub, but not in the integration tutorial on the dev portal.


#7

Thank You very much for your help.
The issue got resolved after updating XCode to 9.3.
It is an Obj-C project. I had already enabled the “Always Embed Swift Standard Libraries”.


#8

Now I’m getting another crash which is same as that reported here:

Could you please help on this?

Regards,
Nandhu