Quantcast
Viewing all articles
Browse latest Browse all 8068

iOS app rejected with issues on background audio

Hi guys,

I've just had an app rejected by Apple due to my declaring background audio, but it not actually playing audio in the background (a bug at my end I think).

I'm using the 3.2.2 SDK on iOS 7 to test, this issue is apparent on both simulator and device.

To give my question some context, this is a tabbed application, one of the tabs is a podcast player.

The podcast plays fine, and all I need is it to play in the background when the user presses the home button.

Anyone shed any light on what's wrong and why the sound cuts out?

I've used this before on an older app (iOS 6 admittedly) which worked fine in the background.

Here is my tiapp.xml where i've set UIBackgroundModes

<?xml version="1.0" encoding="UTF-8"?>
<ti:app xmlns:ti="http://ti.appcelerator.org">
    <id>com.xx.xx</id>
    <name>xxx</name>
    <version>1.0.0</version>
    <publisher>x</publisher>
    <url>http://</url>
    <description>not specified</description>
    <copyright>2014 by x</copyright>
    <icon>Icon.png</icon>
    <fullscreen>false</fullscreen>
    <navbar-hidden>false</navbar-hidden>
    <analytics>false</analytics>
    <guid>7dc7276c-9e21-46b1-bf01-b4630e24f9ec</guid>
    <property name="ti.ui.defaultunit" type="string">dp</property>
    <ios>
        <plist>
            <dict>
                <key>UISupportedInterfaceOrientations~iphone</key>
                <array>
                    <string>UIInterfaceOrientationPortrait</string>
                </array>
                <key>UISupportedInterfaceOrientations~ipad</key>
                <array>
                    <string>UIInterfaceOrientationPortrait</string>
                    <string>UIInterfaceOrientationPortraitUpsideDown</string>
                    <string>UIInterfaceOrientationLandscapeLeft</string>
                    <string>UIInterfaceOrientationLandscapeRight</string>
                </array>
                <key>UIRequiresPersistentWiFi</key>
                <false/>
                <key>UIPrerenderedIcon</key>
                <false/>
                <key>UIStatusBarHidden</key>
                <false/>
                <key>UIStatusBarStyle</key>
                <string>UIStatusBarStyleLightContent</string>
                <key>UIBackgroundModes</key>
                <array>
                    <string>audio</string>
                </array>
            </dict>
        </plist>
    </ios>
    <android xmlns:android="http://schemas.android.com/apk/res/android">
        <tool-api-level>17</tool-api-level>
    </android>
    <mobileweb>
        <precache/>
        <splash>
            <enabled>true</enabled>
            <inline-css-images>true</inline-css-images>
        </splash>
        <theme>default</theme>
    </mobileweb>
    <modules>
        <module platform="iphone">com.0x82.testflight</module>
        <module platform="iphone">sg.flurry</module>
        <module platform="iphone">ti.urbanairship</module>
        <module platform="iphone" version="3.5">com.0x82.sharekit</module>
    </modules>
    <deployment-targets>
        <target device="android">true</target>
        <target device="blackberry">false</target>
        <target device="ipad">false</target>
        <target device="iphone">true</target>
        <target device="mobileweb">false</target>
        <target device="tizen">false</target>
    </deployment-targets>
    <sdk-version>3.2.2.GA</sdk-version>
</ti:app>
And for reference here is my a segment of my podcast.js code that sets the audioplayer
player = Titanium.Media.createAudioPlayer({
                url: e.rowData.url,
                allowBackground: true
            });
Any help would be greatly appreciated

Simon


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>