简体   繁体   中英

Add a framework to an existing project without using cocoapods

I've got an existing project where i want to add the framework called CoreActionSheetPicker from

https://github.com/skywinder/ActionSheetPicker-3.0

The problem is i cant seem to add the framework to my project? when i pull the framework over to my existing project none of the files below is added and when i try to import it says it does not exist

import CoreActionSheetPicker

I want to do this without cocoaPods. What is the steps in order to do such? i'm using swift. Do i first need to create a WorkSpace?

I've just cloned it, and it appears the project file is invalid. You can see this by trying to open it. You should raise the issue with the owner on GitHub, which is how you're supposed to ask questions about projects there. Then you will get feedback directly from the creator or at least someone else who knows about that project.

As for adding a project,

  1. Download the source
  2. Drag the .xcodeproj into your project within Xcode
  3. Add the framework in Build Phases / link binary with libraries
  4. Add it as a Build Phase / target dependency.

Note that at the moment, you should always builds 3rd part libraries with your swift project, and not just include the binary. See here about binary compatibility of frameworks:

https://developer.apple.com/swift/blog/?id=2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM