Use a non-linear amplifier to get TTL levels, in the form of a comparator with it's threshold set a the mid-point of the audio waveform level. Possible devices might include an LM360.
This won't work for frequencies near zero, as audio output will likely stay close to the threshold and near the noise floor, producing garbage. But will work for a high enough minimum toggle rate.
If you need to get a TTL output toggling at any frequencies from 0 to 1200 Hz, then another strategy is to output a much higher frequency audio signal (say 12 kHz) for the duration of your TTL high, and use a bandpass filter on the output to filter and detect this tone (diode + cap, similar to a AM crystal radio detector) before the TTL output comparator (with its threshold set above the zero-output noise floor and below the bandpass filter ripple).
If you output a lower frequency, say 2400 Hz, to indicate TTL high, another possibility is to use an Arduino chip, audio to ADC input, and measure the time between threshold crossing to detect the tone frequency needed to output a high level on another IO pin. But this lower audio frequency will limit the minimum duration of your TTL pulse transitions (and quantize them in time).
A higher audio frequency will also quantize the TTL output in time, but at a higher time resolution. So an appropriate USB audio DAC might allow very high audio signaling frequencies by supporting a sample rate of 96k or 192k. This would likely provide even better time resolution for your TTL output than signaling via USB (OTG) serial or ethernet packets, as a streaming real time audio driver on a mobile device (RemoteIO on iOS) has much more deterministic latency than either the USB or the network stack drivers on the mobile OS.