cocoapods Sync: ld: framework not found DATAFilter, linker command failed with exit code 1

此生再无相见时 提交于 2019-12-14 03:55:07

问题


I am trying to get Sync (https://github.com/hyperoslo/Sync) to work in my 'em' Xcode iOS Swift project. I have experience with Carthage for framework dependency so it is my cocoapods premiere.

my Podfile

use_frameworks!

target "em" do
    pod 'Sync'
end

my Pods dir:

Michal-MBP:em kolisko$ v Pods
total 24
drwxr-xr-x  16 kolisko  staff   544 14 čvc 10:27 ./
drwxr-xr-x  14 kolisko  staff   476 14 čvc 09:21 ../
-rw-r--r--@  1 kolisko  staff  6148 14 čvc 10:27 .DS_Store
drwxr-xr-x   5 kolisko  staff   170 14 čvc 09:20 DATAFilter/
drwxr-xr-x   5 kolisko  staff   170 14 čvc 09:20 DATAObjectIDs/
drwxr-xr-x   5 kolisko  staff   170 14 čvc 09:20 DATAStack/
drwxr-xr-x   2 kolisko  staff    68 14 čvc 09:20 Headers/
drwxr-xr-x   2 kolisko  staff    68 14 čvc 00:42 Local Podspecs/
-rw-r--r--   1 kolisko  staff  1262 14 čvc 09:21 Manifest.lock
drwxr-xr-x   5 kolisko  staff   170 14 čvc 09:20 NSDictionary-ANDYSafeValue/
drwxr-xr-x   5 kolisko  staff   170 14 čvc 09:20 NSEntityDescription-SYNCPrimaryKey/
drwxr-xr-x   5 kolisko  staff   170 14 čvc 09:21 NSManagedObject-HYPPropertyMapper/
drwxr-xr-x   5 kolisko  staff   170 14 čvc 09:21 NSString-HYPNetworking/
drwxr-xr-x   4 kolisko  staff   136 14 čvc 09:21 Pods.xcodeproj/
drwxr-xr-x   5 kolisko  staff   170 14 čvc 09:21 Sync/
drwxr-xr-x  11 kolisko  staff   374 14 čvc 09:21 Target Support Files/
Michal-MBP:em kolisko$ 

Xcode 7.3.1 build error output

ld: warning: directory not found for option '-F/Users/kolisko/Library/Developer/Xcode/DerivedData/em-btqhzuiyxahnvqeznjrrilcusqnm/Build/Products/Debug-iphonesimulator/DATAFilter'
ld: warning: directory not found for option '-F/Users/kolisko/Library/Developer/Xcode/DerivedData/em-btqhzuiyxahnvqeznjrrilcusqnm/Build/Products/Debug-iphonesimulator/DATAObjectIDs'
ld: warning: directory not found for option '-F/Users/kolisko/Library/Developer/Xcode/DerivedData/em-btqhzuiyxahnvqeznjrrilcusqnm/Build/Products/Debug-iphonesimulator/DATAStack'
ld: warning: directory not found for option '-F/Users/kolisko/Library/Developer/Xcode/DerivedData/em-btqhzuiyxahnvqeznjrrilcusqnm/Build/Products/Debug-iphonesimulator/NSDictionary-ANDYSafeValue'
ld: warning: directory not found for option '-F/Users/kolisko/Library/Developer/Xcode/DerivedData/em-btqhzuiyxahnvqeznjrrilcusqnm/Build/Products/Debug-iphonesimulator/NSEntityDescription-SYNCPrimaryKey'
ld: warning: directory not found for option '-F/Users/kolisko/Library/Developer/Xcode/DerivedData/em-btqhzuiyxahnvqeznjrrilcusqnm/Build/Products/Debug-iphonesimulator/NSManagedObject-HYPPropertyMapper'
ld: warning: directory not found for option '-F/Users/kolisko/Library/Developer/Xcode/DerivedData/em-btqhzuiyxahnvqeznjrrilcusqnm/Build/Products/Debug-iphonesimulator/NSString-HYPNetworking'
ld: warning: directory not found for option '-F/Users/kolisko/Library/Developer/Xcode/DerivedData/em-btqhzuiyxahnvqeznjrrilcusqnm/Build/Products/Debug-iphonesimulator/Sync'

ld: framework not found DATAFilter
clang: error: linker command failed with exit code 1 (use -v to see invocation)

My question is - Is neccessary somehow manually link the DATAFilter framework?


回答1:


SOLVED

it is neccessary to open the project 'em' as

open em.xcworkspace

and NOT

open em.xcodeproj




回答2:


This makes me go crazy at least i spend 10 hours finding a solution and was not to open .xcworkspace, it was the first thing i did (hour 0) and then 9 hours of a crazy nigthmare

Well here my solution: Go selecting your project Go Build Settings > Other Linker Flags and simple remove -framework (watch-out its separated in two separated lines, thats why a find does not work) and DATAFilter (second line) and voila!



来源:https://stackoverflow.com/questions/38370444/cocoapods-sync-ld-framework-not-found-datafilter-linker-command-failed-with-e

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!