Joseph Quigley
Joseph Quigley

Reputation: 346

Swift Structs Not Visible In Custom Framework

I'm trying to create a custom framework in Xcode. I've declared two structs, both public with public constants, but when I export the framework all I see defined is:

// Generated by Apple Swift version 3.1 (swiftlang-802.0.53 clang-802.0.42)

public var SWIFT_TYPEDEFS: Int32 { get }

public typealias char16_t = uint_least16_t
public typealias char32_t = uint_least32_t

It appears that the structs are not being included. I didn't initially follow it, but retracing my steps for those reading: I've performed the same steps as mentioned in this tutorial.

How my swift struct is declared:

public struct APIRequest {
    public let domain = "http://example.com"

    public func makeRequest() {
        //Do stuff here
    }
}

Upvotes: 1

Views: 1159

Answers (1)

Joseph Quigley
Joseph Quigley

Reputation: 346

Per @XmasRight's suggestion to upload it to GitHub, I remade the framework from scratch just for the heck of it with a better name that won't collide with anyone else's future framework. In doing so I am now seeing the structs exposed in my compiled framework!

In the previous project I had renamed the project a few times and tweaked the bundle ID a few times while coming up with a name. It seems like maybe something didn't get copied over properly due to outdated names?

Upvotes: 1

Related Questions