ios8 - iOS Sharing CSV files with UIActivityViewController -
i have app share csv files from, share other files work both built in options (such mail), , external options such gmail app, or evernote.
if attempt share "csv" file, internal mail option works expected, other options, such gmail or evernote share text. if rename csv file "pdf" works in also.
is there whitelist of allowed file types can shared?
my code faily simple, , looks this:
nsarray* activityitems = [nsarray arraywithobjects: customitemattachment, customitemtext, nil]; ... uiactivityviewcontroller *activityvc = [[uiactivityviewcontroller alloc]initwithactivityitems:activityitems applicationactivities:nil ];
to share:
nsstring* filename = [[bddata shareddata] adddatetofilename:@"datalog%@.csv"]; nsdata* data = [s datausingencoding:nsutf8stringencoding]; nsstring *filenamelong = [nstemporarydirectory() stringbyappendingpathcomponent:filename]; [data writetofile:filenamelong atomically:yes]; mysharedata* sharedata = [mysharedata sharedata];
if rename datalog.csv datalog.pdf, "works", wrong extension.
Comments
Post a Comment