Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I test iOS microphone use on the simulator?

How do I test the microphone in my IOs simulator? I don't think it records through the built in audio at the top of my Mac screen, which I understand.

Which of these options would work?

1.Plug a real microphone into my laptop

2.Export the app into my Iphone <- I don't know how to do this yet

3.Download some library that will use the built in audio on my macbook screen <- I saw a youtube video about this months ago but I can't find it now.

I appreciate any feedback. I'm asking this now to avoid programming strings of code that I cannot test.

Thank you

-Samuel

like image 496
Samuel W Anderson Avatar asked Feb 05 '12 19:02

Samuel W Anderson


People also ask

How do I use VoiceOver in iOS simulator?

While VoiceOver is not available directly in the Xcode simulator, it is possible to run VoiceOver from macOS to test your app. To do this, set keyboard focus on the simulator window then enable VoiceOver. From here you'll be able to use the Virtual Cursor to move between items on the screen.

How do I open iOS app in simulator?

Select a Simulated Device For iOS, tvOS, and watchOS apps, you can choose a simulated device, under [Platform] Simulators, from the run destination menu next to the scheme menu in the toolbar.

How do you inspect iPhone simulator?

You'll need to go to Settings > Advanced and check the Show Debug Menu option. Then you'll see the option to open the web inspector for the Simulator right from that menu. With the Web Inspector open, you can debug inside the Simulator just like you could right in a desktop browser with DevTools.


Video Answer


3 Answers

The built in microphones should work with the iOS Simulator.

like image 75
nicoz_88 Avatar answered Oct 04 '22 08:10

nicoz_88


The simulator this will automatically use your Mac's built-in microphone

AVAudioRecorder will record audio from the microphone. If you're using the simulator this will automatically use your Mac's built-in microphone, so you can test either on device or in the simulator.

And if you are on a Mac mini without a microphone input?

Remember that there is a neat trick to record audio from your iPhone/iPad. You need a lightning cable or USB-C cable connected and enable your hardware device in the Utilities/Audio Devices settings:

Audio Devices settings

Click on enable: enable

This new audio input will be visible in your emulator! So now you can record in simulator even if your Mac hasn't got a microphone

It has been available forever I believe and I just verified, it works for the Mac mini 2018 and macOS Catalina 10.15.4 and Xcode Version 11.4.1.

It will be enough to trouble shoot your iOS apps, but there is a small caveat. By default you get the line out from your iOS device, so I could play music and my mac would receive it. So far so good.

However to properly access the mic you would need a third party app to bridge and make the mic available to the mini but this is not necessary to just troubleshoot the mic on the simulator. I hope I explained myself.

like image 20
multitudes Avatar answered Oct 04 '22 10:10

multitudes


I don't think microphone works as of iOS 8.2. Here is link from Apple documentation that state this fact: https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/iOS_Simulator_Guide/TestingontheiOSSimulator/TestingontheiOSSimulator.html

Look at the Hardware limitations section.

like image 29
sarabdeep singh Avatar answered Oct 04 '22 09:10

sarabdeep singh