2

I am using ReactiveCocoa for my iOS app, here are the two related lines of my Podfile:

pod 'ReactiveCocoa', '5.0.0-alpha.3'
pod 'ReactiveObjC'

Since I updated Xcode to version 8.3, I can't compile my code anymore, the compiler throws these errors from Pods/ReactiveSwift/Atomic.swift file:

Let 'value' is private and cannot be referenced from an '@inline(__always)' function

enter image description here

I tried to clean the project, and reinstall the pods (pod install) but I still got that issue. Any idea about how I could solve this problem?

Randy
  • 4,335
  • 3
  • 30
  • 64

3 Answers3

2

Remove private property at

private let value: UnsafeMutablePointer<Int32>

to

let value: UnsafeMutablePointer<Int32>

can resolve this issue

Hieu Tran
  • 36
  • 4
  • Yes I guess so, but I didn't want to modify the pod. Also, I found a solution (c.f. my answer below) – Randy Apr 11 '17 at 15:17
  • But in my case replacing pod 'ReactiveCocoa', '5.0.0-alpha.3' by pod 'ReactiveCocoa', '~> 5.0.0' not working . I used Xcode 8.3.1 'ReactiveCocoa', '~> 5.0.0' Swift 3 – Hieu Tran Apr 17 '17 at 14:38
1

Alright, so replacing

pod 'ReactiveCocoa', '5.0.0-alpha.3'

by

pod 'ReactiveCocoa', '~> 5.0.0'

in my Podfile and running a new pod install solved the problem.

EDIT: looks like it doesn't work anymore so I'll accept Hieu Tran's workaround (be careful though, modifying a pod usually is a bad idea)

Randy
  • 4,335
  • 3
  • 30
  • 64
0

I also had this issue. Go to the root folder and just to remove .xcworkspace, Podfile.lock and Pods catalog. Then you need to run 'pod install' again in the Terminal. After that all will be ok! Enjoy ^_^

Sergey Stadnik
  • 337
  • 2
  • 9