0
votes

I have integrated Alamofire in my ios project.While am testing my app using XCTest(UITest),am getting the following issue.I have googled and tried all the solutions.But not getting the solutions.Plesae help me to solve this.

Library not loaded: @rpath/Alamofire.framework/Alamofire Referenced from: /private/var/mobile/Containers/Bundle/Application/DA4702F0-6A4C-4EB6-99D0-255ABB6E3F57/Real Estate.app/Real Estate Reason: image not found Dyld Version: 353.12

this is my podfile.

target 'FreshBoss' do use_frameworks!

# Pods for FreshBoss

pod 'Alamofire', '~> 3.4'

pod 'MBProgressHUD', '~> 0.9.2'

pod 'Google/SignIn'

target 'FreshBossTests' do

inherit! :search_paths
# Pods for testing

pod 'Alamofire', '~> 3.4'

pod 'MBProgressHUD', '~> 0.9.2'

pod 'Google/SignIn'

end

target 'FreshBossUITests' do

inherit! :search_paths

# Pods for testing

pod 'Alamofire', '~> 3.4'

pod 'MBProgressHUD', '~> 0.9.2'

pod 'Google/SignIn'

end

end

1
A copy of your Podfile would help. You may need to just add inherit! :search_paths into your testing target in the Podfile - Hodson
Post your podfile. I'll try helping. - Dershowitz123
i have edited my question.Please have a look on it - Madhumitha
@ Hodson - I have already added that line. - Madhumitha

1 Answers

1
votes

Embed Pods framework is the reason for this.UITest -> Buildphases -> Embed Pods framework is missing.Copy from target and paste it in UITest target.It worked for me.