Can app tested in iPhone run in background? - ios

I write an audio player app with Xcode 6 in iOS 8. The problem is, when the audio player runs in iOS simulator, it can play audio in background, but when I test it in the real iPhone device, it cannot play audio in background. I wonder if Apple has limitation in testing in real iPhone device or I make some mistakes in settings.

Related

Background audio not work with Ionic3 + Videogular2 on iOS

I'm using Videogular2 in an Angular/Cordova/Ionic3 project, where I play mp3 audio live streams. All works good with mp3 and mp4, on browser and iOS simulator.
When the user Lock The Screen in iOS Device I expect that the audio continues to play in a background mode, but on IOS when the user Lock The Screen audio stop to play.
I've tested on XCODE 8 to set 'Capabilities' tab adding 'audio' parameter, I've added cordova-plugin-backgroundaudio to the project without success.
On iOS Simulator it works well, the problem occurs only on iOS Device.
Tested on iPhone 6 & iPad 3.
I'm using:
iOS 10.3.3
XCODE 8.3.3
Ionic 3.12.1
Videogular2 5.4.11
No one else used videogular2 on cordova/ionic?
In iOS app audio won't be playing in background when the device is locked. For that you have to enable the background mode for the app. I had faced the same issue in one of my application (I was using different audio plugin).
In order to enable background mode in iOS you can use below plugin
https://ionicframework.com/docs/native/background-mode/. When you start playing the audio you just need to call backgroundMode.enable() to keep it playing in background. When you leave the audio player page if want you can disable background mode to avoid unnecessarily keeping the background mode on by calling backgroundMode.disable().
Additionally you need to enable the background audio feature in xcode project settings as shown in below link.
https://koenig-media.raywenderlich.com/uploads/2016/09/BM-EnableAudioInBG.png

No sound when playing video in ionic app on an iPhone device

I have an ionic app that plays videos hosted on the internet. When testing the app on a web browser and in the iOS emulator the video plays with sound.
If I download the app onto my iPhone using X-Code the video plays but there is no sound!
Does anyone have an idea as to why the sound works on the emulator but not on the actual device? I have checked that youtube videos play ok with sound.
Ok, so I am clearly an idiot! The mute slider on my iPhone was turned on. Not sure though why this didn't mute youtube videos but did mute my app videos.
For those wondering why sound isn't working in the ionic view app for an iOS device, but it works in an iOS emulator like I was:
The ionic view app comes with a fixed set of cordova plugins. If your app needs a plugin which the ionic view app doesn't support thenyour app won't work in the ionic view app. The sound plugin I was using in my emulator wasn't supported in the ionic view app.
Edit: list of supported ionic view apps can be found here: http://docs.ionic.io/docs/view-usage

ipad and iphone microphone different behaviour

I am trying out an application on pitch detection based on Demetri Miller Tutorial. But i am having issues when i try it with iPad. Is it because the microphone settings of iPhone and iPad are different.
The app works for iPhone and in simulator,but when it comes to ipad not always working.I have tested with 2-3 iPads and all are having this problem. So confirmed not problem with mic of iPad.Is there a way i can increase the microphone performance of iPad. Since the way mic is behaving in case of iPhone and iPad is different.
Is there any specific setting changes on ipad that needs to be done?

How to disable iPod Music Control when device screen is locked?

I'm using MPMusicPlayerController in my app and it works fine in background.
The problem is I don't want user to control the song via iPod music app while device is locked?
Thank you for any helps.
I don't have knowledge in ipod.
As on IOS, You should detect when device goes sleep/lock mode. When the device goes lock/sleep, then u can control your music in sleep mode method function.

iOS 4.2.1: Video files not being played by MPMoviePlayerController on iPod Touch

I'm using the MPMoviePlayerController with my App. It works fine both with the XCode simulator and the device (iPod Touch with iOS 4.3.1), but when running the App in XCode's Debug Mode on an iPod Touch running 4.2.1, I get an error which says that the video format is not being supported.
The video is an mp4-file and as far as I know the device should be able to play mp4 files.
Your help will be very much appreciated.
One possibility is that your video is H.264's Main Profile. This is supported by the iPod Touch 4th gen, but not the iPod touch gen 2 and gen 3 - these support only Low Complexity Baseline and Baseline profiles.

Resources