Page 1 of 1

Help! UIBackgroundModes issue

Posted: Sat Jul 18, 2015 1:13 am
by ericmengyi
Hi,

I recently submit my app to iTunes Store for review. Couple days later, my binary be rejected, and I got this message:
來自 Apple
2.16 - Multitasking Apps may only use background services for their intended purposes: VoIP, audio playback, location, task completion, local notifications, etc.
2.16 Details

Your app declares support for audio in the UIBackgroundModes key in your Info.plist but did not include features that require persistent audio.

Next Steps

The audio key is intended for use by applications that provide audible content to the user while in the background, such as music player or streaming audio applications. Please revise your app to provide audible content to the user while the app is in the background or remove the "audio" setting from the UIBackgroundModes key.
My app doesn't need to play audio in background. So, what should I do to fix this?

Re: Help! UIBackgroundModes issue

Posted: Sat Jul 18, 2015 1:50 am
by ericmengyi
And I tried to remove the "Required background modes" in the Info.plist, but my app will work weird this way. I use some "notes set" and "notes play" command in my program, and if I remove the "Required background modes", the notes will sound funny or no sound at all.
Please help! Thank you!!!

PS: It is so weird, because I had already submit one app and success. I use the same command in the succeeded one with the same setting in Info.plist.

Re: Help! UIBackgroundModes issue

Posted: Sat Jul 18, 2015 2:20 am
by Mr. Kibernetik
This UIBackgroundModes key also allows notes to play, without it NOTES commands are not working.

So you have two options:
- prove to Apple that your app requires this key for musical playback (they think that UIBackgroundModes key can be used only in musical players or similar apps);
- use another means to play music in your app.

In some apps I also fail to explain Apple that app requires this key - Apple are very tough to understand.

Re: Help! UIBackgroundModes issue

Posted: Sat Jul 18, 2015 3:08 am
by ericmengyi
Thank you very much for replying!

If I want to use another means to play music in my app, I have few more questions:

1. How to remove the "audio" setting from the UIBackgroundModes key? Does that mean by removing the "Required background modes" in the "Info.plist"? Or just removing the "App plays audio or streams audio/video using AirPlay" Item in the "Required background modes" in the "Info.plist"?

2. Does the UIBackgroundModes key only affect "notes set" and "notes play" command? Will it affect "notes midi" command? Will "notes midi" command work without UIBackgroundModes key?

Thanks again!

Re: Help! UIBackgroundModes issue

Posted: Sat Jul 18, 2015 6:01 am
by Mr. Kibernetik
1. You need to remove the whole key (its root), not just its value.

2. NOTES MIDI command is not affected by this key, and it will continue to work. Because NOTES MIDI performs immediate, real time access to synthesizer, but NOTES PLAY requires background music processing to play the notes sequence.

Re: Help! UIBackgroundModes issue

Posted: Sat Jul 18, 2015 6:18 am
by ericmengyi
Thank you very much! I hope this time will work.

By the way, the first app I wrote with Smart Basic is in App Store half month ago. It works great. Smart Basic is Awesome!

Re: Help! UIBackgroundModes issue

Posted: Sat Jul 18, 2015 6:21 am
by Mr. Kibernetik
Nice that you like it!

Did you share your app's AppStore link on the Forum?

Re: Help! UIBackgroundModes issue

Posted: Thu Jul 23, 2015 4:37 am
by ericmengyi
I just shared it! Thank you. ;)