|
|
@@ -494,9 +494,26 @@
|
|
|
// save contro json
|
|
|
|
|
|
NSString *path = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject];
|
|
|
- path = [path stringByAppendingPathComponent:@"template.json"];
|
|
|
|
|
|
- [self.controlTemplate writeToFile:path atomically:NO];
|
|
|
+
|
|
|
+ path = [path stringByAppendingPathComponent:[NSString stringWithFormat:@"template_%@.json",[RAUtils current_date]]];
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ NSString* str= [RAUtils dict2string:self.controlTemplate];
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ NSError *error=nil;
|
|
|
+
|
|
|
+ [str writeToFile:path atomically:true encoding:NSUTF8StringEncoding error:&error];
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+// [self.controlTemplate writeToFile:path atomically:NO];
|
|
|
|
|
|
return;
|
|
|
|