Ch0k0l8
Ch0k0l8

Reputation: 837

"Playground execution failed" when using XCPShowView(identifier: view:)

When using XCPShowView the Swift Playground gives me

Playground execution failed: error: Couldn't lookup symbols:

 __TF12XCPlayGround11XCPShowViewFTSSCSo6UIView_T_

I use xcrun swift-demangle __TF12XCPlayGround11XCPShowViewFTSSCSo6UIView_T_ to see what's the demangled name and it's

XCPlayGround.XCPShowView (Swift.String,ObjectiveC.UIView) -> ()

(Though you can see what's the demangled name just by reading __TF12XCPlayGround11XCPShowViewFTSSCSo6UIView_T_)

The code is here

import UIKit
import XCPlayGround

let modelView: UIView = UIView(frame: CGRect(x: 0, y: 0, width: 375.0, height: 667.0))

XCPShowView("modelView", modelView)

What's wrong?

Upvotes: 0

Views: 842

Answers (2)

Ch0k0l8
Ch0k0l8

Reputation: 837

I got this answer from engineer

Engineering has the following feedback for you:

In any case, this issue is addressed in the new Xcode 6,.3 seed.

Upvotes: 0

nevyn
nevyn

Reputation: 7122

The module is called "XCPlayground", not "XCPlayGround". Symbol lookup is case sensitive. The import is probably not case sensitive on a standard HFS+ filesystem, so that would explain why the import works but the symbol fails to be found. Try changing it to "XCPlayground" and see if that fixes it.

Upvotes: 2

Related Questions