1

I'm new on iOS and i don't understand somethings.

First, I need to make a library as in Android. So it is correct to make a cocoa touch framework? So i have this project structure :

project ios

Next, i need to import this sdk to use it inside my framework. https://github.com/kontaktio/kontakt-ios-sdk

But i don't find how to import this one. I have try to drag and drop the KontaktSdk.framework inside the ..._library but i have this error when i run my app : dyld: Library not loaded: @rpath/KontaktSDK.framework/KontaktSDK Referenced from: /private/var/containers/Bundle/Application/7A74722F-D2C5-49F2-BC77-955B90B1A421/..._app.app/Frameworks/..._library.framework/..._library Reason: image not found (lldb)

I have tried to follow this instruction: Kontakt sdk

But in the framework, i don't have the "Embedded Binaries" section.

I hope you can help me =) Thanks

2
  • 1
    yes it is cocoa touch framework. also try to use cocoapods for importing Commented Mar 20, 2017 at 10:46
  • Try using CocoaPods to include kontakt. CocoaPods will do a lot of work for you. Commented Mar 20, 2017 at 10:46

1 Answer 1

2

You don't need to use CocoaPods.

You need to embed KontaktSdk.framework in your application's build phase. Since your library's output is not an .app bundle, it does not have a /Frameworks directory inside it. That's why it does not have a "Embed Framework" build phase.

You should link KontaktSdk.framework framework against your _library, but embed KontaktSdk.framework into your application target.

Sign up to request clarification or add additional context in comments.

2 Comments

So if i have understood, i need to link the kontaktSDK in the app (as described in the doc) and i can use it in my framework? But it means that all dev who use my framework to make they own app need to add this framework to their app to use my framework? It is right?
Yes. You'll need to ship other frameworks and your customers need to embed them themselves. Or you could request a static kontaktSDK from vendor and link it against you library. There is an "umbrella framework" concept btw. But it's highly discorouraged on macOS (developer.apple.com/library/content/documentation/MacOSX/…), and apparently impossible on iOS (developer.apple.com/library/content/technotes/tn2435/…).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.