-1

I was following this tutorial

http://www.techotopia.com/index.php/An_Example_SQLite_based_iOS_8_Application_using_Swift_and_FMDB

everything is perfect till the import statement.

#import "FMDB.h"

when I wrote the statement 2 errors appeared.

1.expected expression // in hash  #import "FMDB.h"
2.expected identifier in import declaration // in FMDB.h #import "FMDB.h"

I also tried without #, without quotes etc

Please help me on how to import FMDB in my swift project, I am trying to add database to my swift application

Ashish Kakkad
  • 23,586
  • 12
  • 103
  • 136
milsha
  • 79
  • 2
  • 10
  • #import will not work in Swift! You have to create a bridging header and import your obj-c FMDB.h file with it. Check this [article](http://ashishkakkad.com/2014/12/how-to-add-an-objective-c-file-in-your-swift-project-or-how-to-set-objective-c-bridging-header/). – Ashish Kakkad May 23 '16 at 12:48

1 Answers1

0

comment by @Ashish Kakkad was the answer , here is what i did.

on the bridge file i added all the import files which needed for the project.

the complete explanation is given in the article -http://ashishkakkad.com/2014/12/how-to-add-an-objective-c-file-in-your-swift-project-or-how-to-set-objective-c-bridging-header/ as said by Ashish

milsha
  • 79
  • 2
  • 10