Hi,
I'm the admin of an apple developer account and have 30+ people in our team with various roles (dev, marketer, sales etc.) in AppStore Connect.
Since a few weeks ago, people who have been successfully logging into the AppStore Connect and using it without any problems, started to get the following message when trying to login:
"Your Apple ID isn't enabled for iTunesConnect"
with the following path in the URL:
https://itunesconnect.apple.com/login?errorKey=ITC.signin.error.invalidUser
I tried deleting their accounts from our team and sending new invites by adding them again. It didn't change anything.
What could be the reason of this change? Not everyone in our team experience this problem, but several of them do.
I searched this forum and the web but couldn't find a solution.
Thanks
Post
Replies
Boosts
Views
Activity
I'm trying to create a scaled down version of a video selected from the users photo album. The max dimensions of the output will be 720p. Therefore, when retrieving the video, I'm using the .mediumQualityFormat as the deliveryMode.
This causes iOS to retrieve a 720p video from iCloud if the original video or its medium quality version don't exist in the users device.
swift
let videoRequestOptions = PHVideoRequestOptions()
videoRequestOptions.deliveryMode = .mediumQualityFormat
videoRequestOptions.isNetworkAccessAllowed = true
PHImageManager.default().requestAVAsset(forVideo: asset, options: videoRequestOptions) { (asset, audioMix, info) in
// Proceess the asset
}
The problem is, when I use AVAssetExportSession to create a scaled down version of the asset, if the asset is a medium variant and not the original version, the export process fails immediately with the following error:
Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (-17507), NSLocalizedDescription=İşlem tamamlanamadı, NSUnderlyingError=0x283bbcf60 {Error Domain=NSOSStatusErrorDomain Code=-17507 "(null)"}}
I couldn't find anything about the meaning of this error anywhere.
When I set the deliveryMode property to .auto or .highQualityFormat, everything is working properly.
When I checked the asset url's, I noticed that if the video has been retrieved from iCloud, its filename has a ".medium" postfix like in this example:
file:///var/mobile/Media/PhotoData/Metadata/PhotoData/CPLAssets/group338/191B2348-5E19-4A8E-B15C-A843F9F7B5A3.medium.MP4
The weird thing is, if I use FileManager to copy the video in this url to another directory, create a new AVAsset from that file, and use that asset when creating the AVExportSession instance, the problem goes away.
I'd really appreciate if someone could provide some insight about what the problem could be.
This is how I use AVAssetExportSession to create a scaled down version of the original video.
swift
let originalVideoURL = "The url of the asset retrieved from requestAVAsset"
let outputVideoPath = NSTemporaryDirectory() + "encodedVideo.mp4"
let outputVideoURL = URL(fileURLWithPath: outputVideoPath)
guard
let exportSession = AVAssetExportSession(asset: asset, presetName: AVAssetExportPresetHighestQuality),
let videoTrack = asset.tracks(withMediaType: .video).first else {
handleError()
return
}
let videoComposition = AVMutableVideoComposition()
videoComposition.renderSize = scaledSize
videoComposition.frameDuration = CMTimeMake(value: 1, timescale: 30)
let layerInstruction = AVMutableVideoCompositionLayerInstruction(assetTrack: videoTrack)
let transform = videoTrack.preferredTransform
layerInstruction.setTransform(transform, at: .zero)
let instruction = AVMutableVideoCompositionInstruction()
instruction.timeRange = CMTimeRangeMake(start: .zero, duration: asset.duration)
instruction.layerInstructions = [layerInstruction]
videoComposition.instructions = [instruction]
exportSession.videoComposition = videoComposition
exportSession.outputURL = outputVideoURL
exportSession.outputFileType = .mp4
exportSession.shouldOptimizeForNetworkUse = true
exportSession.exportAsynchronously(completionHandler: {[weak self] in
guard let self = self else { return }
if let url = exportSession.outputURL, exportSession.status == .completed {
// Works for local videos
} else {
// Fails with error code 17507 when loading videos with delivery size "Medium"
}
})