Skip to content
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

IB Designables Error #96

Closed
alanshih opened this issue Sep 26, 2016 · 21 comments
Closed

IB Designables Error #96

alanshih opened this issue Sep 26, 2016 · 21 comments

Comments

@alanshih
Copy link

I am using xCode 8 with Swift 2.3 so I install TextFieldEffects using Cocoapods
pod 'TextFieldEffects', '~> 1.2.0'

The problem is that I get errors ever since I upgraded to xCode 8

screen shot 2016-09-26 at 3 23 40 pm

I believe it's because of the @IBDesignable notation for the TextFieldEffects as it is only throwing errors on views with these custom TextFields.

@raulriera
Copy link
Owner

Hi,

Can you confirm this is due to this library? A sample project would be awesome for testing this

@datamaru
Copy link

I also encountered this problem but it also occurred when I was using another library that use IBDesignable so I guess the problem is in the XCode itself. I suggest you use XCode 7.3 if you are still developing with Swift 2.3 like me.

@alanshih
Copy link
Author

alanshih commented Sep 28, 2016

@raulriera
I have attached the error:
Application Specific Information:

CoreSimulator 303.8 - Device: IBSimDeviceTypeiPad2x - Runtime: iOS 10.0 (14A345) - DeviceType: IBSimDeviceTypeiPad2x

Dyld Error Message:
  Symbol not found: __TF10Foundation24_convertNSStringToStringFGSqCSo8NSString_SS
  Referenced from: /Users/USER/Library/Developer/Xcode/DerivedData/Rapid-edcohojmdvjelfgoxvgkmwfchzvk/Build/Intermediates/IBDesignables/Products/Debug-iphonesimulator/TextFieldEffects/TextFieldEffects.framework/TextFieldEffects
  Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Overlays/../../../../../../Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftFoundation.dylib

Also, the custom TextFields use to render properly, but now they look strange on the Storyboard.

@datamaru My computer automatically upgraded me to XCode 8. I don't suppose there is a way to downgrade?

@datamaru
Copy link

You can download XCode 7.3.dmg at the Apple Developer Download section. Go here https://developer.apple.com/download/ and scroll all the way down to found "See more downloads" button. You can found Xcode 7.3 there.

@alanshih
Copy link
Author

@raulriera
Debuged the Yoshiko I am using and it is failing on:

private var placeholderHeight : CGFloat {
        return placeHolderInsets.y + placeholderFontFromFontAndPercentageOfOriginalSize(font: font!, percentageOfOriginalSize: placeholderFontScale).lineHeight
    }

EXC BAD ACCESS

@raulriera
Copy link
Owner

Can you provide a sample project? this error doesn't happen on the Sample project in this library

@Nallo
Copy link

Nallo commented Nov 21, 2016

In my project I get the same error as the one of alanshih. I am using Pods which do not have any @IBDesignable.

Trying with an empty workspace after getting TextFieldEffects using Pod Install the error does not show up.

I am guessing, if we import TextFieldEffects with drag/drop the issue should go away (Not tested yet).

@alanshih
Copy link
Author

@Nallo Do you know of a way to fix it on existing projects that is using pods?

@Nallo
Copy link

Nallo commented Nov 21, 2016

@alanshih I removed from the source of the Pod the string @IBDesignable.

In my project I am using only HoshiTextField therefore, I looked for the HoshiTextField.swift file and I changed the first line of the class from @IBDesignable public class HoshiTextField: TextFieldEffects { to public class HoshiTextField: TextFieldEffects {.
If you are using other custom textfields you should do the same procedure for each textfield class. After that, clean your project, restart Xcode and perform a full build. The errors should be gone but you won't be able to see anymore the UI updates of the textfields in the Storyboard.

@alanshih
Copy link
Author

@Nallo That did it :). Thank you. Is this considered a xCode bug that will eventually be fixed one day? I don't really understand the issue.

@Nallo
Copy link

Nallo commented Nov 22, 2016

@alanshih I have no idea whether is a bug in Xcode or in the Pod management. However, you can stay updated by checking this repo updates.

Hope this helps.

@alanshih
Copy link
Author

alanshih commented Dec 1, 2016

@Nallo actually, pulling out the IBDesignable did not fully solve the issue. If I add a new "YoshikoTextField" after removing the @IBDesignable, it will not render and throw the same error.

The only workaround I have found is to copy and paste a working custom TextField into the view

@Nallo
Copy link

Nallo commented Dec 1, 2016

@alanshih my solution was only a workaround for my specific case.

If you add a YoshikoTextField and you get the error, you need to remove the @IBDesignable string from the YoshikoTextField.swift file, clean the project, close Xcode and reopen Xcode again.

@Nathan187
Copy link

Yeah, I really wanted to use this library but it just isn't playing nice in my storyboard and the attributes aren't displaying properly when I try to adjust settings/properties. Better documentation would have been nice.

@raulriera
Copy link
Owner

Anythign ni particular Nathan? All files hace documentation headers on them. Also, PRs are always welcomed.

@StephanKonig
Copy link

When using TextFieldEffects in Xcode 9, it tells me "Designables: Build failed".

@raulriera
Copy link
Owner

Can you provide more info? What version, how did you install it, does it happen in the sample project, etc?

@StephanKonig
Copy link

I found out that it is a bug in Xcode 9, not in the code...

@stale
Copy link

stale bot commented Apr 23, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 3 days if no further activity occurs.

@stale stale bot added the stale label Apr 23, 2018
@StevenFY
Copy link

StevenFY commented Apr 25, 2018

Hello,

I am currently experiencing the same problem.
I installed this package by Cocoapods.

I implemented "KeadeTextField" on a storyboard, in recent days it worked properly !

Since the launch of my project today, this problem has appeared during the build.
When I remove the classes from my TextField this problem disappears.

As soon as I add one of the classes, the problem reappears.

"@IBDesignables" always appears as "Updating".
I tried to add "@IBDesignables" by hand and it appears as "up to date" but the problem is the same.

Package version : TextFieldEffects (1.4.0)
XCode Version 9.3

I hope this will help you !

@stale
Copy link

stale bot commented May 16, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 3 days if no further activity occurs.

@stale stale bot added the stale label May 16, 2018
@stale stale bot closed this as completed May 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants