1

All the code runs, but I get the following in the log:

[default] [ERROR] Failed getting container for URL: file:///Users/XXXXXXXXXXXX/Desktop/, error: Error Domain=BRCloudDocsErrorDomain Code=2 "Logged out - iCloud Drive is not configured" UserInfo={NSDescription=Logged out - iCloud Drive is not configured}

NSLog(@"OK");

NSOpenPanel* openDlg = [NSOpenPanel alloc];

NSLog(@"OK");

openDlg = [NSOpenPanel openPanel];

NSLog(@"Error shows after this line of setting 'openPanel' ");

I tried to setup the App Sandbox,(eventually selecting everything in the sandbox) but that yielded more problems. The following won't load... and so the contents are nothing.

NSString *nssFilename =  @"/Users/xxxxxxxx/Desktop/WordList/WordList/wordlist100.txt";

NSString *nssContents = [NSString stringWithContentsOfFile:nssFilename encoding:NSUTF8StringEncoding error:nil];
NSLog(@"Contents:%@",nssContents);
jdl
  • 6,151
  • 19
  • 83
  • 132
  • What are these unmentioned "more problems"? That looks like the correct solution: https://stackoverflow.com/questions/41325172 – Ssswift Jul 19 '17 at 16:28
  • I get this and the program won't even run... crashes: "Failed to set (contentViewController) user defined inspected property on (NSWindow): *** -[__NSSingleObjectArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0]" – jdl Jul 19 '17 at 19:25
  • the issue is the setting up of the sandbox... the program now won't load files. Even if I select all privileges for the sandbox – jdl Jul 19 '17 at 19:51
  • I'm afraid I'm not going to be able to make any useful comments without seeing some source code, like an [MCVE](https://stackoverflow.com/help/mcve). Clearly, though, NSOpenPanel can and does work just fine for other sandboxed apps. – Ssswift Jul 19 '17 at 22:17
  • Do you want to sandbox your app?? It seems things were working fine before. The console message is benign and can be ignored. – TheNextman Jul 21 '17 at 02:14

0 Answers0