3

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?

user513951
  • 12,445
  • 7
  • 65
  • 82
kolisko
  • 1,548
  • 3
  • 17
  • 22

2 Answers2

30

SOLVED

it is neccessary to open the project 'em' as

open em.xcworkspace

and NOT

open em.xcodeproj

kolisko
  • 1,548
  • 3
  • 17
  • 22
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!

chacpk
  • 21
  • 1
  • 1
    Thanks, I had a similar issue, in this case Other Linker Flags had $(inherited) which was pushing all pod dependencies from the main target, don't know why. Removing the $(inherited) line has solved this issue. – aumanets Apr 02 '18 at 10:43