Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Vidimi

macrumors newbie
Original poster
Oct 19, 2021
9
0
Apple uses the network framework for everything related to networking including http and TLS: https://developer.apple.com/documentation/network . I guess everything which comes with the OS itself makes use of it. But does this apply to third party apps too?
On other operating system like Windows or Linux some applications (in particular browsers) sometimes come with there own TLS stack and certificate store.
Is this also true when those apps are installed on MacOS? Or do they need to use the functions which the network framework provides and also the native certificate store?
 

casperes1996

macrumors 604
Jan 26, 2014
7,599
5,771
Horsens, Denmark
On macOS applications can and do ship with their own networking stack, yes. On iOS that is not permitted. I don't think I've seen anyone not at least co-operate with Keychain for storing certificates, but you can code you own TLS handshake no problem, though I see no point in not just using what Apple provides.
 
  • Like
Reactions: max2

Vidimi

macrumors newbie
Original poster
Oct 19, 2021
9
0
The question is less about me implementing some new app but more about debugging/analyzing existing ones. When every app uses the the same stack/functions it would be easier. For whatever reason certain vendors (like Mozilla or Google) ship their own TLS stack/cert store. While it is allowed to use your own stack on macOS, are you aware of any apps doing so? Is there some easy way to check if an app uses the native network stack?
 

casperes1996

macrumors 604
Jan 26, 2014
7,599
5,771
Horsens, Denmark
The question is less about me implementing some new app but more about debugging/analyzing existing ones. When every app uses the the same stack/functions it would be easier. For whatever reason certain vendors (like Mozilla or Google) ship their own TLS stack/cert store. While it is allowed to use your own stack on macOS, are you aware of any apps doing so? Is there some easy way to check if an app uses the native network stack?
Don't really have answers for most of that. What I can say is that Google Chrome does link against CoreFoundation's Networking framework, but to what extend they use their own implementations or Apple's code I dunno.
 

casperes1996

macrumors 604
Jan 26, 2014
7,599
5,771
Horsens, Denmark
Is there a way to force use Mobile data usage even if WIFI is ON on this API call.
That choice should be with the user. Allowing apps to just do this could incur fees for the end user. If the user has optimised networking enabled (forget the exact name) where mobile data can be used to improve unstable or slow wi-fi the system will automatically utilise both but there’s no API support for the application code to force mobile data use rather than Wi-Fi to my knowledge and if there is, it most likely requires a permission level for it, but I don’t think it’s a thing at all
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.