0

I am trying to integrate this framework manually in my Xcode project. As I am structuring my project, I am adding it inside a folder [not a group]. So then the problem is started, "use of undeclared identifier SkyFloatingLabelTextField. What should I do to make it work properly?

I tried the same in sample project as well and the error is same.

I am not getting any options when trying drag and drop the folder to the project structure. The same when try adding through "Add Files".

Hemang
  • 26,840
  • 19
  • 119
  • 186

3 Answers3

1

I added the Sources folder inside another folder at the workspace.

enter image description here

Added the folder using "Add Files to ..." option.

Checked the Target Membership for all the files inside Sources folder, as it was not checked.enter image description here

Although, it looks like source code of SkyFloatingLabelTextField, has not been updated for Swift4. You may need to do it yourself.

Puneet Sharma
  • 9,369
  • 1
  • 27
  • 33
  • Thanks for the answer, however, this doesn't help. I am still getting the same error. I have followed all the steps which you have suggested. – Hemang Jul 04 '17 at 11:55
  • I was able to build my sample project successfully. Whats the issue? – Puneet Sharma Jul 04 '17 at 11:55
  • The same issue. I am not sure what's wrong here. Would you check on my sample project? I can share the link if you want. – Hemang Jul 04 '17 at 12:00
  • If you are still getting the unresolved error, you must check the Build Phases->Compile Source and check whether the SkyFloatingLabelTextField files are there or not. If they are there, clean your project, quit xcode and try building once again – Puneet Sharma Jul 04 '17 at 12:01
  • 1
    Just tried in another sample project and it worked. :(! – Hemang Jul 04 '17 at 12:09
  • Looks like a Derived data related issue to me, then. Open derived data folder, quit xcode, delete derived data, empty trash, open xcode and build the project. Change the order of exexution of these steps at your own peril:) – Puneet Sharma Jul 04 '17 at 12:10
  • @Hemang you should use CocoaPods or Carthage to integrate instead, there's a know issue for CocoaPods where it doesn't correctly set the swift version of the project. Xcode 9 can compile both Swift 3 and 4. See this issue for a CocoaPods workaround https://github.com/Skyscanner/SkyFloatingLabelTextField/issues/158 – Hugo Tunius Sep 19 '17 at 08:13
0

Don't drag and drop file. You can add manually these files then its working fine.enter image description here

Zany
  • 893
  • 1
  • 7
  • 5
0

This problem happens to me even if I installed SkyFloatingLabelTextField using CocoaPods. I only had to add

import SkyFloatingLabelTextField

in order to add the definition to my ViewController.

Skycorsarius
  • 979
  • 1
  • 8
  • 13