-2

The Terminal Error I am receiving after running pod install is: enter image description here

I realize that ReactiveCocoa's cocoapod is entirely in SWIFT and that I need to Bridge the header files, but my attempts have been far from successful.

I did find this response from one of TeamTreehouse's Staff:

"The SimpleAuth library has it's own set of dependencies one of which is ReactiveCocoa. ReactiveCocoa was recently rewritten completely in Swift so that's the Swift code that's getting added to your project. Unfortunately there are 2 versions of ReactiveCocoa out there, written in Swift 1.2 and Swift 2.0.

SimpleAuth is currently automatically pulling the 1.2 version of ReactiveCocoa. Swift 1.2 can only be run in Xcode 6.1 and not in Xcode 7 (which requires Swift 2).

So if you are using Xcode 7, then you're pulling in the Swift 1.2 version by default and this is causing all the Swift errors.

Also, you have to do some cleanup work to get Swift frameworks to run in a mixed Objective-C/Swift project which includes adding a bridging header and stuff."

.

^^ Explains my Problem ^^

Thanks in advance!

Edit

After adding use_frameworks! to my Podfile, I was receiving errors like:

enter image description here

ChrisHaze
  • 2,800
  • 16
  • 20

4 Answers4

0

The error message says to add the line use_frameworks! to your file called Podfile.

Add it below the first line that should probably say platform :ios, 'x.0'.

Lars Blumberg
  • 19,326
  • 11
  • 90
  • 127
0

You need to use ReactiveCocoa 4.0, which is target Swift 2.0, yet still under alpha version.

If you want to have a try, check this out.

use_frameworks!

target 'YOUR_TARGET' do
    pod 'ReactiveCocoa', '~> 4.0.0-alpha'
end
Johnny Wang
  • 256
  • 2
  • 5
0

After attempting use_frameworks! within my pod file, I was still experiencing errors due to ReactiveCocoa and the .swift files (even after auto-correcting the errors that Xcode attempted to fix for me).

Within my Podfile I was able to resolve both sets of errors I was experiencing: 1. When including use_frameworks! in the Podfile 2. Also when running my original pod install in hopes of adding the Parse cocoapod

Final code in Podfile

pod 'ReactiveCocoa', '2.4.7'
pod 'SimpleAuth/Instagram', '0.3.6'
pod 'SSKeychain'
pod 'Parse'
ChrisHaze
  • 2,800
  • 16
  • 20
0

You can actually request the latest version of the dependencies. Your Podfile should look like this:

platform :ios, "9.0"
use_frameworks!

target 'MyAppNameHere' do

    end

pod 'Box', :head
pod 'Result', :head
pod 'SimpleAuth/Instagram'

Then peform a pod update and in your project, Product > Clean and Product > Build and will work again.

Mike S.
  • 4,806
  • 1
  • 33
  • 35