Can't use Swift classes inside Objective-C

前端 未结 25 2569
野趣味
野趣味 2020-11-22 08:10

I try to integrate Swift code in my app.My app is written in Objective-C and I added a Swift class. I\'ve done everything described he

25条回答
  •  南旧
    南旧 (楼主)
    2020-11-22 08:15

    I had the same problem and finally it appeared that they weren't attached to the same targets. The ObjC class is attached to Target1 and Target2, the Swift class is only attached to the Target1 and is not visible inside the ObjC class.

    Hope this helps someone.

提交回复
热议问题