Open pronebird opened 9 years ago
I haven't heard of this issue yet. Are you sure this is a CocoaPods issue? Are you using Xcode 6? I'm not sure where to go from here, have you tried the example project?
I use Xcode 6.1.1 GM. I assume it's a problem with pods but I may be wrong. I'll re-check again. Haven't tried example project.
On Monday, December 1, 2014, Tobias Hagemann notifications@github.com wrote:
I haven't heard of this issue yet. Are you sure this is a CocoaPods issue? Are you using Xcode 6? I'm not sure where to go from here, have you tried the example project?
— Reply to this email directly or view it on GitHub https://github.com/MuscleRumble/THLabel/issues/28#issuecomment-65040522.
If you still find this issue, it would be great if you could send me a minimal project example to tobias.hagemann@gmail.com so that I can look into it!
I integrated THLabel in one of my apps but later dropped it as the idea of labels customizations has been cancelled. I'll let you know if this pops up in further when I use it next time.
@pronebird seems the issue is related to Cocoapods: https://github.com/CocoaPods/CocoaPods/issues/2792
@MuscleRumble trying the example project cannot simulate the issue. It's not using Cocoapods to use THLabel.
Thanks for the info @chakming! :) So... I have to wait for Frameworks support?
I guess so. At this moment, the only way to render them correctly in Interface Builder, is to import THLabel manually, instead through Cocoapods...but I still prefer Cocoapods installation haha
Yeah, CocoaPods should be the way to go. Too bad. :grin:
I'll check if this bug fixed in 6.1.1.
I attempted to use THLabel through cocoapods and IBDesignable didn't work. Interface Builder complained and then stopped updating the label. After that it wouldn't let me update any properties either.
Eventually I worked around the problem by moving THLabel.* into my project and commenting out IBDesignable/IBInspectable.
IBDesignable in general seems to be quite buggy, especially with Swift. Sigh. You might want to consider removing support for IBDesignable until Xcode gets its act together.
Thanks for your suggestion @gurgeous! I've released 1.4.6 and I'll just wait with IBDesignable until it all works out. :)
NOOOOOOOooooooooooo! God damn it Apple, why you so broken.
oh, I have the same problem, I just drag the source code to my Xcode project and remove it from CocoaPods, it works well. I think this is a Xcode bug, Xcode can`t parse @IBDesignable class from a static lib
This is now working with Cocoapods (0.36.1.beta.1) and by adding use_frameworks!
in your Podfile
. More information here.
Thanks for the info @Eddpt! To everyone who's interested in using THLabel with Interface Builder, should follow @Eddpt's instructions and use the ibdesignable
branch:
pod 'THLabel', :git => 'https://github.com/MuscleRumble/THLabel.git', :branch => 'ibdesignable'
I'll keep this issue open until the new version of CocoaPods is out of beta. And when that happens, I'll merge the ibdesignable
branch into master
.
CocoaPods 0.36 is now out of beta, but I'm not sure if I should merge ibdesignable
branch into master
. By adding use_frameworks!
to your Podfile
, you have to set your deployment target to at least iOS 8. Is this correct?
Yep
— Cheers, Andrej
On Thu, Mar 12, 2015 at 1:10 AM, Tobias Hagemann notifications@github.com wrote:
CocoaPods 0.36 is now out of beta, but I'm not sure if I should merge
ibdesignable
branch intomaster
. By addinguse_frameworks!
to yourPodfile
, you have to set your deployment target to at least iOS 8. Is this correct?Reply to this email directly or view it on GitHub: https://github.com/MuscleRumble/THLabel/issues/28#issuecomment-78400446
Hmmm... now I'm not 100% sure how to deal with this. I can think of several scenarios:
README
.
=> Pro: Clean separation.
=> Con: Maintaining two branches. ;)__IPHONE_OS_VERSION_MIN_REQUIRED
macro to check for deployment target. If it's >= __IPHONE_8_0
, then activate IBDesignable features, otherwise not. ;) But this wouldn't check if Podfile
is including use_frameworks!
at all. Hmmm... :/
=> Pro: One branch.
=> Con: Possible confusion for deployment targets >= iOS 8.0, when use_frameworks!
is not specified in Podfile
.What if pod built as framework you activate ibdesignable? I am sure there is some magic define for that ...
That would be great! I've opened an issue at CocoaPods: https://github.com/CocoaPods/CocoaPods/issues/3265
Maybe there is some magic. :D If not, you just gave me another idea, which I like most now: Define my own macro (which defaults to NO) to flag if the user wants to use IBDesignable or not.
custom define is PITA, CocoaPods should help to resolve that as it clearly impacts all of pods out there.
Any news on that?
Unfortunately not, I'm still waiting for feedback from CocoaPods. If you want to use IBDesignable with THLabel, you can use the ibdesignable
branch as mentioned here.
I confirm this issue with another view with and without the use_frameworks!
flag: https://github.com/Kentzo/ShortcutRecorder/tree/cocoapods
Cocoa pods 3.7.1 does NOT fix the issue if your target < iOS 8 and you cannot use use_frameworks!
in any such project. So this is not a fix.
What is the fix now for projects supporting iOS versions lower than 7?!
Just use the master
branch and you should be good to go. I must admit, I haven't tested THLabel on iOS versions lower than 7 for a while now (and am unable to), but I believe it should still work with iOS 4 and higher.
Did you manage to make it work on IB and CocoaPods?
While properties show up in IB, they are not rendered, I get this error:
Storyboard.storyboard: error: IB Designables: Failed to update auto layout status: Failed to load designables from path (null)