4
votes

I am trying to integrate swift framework with objective-c application.when i am running i am getting a crash

@objc public class EquipmentManager{

var sampleString : String = ""

@objc public init(str:String){
    self.sampleString = str
}

@objc public func returnString() ->NSString{
    return sampleString
}
}

I am trying to access this class dyld: Library not loaded: @rpath/EquipmentManager.framework/EquipmentManager Referenced from: /private/var/mobile/Containers/Bundle/Application/0A26433B-B169-48A7-A006-528D076FB8A9/ObjcTest.app/ObjcTest Reason: image not found

Has anyone integrated objective-c application with swift framework?

1
i could access swift code within the same application. My problem is that i have created a swift framework and when i try to access it, I am getting a crash.visweswaran chidambaram

1 Answers

3
votes

Try This out:

There is an "Embedded Content Contains Swift Code" flag in the Build Settings that needs to be set to YES. It is NO by default!

enter image description here

Reference: TALAA

Hope This Works!