Swift: Importing Custom Framework – Use of Unresolved Identifier

After moving some code into an external framework I’ve been trying to import and use the framework in my app. I’ve added the framework as a dependency in my app.

My framework is called DiceKit. In one of the classes, just to test things out, I’ve added import DiceKit to the top of my file. This is not throwing any errors.

When I try to access the classes that should be in the framework, I get a Use of Unresolved Identifier error.

import UIKit
import DiceKit

class FirstViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        println (Die(12).roll())   // `Die` doesn't exist at compile time
    }
}

What could be causing the classes in the framework to not be compiled? I have made sure that all the classes and methods are marked with public and I haven’t changed any build settings from the default in my framework.

I’m using XCode 6.3 Beta

Thanks for your help!


Source: ios

Leave a Reply