Sto giocando con il nuovo linguaggio di programmazione Swift di Apple e ho dei problemi ...
Attualmente sto cercando di leggere un file plist, in Objective-C farei quanto segue per ottenere il contenuto come NSDictionary:
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"Config" ofType:@"plist"];
NSDictionary *dict = [[NSDictionary alloc] initWithContentsOfFile:filePath];
Come ottengo un plist come dizionario in Swift?
Presumo di poter ottenere il percorso per il plist con:
let path = NSBundle.mainBundle().pathForResource("Config", ofType: "plist")
Quando funziona (se è corretto?): Come posso ottenere il contenuto come dizionario?
Anche una domanda più generale:
È corretto utilizzare le classi NS * predefinite ? Penso di sì ... o mi sto perdendo qualcosa? Per quanto ne so, le classi NS * del framework di default sono ancora valide e vanno bene?