Меню

Cocoa ошибка 1 что

Looks like no one’s replied in a while. To start the conversation again, simply

ask a new question.

i can’t seem to record my screen, can some one help me fix it ?? apple service help.

iPhone XR

Posted on Dec 29, 2018 1:18 PM

2 replies


Question marked as

Helpful

Jan 1, 2019 2:29 AM in response to Moozito

thats to much to do all these steps, i had this issue after the last software update the 12.1.2 never had this issue before. yesterday i was ****** off because i lost 3 important screen records i hope u guys solve it.


Question marked as

Helpful

Jan 1, 2019 3:06 AM in response to Mustafa_Abbas

Most likely one is not enough storage. Check your recently deleted images are cleaned out.

3 replies

Dec 31, 2018 7:58 AM in response to irfan160

Hey there, irfan160,

Thanks for stopping by the Apple Support Communities. If I understand your post, you’re trying to record your screen on your iPhone, but get an error message that the recording couldn’t save, with the error Cocoa error -1. I’m happy to help!

There are a few reasons your screen recording may not be able to save. To help determine what is going on, I’d recommend first checking the storage on your iPhone, and making space as needed: How to check the storage on your iPhone, iPad, and iPod touch — Apple Support.

If there is enough space but you still are unable to save the screen recording, try recording a different app to see if the issue is app-specific. If not, I would next recommend force closing all open apps: How to force an app to close on your iPhone, iPad, or iPod touch — Apple Support then restarting your iPhone: Restart your iPhone, iPad, or iPod touch — Apple Support.

After restarting, check to see if you are able to record your screen. Move onto the following steps if you still need help. Test the screen recording after each step, stopping when the issue is resolved:

  1. Check for, and install, any iOS updates available for your device: Update your iPhone, iPad, or iPod touch — Apple Support.
  2. Backup your iPhone: How to back up your iPhone, iPad, and iPod touch — Apple Support, then reinstall the iOS software using the «Reinstall iOS» section of If you see the Connect to iTunes screen on your iPhone, iPad, or iPod touch — Apple Support.
  3. Restore your iPhone to factory settings, and then set it up as a new device (meaning without restoring the backup you made in the previous step, at least temporarily): Restore your iPhone, iPad, or iPod to factory settings — Apple Support.

Have a wonderful day!


Question marked as

Helpful

Jan 1, 2019 2:29 AM in response to Moozito

thats to much to do all these steps, i had this issue after the last software update the 12.1.2 never had this issue before. yesterday i was ****** off because i lost 3 important screen records i hope u guys solve it.


Question marked as

Helpful

Jan 1, 2019 3:06 AM in response to Mustafa_Abbas

Most likely one is not enough storage. Check your recently deleted images are cleaned out.

cocoa error -1

Hi,

Some of my users are experiencing synchronization issues when using the NSPersistentCloudKitContainer in CoreData.
My app is listening to any errors that occur during the synchronization with the NSPersistentCloudKitContainer.eventChangedNotification Notification.
Before I just got Cocoa-Errors 2 or 3 which indicate a bad network connection or something similar.
Now I received reports with a Cocoa-Error 134419. Does anyone know what this error code means?
Maybe someone from the Core Data team could have a look at this.

Thanks a lot,
Alexander

Accepted Reply

I reached out to the Apple Developer Technical support and used one of my TSIs.
I got a very nice reply explaining the error to me and I want to share my new learnings with everyone else here:

“Cocoa-Error 134419” is an internal error indicating that the Core Data CloudKit aborts the persistent history analysis because the activity was deferred by the system. That normally happens when the system determines that Core Data CloudKit is using too many resources. From the app perspective, it means the app has too much data to export.

Core Data CloudKit may continue the history analysis later and when the system allows, but before that, it can’t export data to CloudKit.

From a developer’s perspective, there is nothing you can do to prevent this (except not storing too much data in Core Data).
«There is no way from the app side that can impact the resource balancing on the system side.»

I hope this helps everyone who is coming across this issue themself.

Replies

I reached out to the Apple Developer Technical support and used one of my TSIs.
I got a very nice reply explaining the error to me and I want to share my new learnings with everyone else here:

“Cocoa-Error 134419” is an internal error indicating that the Core Data CloudKit aborts the persistent history analysis because the activity was deferred by the system. That normally happens when the system determines that Core Data CloudKit is using too many resources. From the app perspective, it means the app has too much data to export.

Core Data CloudKit may continue the history analysis later and when the system allows, but before that, it can’t export data to CloudKit.

From a developer’s perspective, there is nothing you can do to prevent this (except not storing too much data in Core Data).
«There is no way from the app side that can impact the resource balancing on the system side.»

I hope this helps everyone who is coming across this issue themself.

Hi,

Some of my users are experiencing synchronization issues when using the NSPersistentCloudKitContainer in CoreData.
My app is listening to any errors that occur during the synchronization with the NSPersistentCloudKitContainer.eventChangedNotification Notification.
Before I just got Cocoa-Errors 2 or 3 which indicate a bad network connection or something similar.
Now I received reports with a Cocoa-Error 134419. Does anyone know what this error code means?
Maybe someone from the Core Data team could have a look at this.

Thanks a lot,
Alexander

Accepted Reply

I reached out to the Apple Developer Technical support and used one of my TSIs.
I got a very nice reply explaining the error to me and I want to share my new learnings with everyone else here:

“Cocoa-Error 134419” is an internal error indicating that the Core Data CloudKit aborts the persistent history analysis because the activity was deferred by the system. That normally happens when the system determines that Core Data CloudKit is using too many resources. From the app perspective, it means the app has too much data to export.

Core Data CloudKit may continue the history analysis later and when the system allows, but before that, it can’t export data to CloudKit.

From a developer’s perspective, there is nothing you can do to prevent this (except not storing too much data in Core Data).
«There is no way from the app side that can impact the resource balancing on the system side.»

I hope this helps everyone who is coming across this issue themself.

Replies

I reached out to the Apple Developer Technical support and used one of my TSIs.
I got a very nice reply explaining the error to me and I want to share my new learnings with everyone else here:

“Cocoa-Error 134419” is an internal error indicating that the Core Data CloudKit aborts the persistent history analysis because the activity was deferred by the system. That normally happens when the system determines that Core Data CloudKit is using too many resources. From the app perspective, it means the app has too much data to export.

Core Data CloudKit may continue the history analysis later and when the system allows, but before that, it can’t export data to CloudKit.

From a developer’s perspective, there is nothing you can do to prevent this (except not storing too much data in Core Data).
«There is no way from the app side that can impact the resource balancing on the system side.»

I hope this helps everyone who is coming across this issue themself.

Вопрос:

Это код, который я запускаю на viewDidAppear нового быстродействующего приложения. info.plist настроен правильно с помощью ключа Privacy - Photo Library Usage Description.

Ошибка, которую я получаю: The operation couldnt be completed. (Cocoa error -1.) The operation couldnt be completed. (Cocoa error -1.)

Я могу создавать новые активы, удалять активы, любимые активы и возвращать активы… но попытка отредактировать их содержимое приводит к этой ошибке. Я пытаюсь исследовать интернет, чтобы узнать, как это решить (переполнение стека, видео WWDC, вторая страница google, bing и даже yahoo).

PHPhotoLibrary.requestAuthorization { (status:PHAuthorizationStatus) in

if status != PHAuthorizationStatus.authorized { return }

let results = PHAsset.fetchAssets(with: nil)
guard let asset = results.firstObject else { return }

if asset.canPerform(.content) {

let inputOptions = PHContentEditingInputRequestOptions()
inputOptions.isNetworkAccessAllowed = true
inputOptions.canHandleAdjustmentData = { (asjustmentData) -> Bool in
return false
}

asset.requestContentEditingInput(with: inputOptions, completionHandler: { (input, info) in
guard let input = input else { return }

guard let inputImageURL = input.fullSizeImageURL,
let inputImage = CIImage(contentsOf: inputImageURL) else { return }

guard let eagle = EAGLContext(api: .openGLES2) else { return }
let context = CIContext(eaglContext: eagle)
guard let outputImageRef = context.createCGImage(inputImage, from: inputImage.extent) else { return }
let outputImage = UIImage(cgImage: outputImageRef, scale: 1.0, orientation: .right)

let output = PHContentEditingOutput(contentEditingInput: input)

guard let imageData = UIImageJPEGRepresentation(outputImage, 0.9) else { return }
try! imageData.write(to: output.renderedContentURL, options: .atomic)

output.adjustmentData = PHAdjustmentData(formatIdentifier: "myFormat", formatVersion: "1.0", data: Data())

DispatchQueue.main.async {
PHPhotoLibrary.shared().performChanges({

let request = PHAssetChangeRequest(for: asset)
request.contentEditingOutput = output

}, completionHandler: { (success, error) in
print(success ? "It worked" : "It failed with error:")
print(error?.localizedDescription ?? "No Errors!")
})
}
})
}
}

ПРИМЕЧАНИЕ при возврате появляется диалоговое окно iOS “Вы хотите изменить”, однако с кодом выше не появляется диалоговое окно и приложение не сбой.

Ответ №1

Пожалуйста, попробуйте это.

let inputImage = CIImage(contentsOf: inputImageURL) else { return }

// additional code
inputImage = inputImage.applyingOrientation(input.fullSizeImageOrientation)

и измените “право” на “вверх”.

// before
let outputImage = UIImage(cgImage: outputImageRef, scale: 1.0, orientation: .right)

// after
let outputImage = UIImage(cgImage: outputImageRef, scale: 1.0, orientation: .up)

Привет, я пытаюсь сохранить загруженный файл mp4 в свою галерею.

Загрузка URL с помощью, downloadTask

В

func urlSession(_ session: URLSession,
                    downloadTask: URLSessionDownloadTask,
                    didFinishDownloadingTo location: URL){
}

Я получаю URL

file:///private/var/mobile/Containers/Data/Application/8D761DFE-C050-426D-B91C-61DE441FB496/Library/Caches/com.apple.nsurlsessiond/Downloads/com.te.dn/CFNetworkDownload_KFSYSW.tmp

Я создаю путь, используя,

let path = NSSearchPathForDirectoriesInDomains(FileManager.SearchPathDirectory.documentDirectory, FileManager.SearchPathDomainMask.userDomainMask, true)
        let documentDirectoryPath:String = path[0]
        let fileManager = FileManager()
        let destinationURLForFile = URL(fileURLWithPath: documentDirectoryPath.appendingFormat("/file1.mp4"))

if fileManager.fileExists(atPath: destinationURLForFile.path){

        }
        else{
            do {
                try fileManager.moveItem(at: location, to: destinationURLForFile)
                // show file

            }catch{
                print("An error occurred while moving file to destination url")
            }
        }

Я смог успешно переместить файл (без ошибок при перемещении).

Затем я пытаюсь сохранить файл, получаю ошибку

let url = URL(fileURLWithPath: destinationURLForFile.path)

Значение url:

file:///var/mobile/Containers/Data/Application/8DF0C849-56A1-42B3-A081-0C992D18F973/Documents/file1.mp4


        PHPhotoLibrary.shared().performChanges({
            PHAssetChangeRequest.creationRequestForAssetFromVideo(atFileURL: url)
        }) { saved, error in
            if saved {
                let alertController = UIAlertController(title: "Your video was successfully saved", message: nil, preferredStyle: .alert)
                let defaultAction = UIAlertAction(title: "OK", style: .default, handler: nil)
                alertController.addAction(defaultAction)
                self.present(alertController, animated: true, completion: nil)
            }
            else
            {
                print(error?.localizedDescription ?? "f")
            }

        }

O / p: Ошибка: — The operation couldn’t be completed. (Cocoa error -1.)

1 ответ

Лучший ответ

Не удается сохранить видео из файла m3u8.

Но мы можем загрузить видео в автономном режиме, а также не можем перейти к видео в галерею.

Здесь код яблока HLSCatalog


0

Vineesh TP
21 Ноя 2018 в 19:29

(Ошибка cocoa -1/)

    Вы уверены, что у вас действительно есть действительные данные /mp4 из вашей загрузки?

    Используете ли вы протокол SSL (https), иначе вы применили исключение ATS в своем info.plist?

      Проверьте вывод консоли телефона/симулятора на наличие ошибок в отношении ATS

Примечание. Обычно я использую NSUrlSession чтобы избежать обертки HttpClient

Пример использования задачи NSUrlSession:

var videoURL = NSUrl.FromString(urlString);
var videoPath = NSFileManager.DefaultManager.GetUrls(NSSearchPathDirectory.DocumentDirectory, NSSearchPathDomain.User)[0];
NSUrlSession.SharedSession.CreateDownloadTask(videoURL, (location, response, createTaskError) =>
{
if (location != null && createTaskError == null)
{
var destinationURL = videoPath.Append(response?.SuggestedFilename ?? videoURL.LastPathComponent, false);
// If file exists, it is already downloaded, but for debugging, delete it...
if (NSFileManager.DefaultManager.FileExists(destinationURL.Path)) NSFileManager.DefaultManager.Remove(destinationURL, out var deleteError);
NSFileManager.DefaultManager.Move(location, destinationURL, out var moveError);
if (moveError == null)
{
PHPhotoLibrary.RequestAuthorization((status) =>
{
if (status.HasFlag(PHAuthorizationStatus.Authorized))
{
PHPhotoLibrary.SharedPhotoLibrary.PerformChanges(() =>
{
PHAssetChangeRequest.FromVideo(destinationURL);
}, (complete, requestError) =>
{
if (!complete && requestError != null)
Console.WriteLine(requestError);
});
}
});
}
else
Console.WriteLine(moveError);
}
else
Console.WriteLine(createTaskError);
}).Resume();

Примечание. Чтобы подтвердить свой код, попробуйте использовать известный действительный источник безопасного URL:

https://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4 через тестовую страницу «Видео для всех»

0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии

А вот еще интересные материалы:

  • Яшка сломя голову остановился исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного где ошибка
  • Cobian backup ошибка сжатия файла невозможно открыть файл
  • Cobian backup невозможно создать каталог назначения синтаксическая ошибка