E-G*_*tar 15 iphone video mp3 avfoundation ios5
我在appstore上运行的应用程序正在使用自iOS5更新后无效的mp3和视频文件.
我安装了xcode 4.2和...当我在iPhone 5模拟器或设备上测试时,我收到以下错误(对于音频或视频文件):
Error loading
System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn:
dlopen(/System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn, 262):
Symbol not found: ___CFObjCIsCollectable
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
in /System/Library/Frameworks/Security.framework/Versions/A/Security
Run Code Online (Sandbox Code Playgroud)
当我在iPhone 4.3模拟器或设备中尝试这个时它不会崩溃 ..
我已经清理并重新导入所涉及的框架,但似乎是那种错误
注意:我的应用不使用任何安全性.
你能帮忙吗?
我找到了解决方案:NSURL
而不是NSString
:
NSURL *chemin = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/MySound.wav", [[NSBundle mainBundle] resourcePath]]];
NSError *error;
AVAudioPlayer* mySound = [[AVAudioPlayer alloc] initWithContentsOfURL:chemin error:&error];
mySound.delegate = self;
[chemin release];
[mySound Play];
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
8936 次 |
最近记录: |