ios - Bridging headers importing framework into viewcontroller -
i new ios coding , trying use aws sdk written in objective c.
after trying day sdk working simple table scan in swift, trying use objective c.
i set using aws mobile manager has headers , framework in project
so working in ratesongsviewcontroller.swift file , want import frame work , write code access dynamodb in objective c.
i thought import , start writing on obj c in swift file this:
import foundation import uikit #import <awsdynamodb/awsdynamodb.h> class ratesongsviewcontroller: uiviewcontroller {
but getting th error:
consecutive statements on line must separated ';'
what doing wrong? , have create new objective c files grab data aws or able because of header import write in objective c in swift file?
thanks
first, make sure project has swift header, if not can create manually from,
build settings > swift compiler > objective-c bridging header
then import objective-c classes bridging header file want access in .swift classes, is, can access objective-c classes in every .swift class. not need import class in .swift class.
hope helps you.
Comments
Post a Comment