I would like to create a custom error domain for my application. I have an enumerated NSInteger type that covers all possible error codes I can get, my question is how do I associate these with my custom domain? Thanks.
I would like to create a custom error domain for my application. I have
Share
Your domain is just a string naming it. You don’t need to register it anywhere.
In your header with your error codes, add this line:
And in your implementation file:
Then you can use that named constant for your error domain. Done!