[GH-ISSUE #38] Library not loaded #20

Closed
opened 2026-03-03 16:44:51 +03:00 by kerem · 6 comments
Owner

Originally created by @Niels-P on GitHub (Mar 23, 2015).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/38

When I run the following code in the emulator on a virtual device it runs without a problem, but when I run it on a real iPhone 6 it gives me the following error. Anyone that has a solution for this problem? I run currently (Xcode 6.2 with branche OAuthSwift-ad0f2ecca892e3bd309f09eeb8f591036faebacb) so that's not swift 1.2.

dyld: Library not loaded: @rpath/OAuthSwift.framework/OAuthSwift
  Referenced from: /private/var/mobile/Containers/Bundle/Application/4491E67B-580A-430F-84F3-E571CCD1B184/LinkingSkills.app/LinkingSkills
  Reason: image not found
(lldb) 
import UIKit
import OAuthSwift

class LinkedinLoginViewController: UIViewController, NSXMLParserDelegate {
    let dataString = NSString();
    var parser = NSXMLParser()
    var posts = NSMutableArray()
    var elements = NSMutableDictionary()
    var element = NSString()

    var voornaam = NSMutableString()
    var achternaam = NSMutableString()
    var skills = NSMutableArray()


    override func viewDidLoad() {
        super.viewDidLoad()
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
    }
}
Originally created by @Niels-P on GitHub (Mar 23, 2015). Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/38 When I run the following code in the emulator on a virtual device it runs without a problem, but when I run it on a real iPhone 6 it gives me the following error. Anyone that has a solution for this problem? I run currently (Xcode 6.2 with branche OAuthSwift-ad0f2ecca892e3bd309f09eeb8f591036faebacb) so that's not swift 1.2. ``` dyld: Library not loaded: @rpath/OAuthSwift.framework/OAuthSwift Referenced from: /private/var/mobile/Containers/Bundle/Application/4491E67B-580A-430F-84F3-E571CCD1B184/LinkingSkills.app/LinkingSkills Reason: image not found (lldb) ``` ``` import UIKit import OAuthSwift class LinkedinLoginViewController: UIViewController, NSXMLParserDelegate { let dataString = NSString(); var parser = NSXMLParser() var posts = NSMutableArray() var elements = NSMutableDictionary() var element = NSString() var voornaam = NSMutableString() var achternaam = NSMutableString() var skills = NSMutableArray() override func viewDidLoad() { super.viewDidLoad() } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } } ```
kerem closed this issue 2026-03-03 16:44:51 +03:00
Author
Owner

@hopye commented on GitHub (Apr 15, 2015):

This is also happening to me, can someone explain how to fix ???

<!-- gh-comment-id:93585156 --> @hopye commented on GitHub (Apr 15, 2015): This is also happening to me, can someone explain how to fix ???
Author
Owner

@hopye commented on GitHub (Apr 15, 2015):

xcode 6.2, swift 1.1

<!-- gh-comment-id:93585226 --> @hopye commented on GitHub (Apr 15, 2015): xcode 6.2, swift 1.1
Author
Owner

@gabriel-jones commented on GitHub (Apr 15, 2015):

I once had a problem like this where it was looking for the files under the directory for .../iphone/... instead of .../iphone-simulator/...

Maybe try changing this?

<!-- gh-comment-id:93585648 --> @gabriel-jones commented on GitHub (Apr 15, 2015): I once had a problem like this where it was looking for the files under the directory for .../iphone/... instead of .../iphone-simulator/... Maybe try changing this?
Author
Owner

@hopye commented on GitHub (Apr 15, 2015):

Thanks a lot, i already had like an hour looking for this, and after writing here i think i have found it. it is working now. I had to Select my main Project workspace. GENERAL TAB -> EMBED BINARIES and include the OauthSwift Framework there, also in LINKED FRAMEWORKS AND LIBRARIES. This is apart from including it in Build Phases -> target dependencies and Link with binaries... Thanks a lot For Replying!!!

<!-- gh-comment-id:93586807 --> @hopye commented on GitHub (Apr 15, 2015): Thanks a lot, i already had like an hour looking for this, and after writing here i think i have found it. it is working now. I had to Select my main Project workspace. GENERAL TAB -> EMBED BINARIES and include the OauthSwift Framework there, also in LINKED FRAMEWORKS AND LIBRARIES. This is apart from including it in Build Phases -> target dependencies and Link with binaries... Thanks a lot For Replying!!!
Author
Owner

@jdbateman commented on GitHub (May 11, 2016):

Same problem on Xcode 7.3.1 building for iPhone running iOS 9.3. Thanks a million hopye for pointing me in the right direction! I had OAuthSwift.framework listed in my Target > Build Phases > Link Binary with Libraries producing the similar failure at runtime. Adding the same framework to my Target > General > Embedded Libraries and my Target > General > Linked Frameworks and Libraries fixed the runtime error.

<!-- gh-comment-id:218370161 --> @jdbateman commented on GitHub (May 11, 2016): Same problem on Xcode 7.3.1 building for iPhone running iOS 9.3. Thanks a million hopye for pointing me in the right direction! I had OAuthSwift.framework listed in my Target > Build Phases > Link Binary with Libraries producing the similar failure at runtime. Adding the same framework to my Target > General > Embedded Libraries and my Target > General > Linked Frameworks and Libraries fixed the runtime error.
Author
Owner

@hopye commented on GitHub (May 11, 2016):

@jdbateman Best Regards!

<!-- gh-comment-id:218515772 --> @hopye commented on GitHub (May 11, 2016): @jdbateman Best Regards!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/OAuthSwift#20
No description provided.