Hi, how do you all fetch files from a remote server within an SDL iOS app? My app uses libcurl on other platforms, but I am struggling to get libcurl to compile and work on iOS.
I looked at SDL_net, but I am not sure if it is the right tool. Maybe it is more low-level? How would one use it to fetch a file via a URL?
sorry, I never touched iOS or macOS so far
SDL_net operates at socket abstraction, which is the second most low-level API. SDL_net seems to be able to resolve URLs into IPs, but then you are on your own reading and writing into TCP or UDP streams. it has no TLS which is needed to secure connections, no HTTP parser/generator if your resources are behind a REST API and so forth, which are all things that libcurl handles for you.
SDL_net seems to be overall non-blocking, but if you can afford, creating a new thread for each resources will be easier.
are you acquainted with socket programming?
what is going wrong with libcurl? there is a chance you can provide a custom backend for it, so that it uses SDL_net instead of whatever it is trying to use. but I don’t know!