私が今持っているコードは次のようになります:
NSString *path = @"/Users/student/Desktop/conf.txt"
NSArray *myArray = [NSArray arrayWithObjects:@"hello",@"world",@"etc",nil];
[myArray writeToFile:path atomically:YES];
テキストファイルを見ると、次のようになります。
<?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">
<array>
    <string>hello</string>
     <string>world</string>
    <string>etc</string>
 </array>
 </plist>
HTMLとして表示したくはありません。「HelloWorldなど」という3行の単純なテキストドキュメントが必要です。
誰かが私がこれを修正する方法を知っていますか?
ありがとう