On iOS you cannot write to the same folder where the app bundle is (where is also where your compiled python code eds up.)
For file creating and writing on iOS it has to go to the apps 'Documents' folder, and the path to this looks something like: /var/mobile/Containers/Data/Application/<BundleId>/Documents - but the bunlde id that is used for the Documents folder is different than the one used for the actual application bundle.....
In my case I am getting this location of the apps Documents by calling into obj via pyobjus and using:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
Then you can write anything you want to the documents directory.
It may be that Kivy already has this information floating around somewhere so there might be an easier way than having to go over the pyobjus border, if so then that would be easier, but at least the code above will get the info via objc if not.
And note that if you enable shared files in the xcode project you can access any files that python writes to the Documents directory via iTunes - just go to the file sharing tab when the phone is connected and you can drag and drop files from your kivy app.
hope this helps....