-
Hi again, You were so helpful last time around. Thank you! I have another question - when trying out IOS 17 beta (tried both 4 and 5), the export function fails with the following error: It works well on iOS 16, but generates a Have you seen the same behavior? Any idea on how to fix this? Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 12 replies
-
I think you mean when using This may be an iOS change or bug. Or an app permission issue. It would be useful to know where this error is happening exactly in code. |
Beta Was this translation helpful? Give feedback.
-
It looks like a file permission error that probably isn't related to TimecodeKit. Can you log the URLs to the console so see what they are? |
Beta Was this translation helpful? Give feedback.
-
Both URLs look just fine. And as mentioned, on iOS 16 this works as a charm. The error only shows up on iOS 17 betas. It does not seem to be related to TimecodeKit, I agree, more to the code around it to write the result to a file. I only asked you as you seem very knowledgeable about everything related. |
Beta Was this translation helpful? Give feedback.
-
I did a MVP test to see if I could replicate the issue. Xcode 15 beta 6 using an iPhone 14 Simulator with iOS 17 beta 5.
import TimecodeKit
import AVFoundation
func go() throws {
guard let fromFileUrl = Bundle.main.url(forResource: "test", withExtension: "mov") else { print("Resource URL error") ; return }
let movie = AVMovie(url: fromFileUrl)
guard let mutableMovie = movie.mutableCopy() as? AVMutableMovie else { print("Mutable movie is nil") ; return }
print(mutableMovie)
let tc = try Timecode(TCC(h: 1), at: ._24)
try mutableMovie.replaceTimecodeTrack(startTimecode: tc, fileType: .mov)
let outURL = URL.temporaryDirectory.appending(component: UUID().uuidString + ".mov")
let exporter = AVAssetExportSession(
asset: mutableMovie,
presetName: AVAssetExportPresetPassthrough
)!
exporter.outputFileType = .mov
exporter.outputURL = outURL
exporter.exportAsynchronously {
switch exporter.status {
case .unknown: print("unknown")
case .waiting: print("waiting")
case .exporting: print("exporting")
case .completed: print("completed")
case .failed: print("failed")
case .cancelled: print("cancelled")
@unknown default: print("default")
}
if let exportError = exporter.error {
print("\(exportError)")
}
print("Output file exists:", FileManager.default.fileExists(atPath: outURL.path(percentEncoded: false)))
}
} Works as expected with no issues. Log output:
|
Beta Was this translation helpful? Give feedback.
-
Yes, on the simulator everything works
|
Beta Was this translation helpful? Give feedback.
-
Great news! Apple just responded to my radar and said to try the iOS 17.1 beta that was just released. I gave it a spin myself, and it looks like they fixed it!
|
Beta Was this translation helpful? Give feedback.
-
Awesome, thanks for the update!
…On Fri, 29 Sep 2023 at 01:47, Steffan Andrews ***@***.***> wrote:
Great news! Apple just responded to my radar and said to try the iOS 17.1
beta that was just released.
I gave it a spin myself, and it looks like they fixed it!
<AVMutableMovie: 0x280d3c5c0 tracks = (
"<AVMutableMovieTrack: 0x280d30800, trackID = 1, mediaType = vide>",
"<AVMutableMovieTrack: 0x280d3c8c0, trackID = 2, mediaType = tmcd>"
) >
Output URL: file:///private/var/mobile/Containers/Data/Application/3D4897CC-F9B9-4E8B-A306-DB9B315AA7CE/tmp/757F01E0-6B9E-415D-A046-121345A5E38B.mov
completed
Output file exists: true
—
Reply to this email directly, view it on GitHub
<#63 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOIVS7JVS7TD7B5QAD3AADX4YEBXANCNFSM6AAAAAA3J2X7UI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
Great news! Apple just responded to my radar and said to try the iOS 17.1 beta that was just released.
I gave it a spin myself, and it looks like they fixed it!