Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 2 Code Error #10

Open
imwangxuesen opened this issue Nov 29, 2016 · 1 comment
Open

Chapter 2 Code Error #10

imwangxuesen opened this issue Nov 29, 2016 · 1 comment

Comments

@imwangxuesen
Copy link

in chapter 2, we should set Session Category in '- (void)applicationWillResignActive:(UIApplication *)application',not '- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions' .
like this :

  • (void)applicationWillResignActive:(UIApplication *)application {
    AVAudioSession *session=[AVAudioSession sharedInstance];
    [session setActive:YES error:nil];
    [session setCategory:AVAudioSessionCategoryPlayback error:nil];
    }
@imwangxuesen
Copy link
Author

running on iOS 10.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant