File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -22,14 +22,13 @@ - (dispatch_queue_t)methodQueue
2222
2323RCT_EXPORT_METHOD (startRecording:(RCTResponseSenderBlock)callback)
2424{
25- static NSString *letters = @" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" ;
26- NSMutableString *randomString = [NSMutableString stringWithCapacity: 15 ];
27- for (int i=0 ; i<15 ; i++) {
28- [randomString appendFormat: @" %C " , [letters characterAtIndex: arc4random () % [letters length ]]];
29- }
25+ NSTimeInterval timeStamp = [[NSDate date ] timeIntervalSince1970 ];
26+ NSNumber *timeStampObj = [NSNumber numberWithInteger: [[NSNumber numberWithDouble: timeStamp] integerValue ] ];
27+ NSMutableString *fileName = [[NSMutableString alloc ] initWithString: @" Recording-" ];
28+ [fileName appendString: [timeStampObj stringValue ]];
3029
3130 [self .screenRecordCoordinator
32- startRecordingWithFileName: randomString
31+ startRecordingWithFileName: fileName
3332 recordingHandler: ^(NSError *error) {
3433 if (error)
3534 {
Original file line number Diff line number Diff line change @@ -76,8 +76,8 @@ import Foundation
7676 let urls = directoryContents. map ( {
7777 ( url: URL ) -> String in
7878 return url. relativePath
79- } )
80- return urls
79+ } ) . sorted ( by : > ) ;
80+ return urls;
8181 }
8282}
8383
You can’t perform that action at this time.
0 commit comments