Add a framework to an existing project without usi

2019-05-01 09:14发布

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?

1条回答
相关推荐>>
2楼-- · 2019-05-01 09:38

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

查看更多
登录 后发表回答