Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 364
Peter Pik Avatar asked Nov 13 '14 11:11

Peter Pik


People also ask

How do I add dependencies to CocoaPods?

After you have initially installed CocoaPods into your project, you can add new dependencies (or remove unused ones) by editing the Podfile. Then simply run pod install again.

How do you make a CocoaPods framework?

Create a Cocoa Touch Framework Xcode project Under the hood, a CocoaPods library is a Cocoa Touch framework library. Launch Xcode and create a new project, choose Cocoa Touch Framework . Enter the name SwiftyLib , select the checkbox Include Unit Tests .


1 Answers

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

like image 50
bandejapaisa Avatar answered Sep 24 '22 00:09

bandejapaisa