Apple拒绝了我的应用程序,因为它无法在IPv6连接上执行少量功能.我必须测试应用程序.我有IPv4的宽带连接.我在Mac上的网络共享中创建了一个NAT64连接.我将设备无线连接到它.设备显示它具有IPv6地址.但是,我没有任何互联网访问权限来测试我的应用程序. 这就是我创建NAT64连接的方式
我正在AVAudioPlayer中播放来自url的音频.我试图控制来自控制中心和锁定屏幕的音频.我能够控制搜索和前进,后退功能但我无法控制来自控制中心的播放/暂停功能.
[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
[self becomeFirstResponder];
MPRemoteCommandCenter *remoteCommandCenter = [MPRemoteCommandCenter sharedCommandCenter];
[[remoteCommandCenter skipForwardCommand] addTarget:self action:@selector(skipForward)];
[[remoteCommandCenter togglePlayPauseCommand] addTarget:self action:@selector(togglePlayPause)];
[[remoteCommandCenter skipBackwardCommand] addTarget:self action:@selector(skipBackward)];
MPNowPlayingInfoCenter *playingInfoCenter = [MPNowPlayingInfoCenter defaultCenter];
NSMutableDictionary *songInfo = [[NSMutableDictionary alloc] init];
[songInfo setObject:@"your song" forKey:MPMediaItemPropertyTitle];
[songInfo setObject:@"your artist" forKey:MPMediaItemPropertyArtist];
[songInfo setObject:@"your album" forKey:MPMediaItemPropertyAlbumTitle];
[songInfo setObject:@"0" forKey:MPNowPlayingInfoPropertyElapsedPlaybackTime];
[songInfo setObject:@"600" forKey:MPMediaItemPropertyPlaybackDuration];
[playingInfoCenter setNowPlayingInfo:songInfo];
Run Code Online (Sandbox Code Playgroud)