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

" UItextView has no member 'placeholder' " #83

Open
AlessandroSchioppetti opened this issue Feb 3, 2021 · 5 comments
Open

" UItextView has no member 'placeholder' " #83

AlessandroSchioppetti opened this issue Feb 3, 2021 · 5 comments

Comments

@AlessandroSchioppetti
Copy link

Screenshot 2021-02-03 at 10 45 21

I used swift pakage manager, and correctly imported in my project file but It doesn't work.

@chrisvanbuskirk
Copy link

Second...doesn't work.

@TiagoSAmaral
Copy link

it doesn't work either.

@alexwhb
Copy link

alexwhb commented Apr 7, 2021

doesn't work for me either. I think it has to do with including the library using Swift PM... and how you are supposed to use a bridge header, but Swift PM does not support mixed sources, so I think you need to expose a Swift interface in order to get this working. ref

@elena-gordienko
Copy link

elena-gordienko commented Aug 10, 2021

I got the same error, when I tried to add the library to my module written in Swift using SPM (Xcode 12.5.1)

I added an import to MyModule.h so that I could use the library in Swift:
#import <UITextView_Placeholder/UITextView+Placeholder.h>

and it produces an error "'UITextView_Placeholder/UITextView+Placeholder.h' file not found".

I checked Frameworks and Libraries for my target – the library is listed there. But UITextView+Placeholder.swiftmodule is missing from Products folder in Derived Data, though there still is UITextView+Placeholder.o.

I am not sure what caused the problem – maybe it has something to do with the modulemap implementation.

UPD: I used @AndrewSB's fork, changed import to @import UITextView_Placeholder; and it fixed the problem.

@MoSchaub
Copy link

I just dragged the two files from the Source Directory into my Project and use a bridging header where I import the file like this: #import "UITextVIew+Placeholder.h"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants