Access RoomPlan API from Objective-C

Is it possible to access the RoomPlan API from Objective-C? I cannot figure out how to include the RoomPlan framework into some legacy Objective-C code I have. I can include the RoomPlan.h header but it still does not recognize any of the API classes. I also could not figure out if there was a way to use RoomPlan-Swift.h to expose the API to the Objective-C code.

Answered by DTS Engineer in 792631022

RoomPlan is Swift-only framework. You can’t use it directly from Objective-C.

As with any Swift-only framework, you have a couple of choices:

  • If you’re just playing around, use Swift. While there’s some friction in using a different language, that’ll be less than trying to implement the bridging.

  • If you have a large Objective-C codebase, your best option is implement your framework-specific code in Swift and have it expose a focused Objective-C interface to the rest of your codebase.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

RoomPlan is Swift-only framework. You can’t use it directly from Objective-C.

As with any Swift-only framework, you have a couple of choices:

  • If you’re just playing around, use Swift. While there’s some friction in using a different language, that’ll be less than trying to implement the bridging.

  • If you have a large Objective-C codebase, your best option is implement your framework-specific code in Swift and have it expose a focused Objective-C interface to the rest of your codebase.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Access RoomPlan API from Objective-C
 
 
Q