Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dyld: lazy symbol binding failed: Symbol not found #79

Closed
trick14 opened this issue Apr 19, 2017 · 2 comments
Closed

dyld: lazy symbol binding failed: Symbol not found #79

trick14 opened this issue Apr 19, 2017 · 2 comments
Labels

Comments

@trick14
Copy link

trick14 commented Apr 19, 2017

I have been using Mockingjay in XCTest very well. However recently I noticed that if I can use it in main target, it would be nice. So I changed Podfile like this:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

inhibit_all_warnings!

target 'Surfline' do
    pod 'Mockingjay/Core'

    target 'SurflineTests' do
        pod 'Mockingjay/XCTest'
    end
end

And it worked very well with main target but I stuck in test.

I have this line in my test

@testable import MainTarget

I need this for not to change access level of class properties in the main target. Tests without the line is perfectly fine but with the line it shows error:

dyld: lazy symbol binding failed: Symbol not found: __TFE10MockingjayCSo6XCTest4stubfTFV10Foundation10URLRequestSbFS2_OS_8Response_VS_4Stub
  Referenced from: /Users/rhan/Library/Developer/Xcode/DerivedData/Surfline-eheubjimlqgiykerufbqqnwywuhs/Build/Intermediates/CodeCoverage/Products/Debug-iphonesimulator/Surfline.app/PlugIns/SurflineTests.xctest/SurflineTests
  Expected in: /Users/rhan/Library/Developer/CoreSimulator/Devices/9C5026F0-B25E-40C1-99FB-0E1F63FAFC3F/data/Containers/Bundle/Application/734A040B-E1D2-45F8-93A4-3ADFA837010B/Surfline.app/Frameworks/Mockingjay.framework/Mockingjay

dyld: Symbol not found: __TFE10MockingjayCSo6XCTest4stubfTFV10Foundation10URLRequestSbFS2_OS_8Response_VS_4Stub
  Referenced from: /Users/rhan/Library/Developer/Xcode/DerivedData/Surfline-eheubjimlqgiykerufbqqnwywuhs/Build/Intermediates/CodeCoverage/Products/Debug-iphonesimulator/Surfline.app/PlugIns/SurflineTests.xctest/SurflineTests
  Expected in: /Users/rhan/Library/Developer/CoreSimulator/Devices/9C5026F0-B25E-40C1-99FB-0E1F63FAFC3F/data/Containers/Bundle/Application/734A040B-E1D2-45F8-93A4-3ADFA837010B/Surfline.app/Frameworks/Mockingjay.framework/Mockingjay

I'm stuck here. Any hint will be very appreciated.

@kylef
Copy link
Owner

kylef commented Sep 28, 2017

I think you will need inherit! :search_paths in your test Pod target.

target 'Surfline' do
    pod 'Mockingjay/Core'

    target 'SurflineTests' do
        inherit! :search_paths
        pod 'Mockingjay/XCTest'
    end
end

@kylef kylef added the question label Sep 28, 2017
@kylef kylef closed this as completed Sep 28, 2017
@vsnv
Copy link

vsnv commented Feb 17, 2021

@trick14 Hi! Did you find any solution? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants