मै मैक ऐप सैंडबॉक्सिंग के बारे में पढ़ रहा हूं और सोच रहा हूं कि जब कोई उपयोगकर्ता NSOpenPanel या NSSavePanel में कोई फ़ोल्डर चुनता है तो वास्तव में क्या होता है।जब कोई उपयोगकर्ता फ़ोल्डर चुनता है तो मैक सैंडबॉक्स किए गए ऐप तक पहुंच प्राप्त होती है?
When a user of your app specifies they want to use a file or a folder, the system adds the associated path to your app’s sandbox. Say, for example, a user drags the
~/Documents
folder onto your app’s Dock tile (or onto your app’s Finder icon, or into an open window of your app), thereby indicating they want to use that folder. In response, the system makes the~/Documents
folder, its contents, and its subfolders available to your app.
यह मेरे लिए स्पष्ट नहीं है क्या "सामग्री" यहाँ का मतलब है: "App Sandbox Design Guide" निम्न उदाहरण देता है। क्या यह देखने के लिए सीमित है कि फ़ोल्डर में कौन सी फाइलें हैं, उन फ़ाइलों में क्या पढ़ा जा सकता है? या क्या इसका मतलब यह है कि ऐप दस्तावेज़ फ़ोल्डर के अंदर (रिकर्सिवली) किसी भी फ़ाइल को पढ़ने में सक्षम होगा (उदाहरण के लिए, उदाहरण के लिए, ~/Documents/Foo.txt
और ~/Documents/Bar/Baz.txt
दोनों पढ़ सकते हैं)? और लिखने के संचालन के बारे में क्या है (मौजूदा फाइल को लिखना, एक को हटाना या नई फाइल या फ़ोल्डर बनाना)?
इसके अतिरिक्त, यदि आपके पास बुकमार्क एंटाइटेलमेंट सक्षम हैं, तो आप बाद में इन अनुमतियों को सहेजने के लिए - [NSURL बुकमार्कमार्कडेटाइथऑप्शन: सहित रिसोर्सवैल्यूजफोरकेस: सापेक्ष ToURL: त्रुटि:] का उपयोग कर सकते हैं। Https://developer.apple.com/library/mac/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html#//apple_ref/doc/uid/TP40011183-CH3-SW16 देखें। – AriX