Xcode iPhone simulator keyboard press messing with computer audio quality - ios

When a keyboard press is done in the simulator, it seems the audio of the simulator takes over, and in turn, makes the audio quality of a youtube video play poorly. The problem is fixed once I quit the simulator and refresh the video.
Any quick fixes for this problem?
Thanks in advance.

This is likely keyboard click sounds playing which can push BlueTooth devices into "phone call" mode with a low bit rate codec.
You can avoid that by selecting the internal microphone as the input device for simulators.
Xcode 11.3.1 & earlier: Device > Audio Input > Internal Microphone
Xcode 11.4+: I/O > Audio Input > Internal Microphone
Xcode 12+: By default non-Bluetooth input devices are always preferred if available. If you do want to use BT headphones for input manually select them in I/O > Audio Input.

Related

How do you remove the iOS Simulator Label?

This article explained how to take a screenshot:
How to remove iOS Simulator device label
However, I need to record a video of the simulator using an application. How can I remove this label above the simulator?
I don't think you can hide that with the latest Xcode 11.4 update.
You can screen record with QuickTime and a real device using a lightning cable.
From File > New Movie Recording > Select Device next to Record button), and then add the video to a tool like Rotato
I'd recommend a static angle if you're playing a video.
See Sean Allen's device render video on how to use Rotato.

Record IOS Simulator video and simulator audio in background

I need to record 100 separate videos of my simulator which is about 40 hours of high quality. I want to record video of Xcode simulator and system audio in the background. Since I need to use my computer at the same time I don't want to use tools like Camtasia or quick time. I am wondering if this is achievable. If so this will save my one month.
In the latest version of Xcode Simulators "Scroll over the Save Screen Button and Hold the OPTION key , gives the screen record option.
Save screen button will change to record video button
You can achieve this by following.
1.In simulator Menu Choose Hardware > Audio Input > System to use the same audio input as the Mac.
2.Open Terminal and navigate to the directory where you want to save video.
Run Command : xcrun simctl io booted recordVideo <filename>.<extension>
It will start recording.To finish Press Control-C. Video will save on current directory.

Unity - audio files play badly on iPhone and iPad

Suddenly all my sounds sound really weird on the iphone and ipad, but they still sound ok in the Editor.
On the devices they sound similar to if they were played through a bad telephone connection over speaker - or if they were recorded with poor quality. And again, this only happens on the iPhone and iPad devices, in Unity itself it's all fine.
Things I tried already:
I have 3D sound disabled on the audio files
on the AudioSource, I have Bypass Effects, ByPass Listener Effects and Bypass Reverb Zones all set to 'true'
Doppler Level is set to 0
A while ago this was all good, and it may have happened when I updated to Unity 4.5.4 and XCode 6.0.1.
But I can't say that for sure.
Any ideas what that could be?
found it!
The problem was that in the Audio Settings 'Volume' was set 100 for some strange reason.
So - on the MAC the volume was set to small that's why it played ok - but on the iPhone it tried playing the loud sound so the speakers just went mad....

Is it possible to record actual sound on the simulator using mic

Is it possible record the actual sound on the simulator using the mic.
I have created the recorder which record the sound in simulator but not recording the actual audio its just null(empty) audio.
The old answer for this question is now incorrect; the iOS Simulator now supports audio input/recording.
Pic below related: where you set your audio input device (defaults to your system default)
Also be warned, some online Apple dev docs still say audio input is unsupported by the simulator ("as of 8.2") even though it is with newer versions...
Edit: Screenshot from OS X 10.12 (Sierra), Xcode 9.1 (function is also available in later Xcode 8, > 8.2)
iOS Simulator does not support audio recording, you should use real device to test.
Here you can read about Limitations of Testing in iOS Simulator
Hardware Limitations While most of the functionality of iOS devices
can be simulated in iOS Simulator, there are some hardware features
that must be tested directly on a device. The hardware features that
cannot be simulated are:
Accelerometer
Gyroscope
Camera
Proximity Sensor
Microphone Input

iOS Simulator Sound

Is there a way to tell the iOS simulator which audio device connected to your computer you want it to use?
The simulator seems to pick whatever audio device is last connected to your machine. I've got a USB audio device (fasttrack pro) I use for my main sound playback and then a USB headset I use for my skype calls. More often than not, the simulator's audio is played on the headset instead of my main speakers.
Ok, I found that both the input and output device much match in system sound settings. Often I have them set to different devices. If they don't match, the simulator seems to default to the last connected audio device selected among the input and output devices.
On a related note: if you're like me and don't like interface sounds and therefore uncheck the preference "Play user interface sound effects" (Sound > Sound Effects), you'll need to check it to get sound out of the simulator.
I doubt the simulator has a setting for that, but you can set the main output device in System Preferences > Sound.
Don't know if this will fix your issue, but it fixed mine.
I wanted the iOS simulator to output sound through a device I had connected and not the internal speakers. When I select the System Prefs Sound and selected my device as output, it would not work.
So, I selected the Sound Effects tab from the Prefs - Sound window and selected my device under Play Sound effects Through and presto it worked.
Don't know the in-outs of iphone sound, but apparently mine were being treated as sound effects.
Hope that helps, if not, I gave it a shot.
Open iOS Simulator, under Hardware toolbar you can control Audio Input, Audio Output, and volume as well!
I think it was added at Xcode 9.2, and that it's available only when running simulator with iOS 11 and above
func vibratePhone() {
if (UIDevice.current.model == "iPhone") {
AudioServicesPlaySystemSound(1352)
} else {
AudioServicesPlayAlertSound(1105)
}
}
1352 Is the system sound ID for Vibration and 1105 is for Tock.caf if the user's device is an iPad or an iPod Tock.caf will be played in place of vibration.
Working on an audio project on my studio and still didn't got it working on MOTU Hardware with everything pointing to the interface! All system sounds route properly except the iOS Sim!
Did this workaround:
iOS Sim/OS X -> SoundFlower virtual I/O -> (Any audio program like Logic/Live) -> MOTU HW
This might give you the freedom to route your audio as you please ;)

Resources