저는 스크립팅 브리지를 사용하여 iTunes에 액세스하는 osx 응용 프로그램을 샌드 박싱합니다.iTunesTrack 위치가 샌드 박스 모드에서 nil입니까?
for(iTunesFileTrack* track in fileTracks)
{
//url is nill in sandbox mode but good value in non sandbox mode
NSURL* url = [track location];
NSString* sourceFile = [[track location] path];
if(sourceFile == nil)
{
NSLog(@"Sourcefile for the track %@ was nil", track);
continue;
}
}
전무 내가 위반으로 다음과 같은 자격
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.assets.movies.read-write</key>
<true/>
<key>com.apple.security.assets.music.read-write</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
<key>com.apple.security.scripting-targets</key>
<dict>
<key>com.apple.iTunes</key>
<array>
<string>com.apple.iTunes.device</string>
<string>com.apple.iTunes.library.read</string>
<string>com.apple.iTunes.library.read-write</string>
<string>com.apple.iTunes.playback</string>
<string>com.apple.iTunes.podcast</string>
<string>com.apple.iTunes.user-interface</string>
</array>
</dict>
<key>com.apple.security.temporary-exception.apple-events:before:10.8</key>
<array>
<string>com.apple.itunes</string>
</array>
</dict>
</plist>
콘솔 프로그램을 사용하고, 반환
iTunes[1592]: AppleEvents/sandbox: Returning errAEPrivilegeError/-10004 and denying dispatch of event core/getd from process 'TestiTunesAccess'/0x0-0x4d04d, pid=1789, because it is not entitled to send an AppleEvent to this process.
는 10.7에서 잘 작동 및 위치는 10.8에서 확인을 반환하지만되며, 10.9 스크립팅 타깃 인 타이틀먼트가 활성화 되었기 때문에 라이브러리를 반복 할 수 있지만 트랙의 위치는 무효합니다. 이유는 무엇입니까? 난 그냥 임시 예외를 사용하고 부품을 제거하는 경우 : before10.8 그럼 작동합니다.
그러나 사과는 임시 예외 권한이 아닌 10.8 이상에서 스크립팅 대상을 사용하기를 권장하므로 추천 된 권한을 사용하고 있습니다. 어떤 도움을 주시면 감사하겠습니다.
가능한 중복 http://stackoverflow.com/questions/19803339/cant-search-music-using-itunes-scripting-bridge-and -sandboxing) – JAL