3

How do you call Spritekit functions/variables inside a C file ( .h .c ) ? not objective_C file ( .h .m )

Thank you for your help

Fluidity
  • 3,985
  • 1
  • 13
  • 34
hungry
  • 174
  • 8
  • Import your C header file in the bridging file, and call your C code in .swift file as you are doing with Obj-C code. – Whirlwind Jul 02 '17 at 22:19
  • @Whirlwind I think he is looking to go the other way, using spritekit inside C – Knight0fDragon Jul 03 '17 at 12:44
  • @Knight0fDragon Oh, you are right. I wonder what is the purpose of doing something like that... – Whirlwind Jul 03 '17 at 12:50
  • Perhaps OP does not know that Objective C is a strict superset of C (Basically C with object oriented programming) To OP: I am not sure if you can import objective C libraries into C, I tried looking for an answer for you, and all I found was this https://stackoverflow.com/questions/8127124/xcode-importing-objective-c-files-into-a-c-file which basically says no – Knight0fDragon Jul 03 '17 at 12:53
  • I added tags, and upvoted your question (unlike the other two slackers here). – Fluidity Jul 05 '17 at 00:16

0 Answers0