Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

theprizerevealed

macrumors regular
Original poster
Feb 26, 2016
183
12
I want to print the entire code of my program. Is there somewhere is Xcode that you do that? - or must you just print each viewcontroller
 
What do you mean print? As in a "print()" statement or physically printing the source code out on paper?
 
You can probably whip together an Apple Script or Automator task to do this, honestly.

Curiously, why?
 
I imagine you need to print this for school/college. I'm also guessing you're programming in Swift.
Easiest thing to do is to concatenate all your files into just one file you can print. do this in terminal in the root folder of your project.
Code:
find . -name '*.swift' -exec cat {} + > combined.swift
 
I imagine you need to print this for school/college. I'm also guessing you're programming in Swift.
Easiest thing to do is to concatenate all your files into just one file you can print. do this in terminal in the root folder of your project.
Code:
find . -name '*.swift' -exec cat {} + > combined.swift

If you're familiar with the command line you could always use 'lp' to print.

Check out the man page for 'lp' with 'man lp'.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.