Search code examples
swiftsdkframeworkscocoapodsalamofire

Swift : How to include another framework into your framework


So I am learning how to create a framework for swift. And I successfully made a simple framework myself and I called it PunreachSpeaking.

Now I want to import another framework like Alamorefire, Swifty, and so on into PunreachSpeaking.

However, I'm not so sure how. I tried to use pod install but it didn't work. Please help

Simple Code

//
//  Manager.swift
//  PunreachSpeaking
//
//  Created by elite on 2021/04/14.
//

import Foundation
import UIKit
//import Alamofire

public class Manager {
    public init(){}
    
    public func punreachQouting() {
        print("Never miss an opportunity to awesome")
    }
    
    public func getPunreachQouting() -> String {
        return "Never miss an opportunity to awesome"
    }
}

Solution

  • Well, it is easily, you need to put a library you want in podfile, and run pod install. If your SDK wont run the library after the pod intall, verify if this library is Embed in yourProject > General > Frameworks and Libraries.