securing / IOSSecuritySuite

iOS platform security & anti-tampering Swift library
https://www.securing.biz/
Other
2.27k stars 272 forks source link

[QUESTION] Reasoning behind main thread usage #98

Closed ulusalomerwise closed 11 months ago

ulusalomerwise commented 11 months ago

I am curious about why you are using main thread here. Why don't we call canOpenUrl in a background thread?

https://github.com/securing/IOSSecuritySuite/blob/1708ab502d8985ce1a1957128473fe866d9e965e/IOSSecuritySuite/JailbreakChecker.swift#L88-L122

ulusalomerwise commented 11 months ago

Here it says calling this function in a background thread is okay.

https://developer.apple.com/documentation/uikit/uiapplication/1622952-canopenurl

You can call this method safely on a thread that isn’t the main thread.

r3ggi commented 11 months ago

Hey!

Yes, you're right. Thanks, I fixed it