3 ms·
A few days ago I downloaded a third party iOS library, written in Obj-C. It was provided as part of a paid cloud API service. After integrating it, I was amazed
by jordansmithnz 10y ago
A few days ago I downloaded a third party iOS library, written in Obj-C. It was provided as part of a paid cloud API service. After integrating it, I was amazed (horrified?) to find that the whole library had been implemented without class prefixes. There were multiple collisions with Swift classes in my project.
Surprisingly the app still compiled, but tried to use the library class definitions instead of my own. I didn't end up using the library, or continuing with the API service.
- penpapersw 10y agoReally? That's not good. Well, as long as they're not using any kind of class-aware RPC, you can probably just add prefixes to all the classes yourself. Would take about 10 minutes using the Rename Class feature of Xcode, and it would be tedious, but it should work.
- LeoNatan25 10y agoSuch libraries are often closed source. Even if not, such a solution does not scale. Each update, you'd have to go through this hoop. Just vote with your wallet and do not use services that offer terrible SDK / API.
- jordansmithnz 10y agoYeah, good point. I actually started to do that, but on further inspection the library did some other questionable things too - and didn't accomplish the primary purpose very well. The whole thing seemed to be more of a 'check a box so we can say we have an iOS library' than a real attempt at reliable, usable library.