CGImagePropertyOrientation не поддерживается .portrait
Пожалуйста, используйте ниже поддержки:
public enum CGImagePropertyOrientation : UInt32 {
case up // 0th row at top, 0th column on left - default orientation
case upMirrored // 0th row at top, 0th column on right - horizontal flip
case down // 0th row at bottom, 0th column on right - 180 deg rotation
case downMirrored // 0th row at bottom, 0th column on left - vertical flip
case leftMirrored // 0th row on left, 0th column at top
case right // 0th row on right, 0th column at top - 90 deg CW
case rightMirrored // 0th row on right, 0th column on bottom
case left // 0th row on left, 0th column at bottom - 90 deg CCW
}
Ваш код:
let referenceImages = ARReferenceImage(cgImage!, orientation: CGImagePropertyOrientation.up, physicalWidth: 100)
Или
let referenceImages = ARReferenceImage.init(cgImage!, orientation: CGImagePropertyOrientation.up, physicalWidth: 100)