@@ -18,7 +18,7 @@ public extension NitroCameraConfig {
1818 /**
1919 * Create a new instance of `NitroCameraConfig`.
2020 */
21- init ( mediaType: MediaType , presentation: Presentation , language: Language , crop: PickerCropConfig ? , isSaveSystemAlbum: Bool ? , allowLocation: Bool ? , color: Double ? , cameraDevice: CameraDevice , videoMaximumDuration: Double ? ) {
21+ init ( mediaType: MediaType , presentation: Presentation , language: Language , crop: PickerCropConfig ? , isSaveSystemAlbum: Bool ? , allowLocation: Bool ? , color: Double ? , cameraDevice: CameraDevice ? , videoMaximumDuration: Double ? ) {
2222 self . init ( mediaType, presentation, language, { ( ) -> bridge . std__optional_PickerCropConfig_ in
2323 if let __unwrappedValue = crop {
2424 return bridge. create_std__optional_PickerCropConfig_ ( __unwrappedValue)
@@ -43,7 +43,13 @@ public extension NitroCameraConfig {
4343 } else {
4444 return . init( )
4545 }
46- } ( ) , cameraDevice, { ( ) -> bridge . std__optional_double_ in
46+ } ( ) , { ( ) -> bridge . std__optional_CameraDevice_ in
47+ if let __unwrappedValue = cameraDevice {
48+ return bridge. create_std__optional_CameraDevice_ ( __unwrappedValue)
49+ } else {
50+ return . init( )
51+ }
52+ } ( ) , { ( ) -> bridge . std__optional_double_ in
4753 if let __unwrappedValue = videoMaximumDuration {
4854 return bridge. create_std__optional_double_ ( __unwrappedValue)
4955 } else {
@@ -159,14 +165,20 @@ public extension NitroCameraConfig {
159165 }
160166 }
161167
162- var cameraDevice : CameraDevice {
168+ var cameraDevice : CameraDevice ? {
163169 @inline ( __always)
164170 get {
165- return self . __cameraDevice
171+ return self . __cameraDevice. value
166172 }
167173 @inline ( __always)
168174 set {
169- self . __cameraDevice = newValue
175+ self . __cameraDevice = { ( ) -> bridge . std__optional_CameraDevice_ in
176+ if let __unwrappedValue = newValue {
177+ return bridge. create_std__optional_CameraDevice_ ( __unwrappedValue)
178+ } else {
179+ return . init( )
180+ }
181+ } ( )
170182 }
171183 }
172184
0 commit comments