これが以前に何度も尋ねられた場合は申し訳ありませんが、私の問題を解決するものは何もないようです.
テスト目的で、アプリ自体からローカルの .plist ファイルを完全に読み取るようにアプリを設定しましたが、アプリを使用するには、Web サーバーで更新してリモートでロードできる必要があります。 .
これがローカルplistの現在のコードです。アプリの他の場所で最小限の変更を加えて、これをどのように修正しますか?
よろしくお願いします。
- (void)viewDidLoad
{
[super viewDidLoad];
//Create a dictionary with the contents of Squad.plist
NSDictionary *dictionary = [[NSDictionary alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Squad" ofType:@"plist"]];
//Fill the Squad array with contents of dictionary under the key "Players"
[self setSquad:(NSArray*) [dictionary objectForKey:@"Players"]];
//Reload the table data
[[self tableView] reloadData];
[[self navigationItem] setPrompt:nil];
}