5

Let's say I have an Xcode project using Swift and some C. All frameworks/dependencies used by the project are available on both platforms.

Is there a simple way to tell Xcode to generate the .framework or just build the entire project for, say, a raspberry pi?

bingbomboom
  • 209
  • 1
  • 4
  • I'm not sure why you're getting down voted. The answer is that there is nothing built-in to the compiler that ships with Xcode for cross-compiling. However you can setup custom makefiles with Xcode – so if you install a cross-compiler theoretically it's possible to have that workflow setup in Xcode. However, you would first need the cross-compiler... – davecom Aug 09 '17 at 15:41
  • thanks. I have a followup question for you- if I have the source for a framework (which is all compileable under linux), then is there any way I can bring that over to a pi (swift already installed on it) and generate the equivalent of an osx `framework`? – bingbomboom Aug 09 '17 at 15:55
  • For compiling Swift libraries on Linux, you should be using SPM. See this answer for more details: https://stackoverflow.com/questions/41345556/how-to-build-a-custom-swift-framework-and-how-is-it-related-to-the-spm – davecom Aug 09 '17 at 16:08

0 Answers0