MailCore CFNetwork.framework Dependency Using Invalid Location

I'm new to Xcode and Objective-C, and I'm trying to import github MailCore. InboxListener example Xcode project for Mac OSX. I followed the Mac OSX instructions from the MailCore website , and the project is building, but not starting. MailCore seems to depend on /System/Library/Frameworks/CFNetwork.framework, which is not in my / System / Library / Frameworks / directory on my Mac OS X 10.7.5.

CFNetwork.framework exists in /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks, but why doesn't MailCore know where to find it? How to change the location that MailCore uses?

I tried linking CoreServices.framework and CFNetwork.framework in the build phases, linking to binaries without success. Same runtime error.

Output at startup:

dyld: Library not loaded: /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork Referenced from: /Users/cgray/Library/Developer/Xcode/DerivedData/InboxLister-hjoeknampqddvifxyoqwhozaricj/Build/Products/Debug/MailCore.framework/Versions/A/MailCore Reason: image not found (lldb) 

enter image description here

+4
source share
1 answer

It was a brain teaser for me!

I decided to install the SDK 10.7 in any project and the goals of your project, Mailcore and the Libetpan library. Then select the libetpan project in the project navigator and check:

  • open CoreService.framework and check if there is CFNetwork.framework (see below). If it does not exist, your code cannot include the SDK 10.7, where CFNetwork is under the core concept of CoreService.
  • select " static libetpan " and check your "Link Binary With Libraries", you should find CoreService.framework. If you don’t add it (you can also drag and drop from the project navigator)

Clean and build, it should work!

enter image description here

+2
source

Source: https://habr.com/ru/post/1444724/


All Articles