KLCPopup icon indicating copy to clipboard operation
KLCPopup copied to clipboard

Compile Error: "Function definition is not allowed here" in "New Created Project" of XCode 6

Open Simon-Tseng opened this issue 10 years ago • 4 comments

After I created a new project in XCode 6 and import KLCPopup.h, I got the following error: 2014-10-20 8 58 14 This issue is caused by ProjectName-Prefix.pch is not created automatically in Xcode 6, thus the following import is missing: UIKit/UIKit.h Foundation/Foundation.h

You can follow the following discussion to add .pch back manually: http://stackoverflow.com/questions/24158648/why-isnt-projectname-prefix-pch-created-automatically-in-xcode-6

I love KLCPopup! Hope it support keyboard. Thanks!

Simon-Tseng avatar Oct 20 '14 13:10 Simon-Tseng

@Simon-Tseng I have the same problem but i dont understant you solution :(.

Could you please give me more information ?

ingouackaz avatar Dec 05 '14 13:12 ingouackaz

@ingouackaz Please following the steps in http://stackoverflow.com/a/24258165/4146743 to create pch file, then add the following to pch file: 2014-12-06 12 15 35

Good Luck :)

Simon-Tseng avatar Dec 06 '14 04:12 Simon-Tseng

That works! @Simon-Tseng

Thank you very much !

ingouackaz avatar Dec 09 '14 19:12 ingouackaz

Alternatively, you may import UIKit and Foundation in KCLPopUp.h

LokeshBhatija avatar Aug 31 '15 19:08 LokeshBhatija