Creating TextOutPutStream Problem

I have released apps which write files in iOS but now I get an error when I try to create a TextOutputStream. Anybody know of something recently broken. Error on “create” line is “can’t write file.”

if docFile<>nil then
dim tOut as Xojo.IO.TextOutputStream
tOut = Xojo.IO.TextOutputStream.Create(docFile, TextEncoding.UTF8)

That might depend on where DocFIle refers to
Esp with recent iOS changes

iOS is limited to where it can legally write to

Should have included the information on where I was writing in the original post. I am writing to a folder in the Documents folder. So that should be no problem. Here is the code:

Dim CSKFolder as new Xojo.IO.FolderItem(Xojo.IO.SpecialFolder.Documents.Path+"/Curling Score Keeping")
if NOT CSKFolder.Exists then
CSKFolder.CreateAsFolder
end if
docFile = Xojo.IO.SpecialFolder.Documents.Child(CSKFolder.Path).Child(tfDate.Text+".txt")

CSKFolder should be built using CHILD not by concat of strings

Dim CSKFolder as Xojo.IO.FolderItem = Xojo.IO.SpecialFolder.Documents
if NOT CSKFolder.Exists then
    // not sure what you want to do here but you probably need some big help !
   return
end if
CSKFolder = CSKFOlder.Child("Curling Score Keeping")
if NOT CSKFolder.Exists then
  CSKFolder.CreateAsFolder
end if

docFile = CSKFolder.Child(tfDate.Text+".txt")

... and so on ...