I found one solution which is works for me.
path = where you want to append your stream.
NSString *path = [directroyPath stringByAppendingFormat:@"%@",videoName];
// [videoData writeToFile:path atomically:YES];
[[NSFileManager defaultManager] createFileAtPath:path contents:nil attributes:nil];
NSInputStream *stream = [NSInputStream inputStreamWithURL:URL];
NSInteger result;
uint8t * buffer = malloc(131072);// BUFFERLEN can be any positive integer
NSOutputStream *outputStream = [NSOutputStream outputStreamToFileAtPath:path append:YES];
[stream open];
[outputStream open];
while((result = [stream read:buffer maxLength:131072]) != 0) {
if(result > 0) {
// buffer contains result bytes of data to be handled
//[data appendBytes:buffer length:result];
[outputStream write:buffer maxLength:result];
} else {
// The stream had an error. You can get an NSError object using [iStream streamError]
if (result<0) {
[NSException raise:@"STREAM_ERROR" format:@"%@", [stream streamError]];
}
}
}
[outputStream close];
[stream close];
free(buffer);
Post
Replies
Boosts
Views
Activity
Jarvisit i want to do it automatically.
dear ad4nll
what do you suggest to me which one is better to buy service from Jamf Pro/ Merak or create my MDM server
dear Negenii
is it possible when my application going to background, i launch my application programatically.
dear Claude
I am working on the application where I want to test all iPhone buttons (home, lock, volume up and down, mute) is working fine. I tests all buttons expect home, and lock button, I want to check when the user clicks the home button if the home button is working fine so use alert your home button is working fine otherwise user sees home is not working correctly.
I agree with your points I want to know is there any apple service or third party service to bypass/ or allow this permission before launching the application.
Is it possible through apple MDM service to bypass these permissions, I install my application through the MDM server, is it possible to allow all permission through MDM service before launching the application?
similarly i want the same feature for the lock button.