New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBDesignables and IBInspectables #335

Closed
raulriera opened this Issue Feb 15, 2015 · 19 comments

Comments

Projects
None yet
@raulriera
Contributor

raulriera commented Feb 15, 2015

Might not be an issue of Carthage per say. But I have ran into problems using IB Designables and IB Inspectables on frameworks using Carthage. Have you encountered this before?

Two examples are MengTo/Spring#11 (comment) and https://github.com/raulriera/TextFieldEffects both are affected by this

@robb

This comment has been minimized.

Show comment
Hide comment
@robb

robb Feb 15, 2015

Member

You happen to have a build log?

Member

robb commented Feb 15, 2015

You happen to have a build log?

@raulriera

This comment has been minimized.

Show comment
Hide comment
@raulriera

raulriera Feb 15, 2015

Contributor

From carthage update? nothing stands out

*** Building scheme "Alamofire iOS" in Alamofire.xcworkspace
*** Building scheme "Alamofire OSX" in Alamofire.xcworkspace
*** Building scheme "KeychainAccess-iOS" in KeychainAccess.xcworkspace
*** Building scheme "KeychainAccess-Mac" in KeychainAccess.xcworkspace
*** Building scheme "OAuthSwift" in OAuthSwift.xcodeproj
*** Building scheme "Spring" in SpringApp.xcodeproj
*** Building scheme "SwiftyJSON" in SwiftyJSON.xcworkspace
*** Building scheme "TextFieldEffects" in TextFieldEffects.xcodeproj

Are the logs somewhere else?

Contributor

raulriera commented Feb 15, 2015

From carthage update? nothing stands out

*** Building scheme "Alamofire iOS" in Alamofire.xcworkspace
*** Building scheme "Alamofire OSX" in Alamofire.xcworkspace
*** Building scheme "KeychainAccess-iOS" in KeychainAccess.xcworkspace
*** Building scheme "KeychainAccess-Mac" in KeychainAccess.xcworkspace
*** Building scheme "OAuthSwift" in OAuthSwift.xcodeproj
*** Building scheme "Spring" in SpringApp.xcodeproj
*** Building scheme "SwiftyJSON" in SwiftyJSON.xcworkspace
*** Building scheme "TextFieldEffects" in TextFieldEffects.xcodeproj

Are the logs somewhere else?

@robb

This comment has been minimized.

Show comment
Hide comment
@robb

robb Feb 15, 2015

Member

Hmm, maybe running the latest carthage with --verbose?

Member

robb commented Feb 15, 2015

Hmm, maybe running the latest carthage with --verbose?

@raulriera

This comment has been minimized.

Show comment
Hide comment
@raulriera

raulriera Feb 15, 2015

Contributor

Running version 0.6.0

Rauls-MacBook-Pro:Swish raulriera$ carthage update --verbose
*** Fetching OAuthSwift
*** Fetching Alamofire
*** Fetching SwiftyJSON
*** Fetching TextFieldEffects
*** Fetching KeychainAccess
*** Fetching Spring
*** Checking out KeychainAccess at "v1.1.2"
*** Checking out OAuthSwift at "v0.3.1"
*** Checking out Alamofire at "1.1.4"
*** Checking out TextFieldEffects at "0.2.7"
*** Checking out Spring at "1.0.1"
*** Checking out SwiftyJSON at "2.1.3"
*** Building scheme "Alamofire iOS" in Alamofire.xcworkspace
Build settings from command line:
    SDKROOT = iphonesimulator8.2

=== BUILD TARGET Alamofire iOS OF PROJECT Alamofire WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/Alamofire-amhdqsdrikewnseofmecbiymyieb/Build/Intermediates/Alamofire.build/all-product-headers.yaml

=== BUILD TARGET Alamofire iOS Tests OF PROJECT Alamofire WITH CONFIGURATION Release ===

Check dependencies

** BUILD SUCCEEDED **

Build settings from command line:
    SDKROOT = iphoneos8.2

=== BUILD TARGET Alamofire iOS OF PROJECT Alamofire WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/Alamofire-amhdqsdrikewnseofmecbiymyieb/Build/Intermediates/Alamofire.build/all-product-headers.yaml

=== BUILD TARGET Alamofire iOS Tests OF PROJECT Alamofire WITH CONFIGURATION Release ===

Check dependencies

** BUILD SUCCEEDED **

*** Building scheme "Alamofire OSX" in Alamofire.xcworkspace
Build settings from command line:
    SDKROOT = macosx10.10

=== BUILD TARGET Alamofire OSX OF PROJECT Alamofire WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/Alamofire-amhdqsdrikewnseofmecbiymyieb/Build/Intermediates/Alamofire.build/all-product-headers.yaml

=== BUILD TARGET Alamofire OSX Tests OF PROJECT Alamofire WITH CONFIGURATION Release ===

Check dependencies

** BUILD SUCCEEDED **

*** Building scheme "KeychainAccess-iOS" in KeychainAccess.xcworkspace
Build settings from command line:
    SDKROOT = iphonesimulator8.2

=== BUILD TARGET KeychainAccess-iOS OF PROJECT KeychainAccess WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/KeychainAccess-cppqcrfovwbmstejuakttxewmqiu/Build/Intermediates/KeychainAccess.build/all-product-headers.yaml

=== BUILD TARGET KeychainAccess-iOSTests OF PROJECT KeychainAccess WITH CONFIGURATION Release ===

Check dependencies

** BUILD SUCCEEDED **

Build settings from command line:
    SDKROOT = iphoneos8.2

=== BUILD TARGET KeychainAccess-iOS OF PROJECT KeychainAccess WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/KeychainAccess-cppqcrfovwbmstejuakttxewmqiu/Build/Intermediates/KeychainAccess.build/all-product-headers.yaml

=== BUILD TARGET KeychainAccess-iOSTests OF PROJECT KeychainAccess WITH CONFIGURATION Release ===

Check dependencies

** BUILD SUCCEEDED **

*** Building scheme "KeychainAccess-Mac" in KeychainAccess.xcworkspace
Build settings from command line:
    SDKROOT = macosx10.10

=== BUILD TARGET KeychainAccess-Mac OF PROJECT KeychainAccess WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/KeychainAccess-cppqcrfovwbmstejuakttxewmqiu/Build/Intermediates/KeychainAccess.build/all-product-headers.yaml

=== BUILD TARGET KeychainAccess-MacTests OF PROJECT KeychainAccess WITH CONFIGURATION Release ===

Check dependencies

** BUILD SUCCEEDED **

*** Building scheme "OAuthSwift" in OAuthSwift.xcodeproj
Build settings from command line:
    SDKROOT = iphonesimulator8.2

=== BUILD TARGET OAuthSwift OF PROJECT OAuthSwift WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/OAuthSwift-fkzcstfheshntzfeppqgdcufkpva/Build/Intermediates/OAuthSwift.build/all-product-headers.yaml

** BUILD SUCCEEDED **

Build settings from command line:
    SDKROOT = iphoneos8.2

=== BUILD TARGET OAuthSwift OF PROJECT OAuthSwift WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/OAuthSwift-fkzcstfheshntzfeppqgdcufkpva/Build/Intermediates/OAuthSwift.build/all-product-headers.yaml

** BUILD SUCCEEDED **

*** Building scheme "Spring" in SpringApp.xcodeproj
Build settings from command line:
    SDKROOT = iphonesimulator8.2

=== BUILD TARGET Spring OF PROJECT SpringApp WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/SpringApp-ecjveguuknkpdmfmolgqugtwfecf/Build/Intermediates/SpringApp.build/all-product-headers.yaml

** BUILD SUCCEEDED **

Build settings from command line:
    SDKROOT = iphoneos8.2

=== BUILD TARGET Spring OF PROJECT SpringApp WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/SpringApp-ecjveguuknkpdmfmolgqugtwfecf/Build/Intermediates/SpringApp.build/all-product-headers.yaml

** BUILD SUCCEEDED **

*** Building scheme "SwiftyJSON" in SwiftyJSON.xcworkspace
Build settings from command line:
    SDKROOT = iphonesimulator8.2

=== BUILD TARGET SwiftyJSON OF PROJECT SwiftyJSON WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/SwiftyJSON-elstjcxdskukxabbgfdtjqqeyymk/Build/Intermediates/SwiftyJSON.build/all-product-headers.yaml

=== BUILD TARGET SwiftyJSONTests OF PROJECT SwiftyJSON WITH CONFIGURATION Release ===

Check dependencies

** BUILD SUCCEEDED **

Build settings from command line:
    SDKROOT = iphoneos8.2

=== BUILD TARGET SwiftyJSON OF PROJECT SwiftyJSON WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/SwiftyJSON-elstjcxdskukxabbgfdtjqqeyymk/Build/Intermediates/SwiftyJSON.build/all-product-headers.yaml

=== BUILD TARGET SwiftyJSONTests OF PROJECT SwiftyJSON WITH CONFIGURATION Release ===

Check dependencies

** BUILD SUCCEEDED **

*** Building scheme "TextFieldEffects" in TextFieldEffects.xcodeproj
Build settings from command line:
    SDKROOT = iphonesimulator8.2

=== BUILD TARGET TextFieldEffects OF PROJECT TextFieldEffects WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/TextFieldEffects-btvosowgienyuuevjqlkbsxsfnag/Build/Intermediates/TextFieldEffects.build/all-product-headers.yaml

** BUILD SUCCEEDED **

Build settings from command line:
    SDKROOT = iphoneos8.2

=== BUILD TARGET TextFieldEffects OF PROJECT TextFieldEffects WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/TextFieldEffects-btvosowgienyuuevjqlkbsxsfnag/Build/Intermediates/TextFieldEffects.build/all-product-headers.yaml

** BUILD SUCCEEDED **
Contributor

raulriera commented Feb 15, 2015

Running version 0.6.0

Rauls-MacBook-Pro:Swish raulriera$ carthage update --verbose
*** Fetching OAuthSwift
*** Fetching Alamofire
*** Fetching SwiftyJSON
*** Fetching TextFieldEffects
*** Fetching KeychainAccess
*** Fetching Spring
*** Checking out KeychainAccess at "v1.1.2"
*** Checking out OAuthSwift at "v0.3.1"
*** Checking out Alamofire at "1.1.4"
*** Checking out TextFieldEffects at "0.2.7"
*** Checking out Spring at "1.0.1"
*** Checking out SwiftyJSON at "2.1.3"
*** Building scheme "Alamofire iOS" in Alamofire.xcworkspace
Build settings from command line:
    SDKROOT = iphonesimulator8.2

=== BUILD TARGET Alamofire iOS OF PROJECT Alamofire WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/Alamofire-amhdqsdrikewnseofmecbiymyieb/Build/Intermediates/Alamofire.build/all-product-headers.yaml

=== BUILD TARGET Alamofire iOS Tests OF PROJECT Alamofire WITH CONFIGURATION Release ===

Check dependencies

** BUILD SUCCEEDED **

Build settings from command line:
    SDKROOT = iphoneos8.2

=== BUILD TARGET Alamofire iOS OF PROJECT Alamofire WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/Alamofire-amhdqsdrikewnseofmecbiymyieb/Build/Intermediates/Alamofire.build/all-product-headers.yaml

=== BUILD TARGET Alamofire iOS Tests OF PROJECT Alamofire WITH CONFIGURATION Release ===

Check dependencies

** BUILD SUCCEEDED **

*** Building scheme "Alamofire OSX" in Alamofire.xcworkspace
Build settings from command line:
    SDKROOT = macosx10.10

=== BUILD TARGET Alamofire OSX OF PROJECT Alamofire WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/Alamofire-amhdqsdrikewnseofmecbiymyieb/Build/Intermediates/Alamofire.build/all-product-headers.yaml

=== BUILD TARGET Alamofire OSX Tests OF PROJECT Alamofire WITH CONFIGURATION Release ===

Check dependencies

** BUILD SUCCEEDED **

*** Building scheme "KeychainAccess-iOS" in KeychainAccess.xcworkspace
Build settings from command line:
    SDKROOT = iphonesimulator8.2

=== BUILD TARGET KeychainAccess-iOS OF PROJECT KeychainAccess WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/KeychainAccess-cppqcrfovwbmstejuakttxewmqiu/Build/Intermediates/KeychainAccess.build/all-product-headers.yaml

=== BUILD TARGET KeychainAccess-iOSTests OF PROJECT KeychainAccess WITH CONFIGURATION Release ===

Check dependencies

** BUILD SUCCEEDED **

Build settings from command line:
    SDKROOT = iphoneos8.2

=== BUILD TARGET KeychainAccess-iOS OF PROJECT KeychainAccess WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/KeychainAccess-cppqcrfovwbmstejuakttxewmqiu/Build/Intermediates/KeychainAccess.build/all-product-headers.yaml

=== BUILD TARGET KeychainAccess-iOSTests OF PROJECT KeychainAccess WITH CONFIGURATION Release ===

Check dependencies

** BUILD SUCCEEDED **

*** Building scheme "KeychainAccess-Mac" in KeychainAccess.xcworkspace
Build settings from command line:
    SDKROOT = macosx10.10

=== BUILD TARGET KeychainAccess-Mac OF PROJECT KeychainAccess WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/KeychainAccess-cppqcrfovwbmstejuakttxewmqiu/Build/Intermediates/KeychainAccess.build/all-product-headers.yaml

=== BUILD TARGET KeychainAccess-MacTests OF PROJECT KeychainAccess WITH CONFIGURATION Release ===

Check dependencies

** BUILD SUCCEEDED **

*** Building scheme "OAuthSwift" in OAuthSwift.xcodeproj
Build settings from command line:
    SDKROOT = iphonesimulator8.2

=== BUILD TARGET OAuthSwift OF PROJECT OAuthSwift WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/OAuthSwift-fkzcstfheshntzfeppqgdcufkpva/Build/Intermediates/OAuthSwift.build/all-product-headers.yaml

** BUILD SUCCEEDED **

Build settings from command line:
    SDKROOT = iphoneos8.2

=== BUILD TARGET OAuthSwift OF PROJECT OAuthSwift WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/OAuthSwift-fkzcstfheshntzfeppqgdcufkpva/Build/Intermediates/OAuthSwift.build/all-product-headers.yaml

** BUILD SUCCEEDED **

*** Building scheme "Spring" in SpringApp.xcodeproj
Build settings from command line:
    SDKROOT = iphonesimulator8.2

=== BUILD TARGET Spring OF PROJECT SpringApp WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/SpringApp-ecjveguuknkpdmfmolgqugtwfecf/Build/Intermediates/SpringApp.build/all-product-headers.yaml

** BUILD SUCCEEDED **

Build settings from command line:
    SDKROOT = iphoneos8.2

=== BUILD TARGET Spring OF PROJECT SpringApp WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/SpringApp-ecjveguuknkpdmfmolgqugtwfecf/Build/Intermediates/SpringApp.build/all-product-headers.yaml

** BUILD SUCCEEDED **

*** Building scheme "SwiftyJSON" in SwiftyJSON.xcworkspace
Build settings from command line:
    SDKROOT = iphonesimulator8.2

=== BUILD TARGET SwiftyJSON OF PROJECT SwiftyJSON WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/SwiftyJSON-elstjcxdskukxabbgfdtjqqeyymk/Build/Intermediates/SwiftyJSON.build/all-product-headers.yaml

=== BUILD TARGET SwiftyJSONTests OF PROJECT SwiftyJSON WITH CONFIGURATION Release ===

Check dependencies

** BUILD SUCCEEDED **

Build settings from command line:
    SDKROOT = iphoneos8.2

=== BUILD TARGET SwiftyJSON OF PROJECT SwiftyJSON WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/SwiftyJSON-elstjcxdskukxabbgfdtjqqeyymk/Build/Intermediates/SwiftyJSON.build/all-product-headers.yaml

=== BUILD TARGET SwiftyJSONTests OF PROJECT SwiftyJSON WITH CONFIGURATION Release ===

Check dependencies

** BUILD SUCCEEDED **

*** Building scheme "TextFieldEffects" in TextFieldEffects.xcodeproj
Build settings from command line:
    SDKROOT = iphonesimulator8.2

=== BUILD TARGET TextFieldEffects OF PROJECT TextFieldEffects WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/TextFieldEffects-btvosowgienyuuevjqlkbsxsfnag/Build/Intermediates/TextFieldEffects.build/all-product-headers.yaml

** BUILD SUCCEEDED **

Build settings from command line:
    SDKROOT = iphoneos8.2

=== BUILD TARGET TextFieldEffects OF PROJECT TextFieldEffects WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/raulriera/Library/Developer/Xcode/DerivedData/TextFieldEffects-btvosowgienyuuevjqlkbsxsfnag/Build/Intermediates/TextFieldEffects.build/all-product-headers.yaml

** BUILD SUCCEEDED **
@robb

This comment has been minimized.

Show comment
Hide comment
@robb

robb Feb 15, 2015

Member

Hmm, seems to build correctly. If you build the framework without Carthage and integrate it, do your custom views show up correctly in Interface Builder?

Member

robb commented Feb 15, 2015

Hmm, seems to build correctly. If you build the framework without Carthage and integrate it, do your custom views show up correctly in Interface Builder?

@raulriera

This comment has been minimized.

Show comment
Hide comment
@raulriera

raulriera Feb 15, 2015

Contributor

Hmmm, building the project and the adding the resulting framework from the derived data folder has the same result (can't be used in Storyboards)... Maybe I am doing something wrong here with these frameworks

Contributor

raulriera commented Feb 15, 2015

Hmmm, building the project and the adding the resulting framework from the derived data folder has the same result (can't be used in Storyboards)... Maybe I am doing something wrong here with these frameworks

@robb

This comment has been minimized.

Show comment
Hide comment
@robb

robb Feb 15, 2015

Member

I'm tentatively closing this one then, since it seems to be either a configuration issue or an issue with Xcode. Feel free to reopen this if you have any new insights ✌️

Member

robb commented Feb 15, 2015

I'm tentatively closing this one then, since it seems to be either a configuration issue or an issue with Xcode. Feel free to reopen this if you have any new insights ✌️

@raulriera

This comment has been minimized.

Show comment
Hide comment
@raulriera

raulriera May 5, 2015

Contributor

Apparently this is a limitation in frameworks? when they are compiled all the IBDesignable and IBInspectable information is lost.

Have you guys ever created a reusable .framework file that supports them?

Contributor

raulriera commented May 5, 2015

Apparently this is a limitation in frameworks? when they are compiled all the IBDesignable and IBInspectable information is lost.

Have you guys ever created a reusable .framework file that supports them?

@yoichitgy

This comment has been minimized.

Show comment
Hide comment
@yoichitgy

yoichitgy May 10, 2015

Contributor

I had the same issue. It looks a limitation of a built framework. Check the header file (TargetName-Swift.h) in the built framework folder. It has no information for IBDesignable and IBInspectable though IBOutlet can be marked to properties in the header file. For now, the framework project must be added to your product project to enable IBDesignable and IBInspectable, or just use User Defined Runtime Attributes instead. I hope a future update of Xcode solve the issue.

Contributor

yoichitgy commented May 10, 2015

I had the same issue. It looks a limitation of a built framework. Check the header file (TargetName-Swift.h) in the built framework folder. It has no information for IBDesignable and IBInspectable though IBOutlet can be marked to properties in the header file. For now, the framework project must be added to your product project to enable IBDesignable and IBInspectable, or just use User Defined Runtime Attributes instead. I hope a future update of Xcode solve the issue.

@cybertk

This comment has been minimized.

Show comment
Hide comment
@cybertk

cybertk Sep 6, 2015

Still no good on Xcode 7 Beta 6

cybertk commented Sep 6, 2015

Still no good on Xcode 7 Beta 6

@BarlowTucker

This comment has been minimized.

Show comment
Hide comment
@BarlowTucker

BarlowTucker Oct 14, 2015

Has anyone else filed an issue with Apple yet?

https://openradar.appspot.com/23114017

BarlowTucker commented Oct 14, 2015

Has anyone else filed an issue with Apple yet?

https://openradar.appspot.com/23114017

@raulriera

This comment has been minimized.

Show comment
Hide comment
@raulriera

raulriera Oct 14, 2015

Contributor

I did, it was marked as duplicate a loooong time ago

Contributor

raulriera commented Oct 14, 2015

I did, it was marked as duplicate a loooong time ago

@tylerlong

This comment has been minimized.

Show comment
Hide comment
@tylerlong

tylerlong Jun 4, 2016

The issue was reported 16 months ago and there is still no ideal solution.

I have a workaround for this problem and I posted it onto stackoverflow: http://stackoverflow.com/questions/29933691/ibdesignable-from-external-framework/37631860#37631860 The basic idea is to create a sub class for the view in the destination app:

@IBDesignable
class MyCustomView: CustomView {

    @IBInspectable override var bgColor: NSColor {
        get {
            return super.bgColor
        }
        set {
            super.bgColor = newValue
        }
    }
}

Please read here for more details: http://stackoverflow.com/questions/29933691/ibdesignable-from-external-framework/37631860#37631860

If you like it please vote up. 👍

tylerlong commented Jun 4, 2016

The issue was reported 16 months ago and there is still no ideal solution.

I have a workaround for this problem and I posted it onto stackoverflow: http://stackoverflow.com/questions/29933691/ibdesignable-from-external-framework/37631860#37631860 The basic idea is to create a sub class for the view in the destination app:

@IBDesignable
class MyCustomView: CustomView {

    @IBInspectable override var bgColor: NSColor {
        get {
            return super.bgColor
        }
        set {
            super.bgColor = newValue
        }
    }
}

Please read here for more details: http://stackoverflow.com/questions/29933691/ibdesignable-from-external-framework/37631860#37631860

If you like it please vote up. 👍

@defagos

This comment has been minimized.

Show comment
Hide comment
@defagos

defagos Oct 12, 2016

I found a way to have designables work with Cocoa Touch frameworks. You can supply a source file where designable attributes are provided on categories, and which clients can then use when compiling their project.

For full details, please read http://stackoverflow.com/a/39999914/760435

defagos commented Oct 12, 2016

I found a way to have designables work with Cocoa Touch frameworks. You can supply a source file where designable attributes are provided on categories, and which clients can then use when compiling their project.

For full details, please read http://stackoverflow.com/a/39999914/760435

@toshi0383

This comment has been minimized.

Show comment
Hide comment
@toshi0383

toshi0383 Jan 10, 2017

Contributor

Forgive me commenting after closed, but I want to add a simple conclusion to this issue. It's sometimes hard to read all comments in SO for non-native English reader.

For library author, this solves the issue.
expose-ibbrabra

Contributor

toshi0383 commented Jan 10, 2017

Forgive me commenting after closed, but I want to add a simple conclusion to this issue. It's sometimes hard to read all comments in SO for non-native English reader.

For library author, this solves the issue.
expose-ibbrabra

@agiguere

This comment has been minimized.

Show comment
Hide comment
@agiguere

agiguere Jan 10, 2017

Xcode 8 and Swift 3, 1 year later, still no solution ???

agiguere commented Jan 10, 2017

Xcode 8 and Swift 3, 1 year later, still no solution ???

@farshadtx

This comment has been minimized.

Show comment
Hide comment
@farshadtx

farshadtx Feb 6, 2017

Still no solution to this issue ?

farshadtx commented Feb 6, 2017

Still no solution to this issue ?

@SirWellington

This comment has been minimized.

Show comment
Hide comment
@SirWellington

SirWellington Sep 22, 2017

Bump. Any word?

SirWellington commented Sep 22, 2017

Bump. Any word?

@mdiep

This comment has been minimized.

Show comment
Hide comment
@mdiep

mdiep Oct 3, 2017

Member

This is an Apple/Xcode limitation. It’s not something that Carthage can fix.

Member

mdiep commented Oct 3, 2017

This is an Apple/Xcode limitation. It’s not something that Carthage can fix.

@Carthage Carthage locked and limited conversation to collaborators Oct 3, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.