5

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?

Peter Pik
  • 11,023
  • 19
  • 84
  • 142

1 Answers1

6

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

bandejapaisa
  • 26,576
  • 13
  • 94
  • 112
  • Yes i knew that but there does not seem to be any problem the project here. It works fine when i simulate in the current workspace in the project. – Peter Pik Nov 13 '14 at 11:43
  • 1
    I get the error "project is missing it's project.pbxproj file" – bandejapaisa Nov 13 '14 at 11:46
  • 2
    Open the workSpace and compile and it will work. How can i move the CoreActionSheetPicker from the workSpace into an existing project – Peter Pik Nov 13 '14 at 13:59
  • If you right click 'CoreActionSheetPicker' and click 'show in finder', you can see where its Xcode project file is. You can drag this into your project by following the steps above. Note, you will only be allowed to have it open in one project at a time, so you will need to close the actionsheetpicker workspace. – bandejapaisa Nov 13 '14 at 14:01