Create Your Own Networking Framework for iOS
Create a framework using Xcode that you can make network (http) calls and use it in every iOS project.
Open Xcode and create a new project. In the first screen that appears we need to select Framework as a template for our new project and hit next.
For our tutorial we put as a product name the label “Networking”.
We need to create only 3 files to start using our library. Our files will be name as “ServiceManager”, “HTTPError” and “HTTPMethod”.
Now that we created our empty files let’s explain what they should do. Let’s start with the HTTPError.
Think what kind of errors an http service could return and let’s put some of them in our enum class. Currently i’m thinking only 4 kinds of errors (of course you can add whatever you want). I added the “url failed” error which…