Run time error using CouchbaseLiteListener with OS X 10.7

It appears that CFNetwork is in a different place on 10.7 so there is a runtime link error, see below. Can this be fixed by building CBL against 10.7 SDK? Or is there another solution? (We would like to support a few users stuck with 10.7 !)

Thanks,
Martin

Dyld Error Message:
Library not loaded: /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
Referenced from: /Users/USER/Desktop/YoYottaID.app/Contents/MacOS/…/Frameworks//CouchbaseLiteListener.framework/Versions/A/CouchbaseLiteListener
Reason: image not found

That’s strange. I have a very hard time believing that CFNetwork was moved in some OS release, because moving it would have broken existing apps.

Can this be fixed by building CBL against 10.7 SDK?

No, the way to indicate you want backward compatibility is to set the Deployment Target build setting to 10.7.

I have no idea whether CBL will build or run with that change. IIRC we haven’t adopted new OS features not in 10.7, but we’re not testing with any OS that old.

We have a few customers who have MacPro 1,1 or 2,1 that are stuck on OS X 10.7 hence the requirement.
I’ve got an ancient MacBook Air that is also stuck on 10.7 and can replicate the startup crash.

Prior to 10.8 CFNetwork was buried inside the CoreServices.framework, I guess it wasn’t public so moving it didn’t break anything at the time.

For our app we use the latest 10.11 SDK and set the Deployment back to 10.7 works, you just have to be careful not to use any new features.
I use Deploymate which is an excellent app that analyses your Xcode project and tells you about depreciations and missing calls.

However this link does say that because of the CFNetwork location they had to go back to 10.7 SDK

http://stackoverflow.com/questions/13282513/mailcore-cfnetwork-framework-dependency-using-invalid-location http://stackoverflow.com/questions/13282513/mailcore-cfnetwork-framework-dependency-using-invalid-location

Thanks,

Martin

To use the 10.7 SDK you’d have to go back to an old version of Xcode (5? 4?) and I suspect it wouldn’t be able to build our project.

I suggest asking about this on Apple’s xcode-users mailing list. Honestly it was news to me that CFNetwork has moved, and I have no idea how one is supposed to deal with that in a backward-compatible way.