Fuse Community

CameraRoll issue on iOS

Hello guys,

Does any of you experience the issue with CameraRoll on iOS? I’m trying to get Image from CameraRoll with this code:

function chooseImage() {
	CameraRoll.getImage().then(function(image) {
		var arrayBuff = FileSystem.readBufferFromFileSync(image.path);
		var b64data = Base64.encodeBuffer(arrayBuff);

		API.uploadMedia(b64data, image.name).then(function(img) {
			image.value = url + img.path;
		});

	}, function(error) {
		console.log(error);
    });
}

The information I get in debug log in XCode looks like this:

Main Thread Checker: UI API called on a background thread: -[UIImagePickerController init]
PID: 2274, TID: 626831, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4   APP                           0x0000000102d3d1d0 -[ImagePicker openImagePickerWithSourceType:then:or:] + 208
5   APP                           0x0000000102d40d64 -[CameraRollHelper selectPictureWithCompletionHandler:onFail:] + 344
6   APP                           0x00000001037d1b80 ___ZZN1g4Fuse10CameraRoll13iOSCameraRoll21SelectPictureInternalEP9uDelegateS4_ENK3$_9clEU13block_pointerFvP8NSStringES9__block_invoke.34 + 92
7   libdispatch.dylib                   0x0000000104da1e48 _dispatch_call_block_and_release + 32
8   libdispatch.dylib                   0x0000000104da32a8 _dispatch_client_callout + 20
9   libdispatch.dylib                   0x0000000104db4ccc _dispatch_root_queue_drain + 900
10  libdispatch.dylib                   0x0000000104db5418 _dispatch_worker_thread2 + 144
11  libsystem_pthread.dylib             0x00000001b324ea60 _pthread_wqthread + 216
12  libsystem_pthread.dylib             0x00000001b3254c78 start_wqthread + 8
2019-10-03 10:37:52.259220+0200 APP[2274:626831] [reports] Main Thread Checker: UI API called on a background thread: -[UIImagePickerController init]
PID: 2274, TID: 626831, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4   APP                           0x0000000102d3d1d0 -[ImagePicker openImagePickerWithSourceType:then:or:] + 208
5   APP                           0x0000000102d40d64 -[CameraRollHelper selectPictureWithCompletionHandler:onFail:] + 344
6   APP                           0x00000001037d1b80 ___ZZN1g4Fuse10CameraRoll13iOSCameraRoll21SelectPictureInternalEP9uDelegateS4_ENK3$_9clEU13block_pointerFvP8NSStringES9__block_invoke.34 + 92
7   libdispatch.dylib                   0x0000000104da1e48 _dispatch_call_block_and_release + 32
8   libdispatch.dylib                   0x0000000104da32a8 _dispatch_client_callout + 20
9   libdispatch.dylib                   0x0000000104db4ccc _dispatch_root_queue_drain + 900
10  libdispatch.dylib                   0x0000000104db5418 _dispatch_worker_thread2 + 144
11  libsystem_pthread.dylib             0x00000001b324ea60 _pthread_wqthread + 216
12  libsystem_pthread.dylib             0x00000001b3254c78 start_wqthread + 8
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIImagePickerController setSourceType:]
PID: 2274, TID: 626831, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4   APP                           0x0000000102d3d204 -[ImagePicker openImagePickerWithSourceType:then:or:] + 260
5   APP                           0x0000000102d40d64 -[CameraRollHelper selectPictureWithCompletionHandler:onFail:] + 344
6   APP                           0x00000001037d1b80 ___ZZN1g4Fuse10CameraRoll13iOSCameraRoll21SelectPictureInternalEP9uDelegateS4_ENK3$_9clEU13block_pointerFvP8NSStringES9__block_invoke.34 + 92
7   libdispatch.dylib                   0x0000000104da1e48 _dispatch_call_block_and_release + 32
8   libdispatch.dylib                   0x0000000104da32a8 _dispatch_client_callout + 20
9   libdispatch.dylib                   0x0000000104db4ccc _dispatch_root_queue_drain + 900
10  libdispatch.dylib                   0x0000000104db5418 _dispatch_worker_thread2 + 144
11  libsystem_pthread.dylib             0x00000001b324ea60 _pthread_wqthread + 216
12  libsystem_pthread.dylib             0x00000001b3254c78 start_wqthread + 8
2019-10-03 10:38:04.011770+0200 APP[2274:626831] [reports] Main Thread Checker: UI API called on a background thread: -[UIImagePickerController setSourceType:]
PID: 2274, TID: 626831, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4   APP                           0x0000000102d3d204 -[ImagePicker openImagePickerWithSourceType:then:or:] + 260
5   APP                           0x0000000102d40d64 -[CameraRollHelper selectPictureWithCompletionHandler:onFail:] + 344
6   APP                           0x00000001037d1b80 ___ZZN1g4Fuse10CameraRoll13iOSCameraRoll21SelectPictureInternalEP9uDelegateS4_ENK3$_9clEU13block_pointerFvP8NSStringES9__block_invoke.34 + 92
7   libdispatch.dylib                   0x0000000104da1e48 _dispatch_call_block_and_release + 32
8   libdispatch.dylib                   0x0000000104da32a8 _dispatch_client_callout + 20
9   libdispatch.dylib                   0x0000000104db4ccc _dispatch_root_queue_drain + 900
10  libdispatch.dylib                   0x0000000104db5418 _dispatch_worker_thread2 + 144
11  libsystem_pthread.dylib             0x00000001b324ea60 _pthread_wqthread + 216
12  libsystem_pthread.dylib             0x00000001b3254c78 start_wqthread + 8
=================================================================
Main Thread Checker: UI API called on a background thread: -[UINavigationController setDelegate:]
PID: 2274, TID: 626831, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4   APP                           0x0000000102d3d22c -[ImagePicker openImagePickerWithSourceType:then:or:] + 300
5   APP                           0x0000000102d40d64 -[CameraRollHelper selectPictureWithCompletionHandler:onFail:] + 344
6   APP                           0x00000001037d1b80 ___ZZN1g4Fuse10CameraRoll13iOSCameraRoll21SelectPictureInternalEP9uDelegateS4_ENK3$_9clEU13block_pointerFvP8NSStringES9__block_invoke.34 + 92
7   libdispatch.dylib                   0x0000000104da1e48 _dispatch_call_block_and_release + 32
8   libdispatch.dylib                   0x0000000104da32a8 _dispatch_client_callout + 20
9   libdispatch.dylib                   0x0000000104db4ccc _dispatch_root_queue_drain + 900
10  libdispatch.dylib                   0x0000000104db5418 _dispatch_worker_thread2 + 144
11  libsystem_pthread.dylib             0x00000001b324ea60 _pthread_wqthread + 216
12  libsystem_pthread.dylib             0x00000001b3254c78 start_wqthread + 8
2019-10-03 10:38:04.107662+0200 APP[2274:626831] [reports] Main Thread Checker: UI API called on a background thread: -[UINavigationController setDelegate:]
PID: 2274, TID: 626831, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4   APP                           0x0000000102d3d22c -[ImagePicker openImagePickerWithSourceType:then:or:] + 300
5   APP                           0x0000000102d40d64 -[CameraRollHelper selectPictureWithCompletionHandler:onFail:] + 344
6   APP                           0x00000001037d1b80 ___ZZN1g4Fuse10CameraRoll13iOSCameraRoll21SelectPictureInternalEP9uDelegateS4_ENK3$_9clEU13block_pointerFvP8NSStringES9__block_invoke.34 + 92
7   libdispatch.dylib                   0x0000000104da1e48 _dispatch_call_block_and_release + 32
8   libdispatch.dylib                   0x0000000104da32a8 _dispatch_client_callout + 20
9   libdispatch.dylib                   0x0000000104db4ccc _dispatch_root_queue_drain + 900
10  libdispatch.dylib                   0x0000000104db5418 _dispatch_worker_thread2 + 144
11  libsystem_pthread.dylib             0x00000001b324ea60 _pthread_wqthread + 216
12  libsystem_pthread.dylib             0x00000001b3254c78 start_wqthread + 8
2019-10-03 10:38:13.523282+0200 APP[2274:626834] [core] "Error returned from daemon: Error Domain=com.apple.accounts Code=7 "(null)""

Any idea what is the problem? I’m using:

  • Uno 1.12.3 (build 397)
  • Fuselibs 1.12.0
  • Xcode 11.0 (11A420a)

Problem can be solved by downgrading Xcode to 10.3 version.

I believe this issue has been resolved on the master branch of Fuselibs. We soon to be released the latest version of Uno and Fuselibs, stay tuned!

Oh yeah, I fixed this iOS13 issue already, you can wait for the next release or use the latest fuselibs: