1

I was trying to build and run the below code on simulator but got the linker error:

import UIKit
import ReplayKit

class ViewController: UIViewController {

  var broadcastPicker:RPSystemBroadcastPickerView?

  override func viewDidLoad() {
    super.viewDidLoad()
    // Do any additional setup after loading the view, typically from a nib.
    broadcastPicker = RPSystemBroadcastPickerView(frame: view.frame))
    view.addSubview(broadcastPicker!)
  }
}

Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_RPSystemBroadcastPickerView", referenced from: objc-class-ref in ViewController.o ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

Looks like the RPSystemBroadcastPickerView instance is causing the problem, any idea?

EDIT

I noticed that some ReplayKit classes available in iOS 11 like RPScreenRecorder work just fine, it seems only new classes in iOS 12 could cause issue like this.

devdork
  • 195
  • 1
  • 9
  • 4
    This is not a duplicate of the marked question. This is specifically about iOS 12 symbols missing when building for simulator, even when correctly linking with ReplayKit.framework. – nevyn Sep 05 '18 at 14:21
  • I've reached Apple and they have no intention to provide support for beta software (XCode 10 beta), guess I have to wait for the formal release to see if they'll fix this. – devdork Sep 06 '18 at 01:50
  • 1
    That's not a dup, and I cannot post an answer because this question is marked as a dup. This symbol is only compatible with a real device. Try to compile on a device or on the `Generic iOS Device` instead of Simulator. – Martin Jun 12 '19 at 08:30

0 Answers0