-1

I downloaded the a frame work for parsing son links from here

and I googled how to to import a frame work into Xcode project, and it was as follows:

-highlighted the root of my project "the blue icon"

-chose 'build phases'

-chose 'link library'

-click on the plus sign '+'

-then, 'add another'

-navigated to the frame work I downloaded, but in the end nothing was added

please let me know how to import a frame work properly in Xcode

img:

cocoaPod-1

enter image description here

cocoaPods-2

enter image description here

Amrmsmb
  • 1
  • 27
  • 104
  • 226
  • 2
    Possible duplicate of [How to "add existing frameworks" in Xcode 4?](https://stackoverflow.com/questions/3352664/how-to-add-existing-frameworks-in-xcode-4) – mag_zbc Aug 03 '17 at 08:49
  • Why don't you use CocoaPods? That framework has the instructions in the readme. – Pochi Aug 03 '17 at 08:54
  • Didn't check more carefully, but I didn't saw a .framework there. But did you check that https://github.com/stig/json-framework#installation ? CocoaPods is quite good, (Google iOS API recommends it). – Larme Aug 03 '17 at 08:54
  • @Larme in the link you provided it say:pod 'SBJson5', '~> 5.0.0' where should I write this command please – Amrmsmb Aug 03 '17 at 08:59
  • 1
    Read about CocoaPods: https://cocoapods.org – Larme Aug 03 '17 at 09:04

2 Answers2

-1

You can add it through Cocoapods. Follow below steps to do it properly.

Step1: First open your terminal and type cd your project path.

Example: UNTITLED:~ apple$ cd /Volumes/DATAPART/MyProjects/SampleProject

Step2: Create a pod file with pod init command.

Example: UNTITLED:SampleProject apple$ pod init

Step3: Open pod file and add your pod reference by copying this line into that file.

pod 'SBJson5', '~> 5.0.0'

Step5: Save and close your pod file.

Step6: Type install pod in terminal.

Example: UNTITLED:SampleProject apple$ pod install

Step5: Then A Xcodeworkspace file will be created in your project folder. Just close your Xcode and open your Xcodeworkspace file. Thats it.

Krishnarjun Banoth
  • 1,410
  • 1
  • 15
  • 30
-1

One option is to use CocoaPods. From other comments by yourself, it seems you are not super confident in using Terminal so you can instead make use of the CocoaPods App

  1. Download and install the CocoaPods App
  2. Open the CocoaPods App and click File > New Podfile from Xcode Project
  3. A window should open up and you can browse to your Xcode project file
  4. A new window will open up with your Podfile and there will be a comment # Pods for [project]. Here is where you enter pod 'SBJson5', '~> 5.0.0'
  5. At the top of the Podfile window, click Install
  6. A xcworskapce will have been created for you. From now on, open that instead of the Xcode project file.

These are some rough/basic steps but you should read up more on CocoaPods to make sure you understand what is going on.

Some screenshots for reference:

Add the pod to the Podfile Successful installation of pod Confirm pod installed

Hodson
  • 3,438
  • 1
  • 23
  • 51
  • please see the two pictures I added above 'cocoaPods-1' and 'cocoaPods-2' in either of them I can not write the command 'pod 'SBJson5', '~> 5.0.0'' – Amrmsmb Aug 03 '17 at 15:28
  • What you you mean you can't write the command? You should be able to type it on the line under where it says `# Pods for Delegate-2`. I've added some screenshots to my answer to show where I am typing it. – Hodson Aug 04 '17 at 07:48
  • do you mean I should write that command in the 1st screen shot in my question which is titled 'cocoa pod-1"?? – Amrmsmb Aug 04 '17 at 09:59
  • Yes. Type it on the line under where it says `# Pods for Delegate-2` – Hodson Aug 04 '17 at 10:35