10

Can't build project after adding testflight sdk

 Undefined symbols for architecture i386:
  "_TFLog", referenced from:
      -[IBIZAAppDelegate application:didFinishLaunchingWithOptions:] in IBIZAAppDelegate.o
      -[IBIZAAppDelegate application:didRegisterForRemoteNotificationsWithDeviceToken:] in IBIZAAppDelegate.o
      -[IBIZAAppDelegate application:didReceiveRemoteNotification:] in IBIZAAppDelegate.o
      -[IBIZAAppDelegate application:didFailToRegisterForRemoteNotificationsWithError:] in IBIZAAppDelegate.o
      -[IBIZAAppDelegate registerSuccess:] in IBIZAAppDelegate.o
      -[IBIZAAppDelegate registerFail:] in IBIZAAppDelegate.o
      -[MainViewController viewDidLoad] in MainViewController.o
      ...
  "_OBJC_CLASS_$_TestFlight", referenced from:
      objc-class-ref in IBIZAAppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I'm working with Xcode 4.2. Same project is normally building on the other computer with Xcode 4.3. SDK is added to all needed targets, also tried all solution, related to this subject.

user801255
  • 607
  • 1
  • 8
  • 23

4 Answers4

38

I had a similar problem updating from TestFlight 0.8.1 to 0.8.3. I reread the instructions in the README.txt file. I believe you now have to add libz.dylib (Step 3 in "How do I integrate the SDK into my project"). After that I was able to run my app on the simulator and on my development iPad.

Gerard
  • 689
  • 5
  • 15
3

Carefully go back through Step 2 of the Integration procedure in the SDK documentation. The ld in the error message indicates that this is a link-time failure to find a referenced class. This is almost always the result of not including a necessary library in the "Link Binary With Libraries" build phase.

warrenm
  • 31,094
  • 6
  • 92
  • 116
  • libTestFlight.a is in the binary with libraries tab. – user801255 Feb 09 '12 at 17:16
  • I'm sorry you're having trouble. I just went through the process of adding the SDK to an existing project in Xcode 4.3, then tested the build process in 4.2 and everything worked perfectly. There is something wrong with your project configuration. – warrenm Feb 09 '12 at 17:32
  • probably, but without this sdk everything was perfect – user801255 Feb 09 '12 at 17:34
  • I don't doubt that for a second. All I'm saying is, the problem is not with the SDK per se. The problem is with how you're linking it into your targets. – warrenm Feb 09 '12 at 17:38
  • I'm not saying that there is something wrong with sdk, i'm just askin for some help ) – user801255 Feb 09 '12 at 17:45
-1

i removed TFLOG declarations from project . all works

NeverBe
  • 5,213
  • 2
  • 25
  • 39
  • TFlog is meant to help with remote logging. There's an answer below that's based on the ReadMe file that came with TestFlight's SDK that accurately indicates that linking against libz.dylib fixes the issue. – William Power Mar 15 '13 at 01:42
-4

Probably I had some issues in project settings, checkouting the project solved the problem

user801255
  • 607
  • 1
  • 8
  • 23
  • 2
    While this may have 'solved' your issue, the question you ask is more correctly solved by either Gerard or warrenm above. – Darren Oster May 21 '13 at 02:16
  • 1
    @user801255 - Dude, seriously! Uncheck your answer and give it to Gerard. I second Darren. This is an issue for a lot of people and the real solution to the problem is in his response. Give him the credit. Please. BTW: I did give you a point for asking the question though. Great question. It helped me find the answer by Gerard. – Patricia Feb 10 '14 at 19:22