Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6142599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:24:36+00:00 2026-05-23T18:24:36+00:00

can someone confirm whether this is indeed a bug? ( If so I will

  • 0

can someone confirm whether this is indeed a bug? ( If so I will go off and file it with Apple ).

attempting to fetch kAudioSessionProperty_AudioRoute is returning error code kAudioSessionUnsupportedPropertyError on any version of the simulator prior to 4.3 ( which is the latest version at time of writing ).

this one is dead easy to reproduce.

Start a new project ( I am using Xcode 4.0.2 Build 4A2002a, that is the standard build ), window-based project “AudioSessionBug”

include AudioToolbox framework

replace the application delegate’s .m file with the following:

//
//  AudioSessionBugAppDelegate.m
//  AudioSessionBug
//
//  Created by Pi on 02/07/2011.
//  Copyright 2011 Pi. All rights reserved.
//

#import "AudioSessionBugAppDelegate.h"

#import <AudioToolbox/AudioToolbox.h>

#define SET_PROPERTY( prop, type, val ) \
{ \
OSStatus ret = AudioSessionSetProperty( prop, sizeof( type ), &(type){ val } ); \
if ( ret != kAudioSessionNoError ) \
{ \
NSLog( @"AudioSessionSETProperty failed for: %s!", #prop ); \
return; \
} \
}

enum  {
    kNo = 0,
    kYes = 1
};

// - - - 

@interface AudioSessionBugAppDelegate ( )

- (void) setupSession;

@end

// - - - 

@implementation AudioSessionBugAppDelegate


@synthesize window=_window;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // Override point for customization after application launch.
    [self.window makeKeyAndVisible];


    [self setupSession];


    return YES;
}

- (void) setupSession
{
    OSStatus result = AudioSessionInitialize( NULL, NULL, NULL, NULL );
    assert( result == kAudioSessionNoError );

    SET_PROPERTY( kAudioSessionProperty_AudioCategory,  UInt32,   kAudioSessionCategory_PlayAndRecord );

    // make sure headphones are plugged in!
    {
        // http://stackoverflow.com/questions/2753562/what-kind-of-routes-could-i-get-back-from-kaudiosessionproperty-audioroute-proper
        CFStringRef state = nil;        
        UInt32 propertySize = sizeof(CFStringRef);
        OSStatus status = AudioSessionGetProperty( kAudioSessionProperty_AudioRoute, &propertySize, &state );

        if ( status == kAudioSessionUnsupportedPropertyError )
        {
            NSLog( @" WTF? GETTING kAudioSessionProperty_AudioRoute GIVES kAudioSessionUnsupportedPropertyError ?!?!? " );
        }

        NSLog( @" OK - done! " );

        exit( 1 );
    }
}

- (void)dealloc
{
    [_window release];
    [super dealloc];
}

@end

check that it works.

now change deployment target to anything prior to 4.3. say 4.2.

run it again on iPad simulator 4.3 — OK
run it again on iPad simulator 4.2 — FAIL

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T18:24:37+00:00Added an answer on May 23, 2026 at 6:24 pm

    I just received the following confirmation from Apple:

    This was a bug that was fixed in 4.3 and we currently have no plans to fix bugs in earlier builds of the simulator.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can someone confirm that Python 2.6 ftplib does NOT support Unicode file names? Or
Can someone confirm this: do I need to provide both a CSRF token and
Can someone confirm my suspicion on this line of code. NSUInteger newPath[] = {[indexPath
Can someone please confirm whether I am right about event aggregation in PRISM 4?
Can someone please confirm/deny whether the iPhone retina display supports the @2x filename scheme
Can someone please confirm to me that when my application is written in .NET
Can someone explain this result to me. The first test succeeds but the second
can someone confirm that microsoft changed path length related behaviour of some classe from
Can someone confirm that the below code definitely removes items from the BlockingCollection foreach
Can someone confirm that nested C structures are NOT allowed in objective C. And

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.