[swift-users] in-app purchase coding

Brent Royal-Gordon brent at architechies.com
Thu Aug 11 22:30:20 CDT 2016

> On Aug 10, 2016, at 1:10 PM, developer--- via swift-users <swift-users at swift.org> wrote:
> I really feel ripped off. I chose to learn to develop for iOS for particular reasons, and now at the end of school, I’m about to graduate without having been taught an obviously vital skill that a developer should absolutely posses.

The vital skill a developer should absolutely possess is being able to sit down and—through reading, experimenting, debugging, Googling, and discussing specifics with more experienced developers—figure out how something works.

I'm sorry if this comes off as unfriendly, but you can't expect your classes to teach you every single API you'll ever use. Many are obscure. Many are on different platforms. Many have not even been designed yet. Learning new technologies is a vital—indispensable—skill every programmer needs to have. If you haven't started to acquire that skill, it's time you get to it.

That's not to say that we can't help you, but you're going to need to get a lot more specific. You say you're getting a bunch of errors? Well, pick one of them and try to figure out what's causing it. If you have no idea, put the error message into Google and see what it says. If you still can't figure it out, post here or on Stack Overflow, providing the exact error message and the snippet of code it's happening in. (Not the whole file, just the few lines around the line with the error, and anything else you think we might need to see to understand them.)

If you think the problem is more conceptual—if you feel like the issue is not with the exact code you've written, but rather that you have no idea how in-app purchase is supposed to work—then take a step back from your code and look for samples, tutorials, or books on the subject. Apple might not have anything specifically for in-app purchases (or their sample might be in Objective-C), but I'm sure somebody does. Don't read them to find code to copy; read them to understand how they work. And then once you do understand, bring that understanding back to your code.

But the most important part is an attitude change. Development is not a mechanical skill; your job is not merely to do the specific programming tasks you've been taught, but also to figure out how to perform new tasks—perhaps even tasks *nobody* has ever done before. Writing code that uses this API is not your teacher's job, or DTS's job, or this mailing list's job. It's *your* job.

The rest of us are here to help, but this is the job you signed up for. Roll up your sleeves and get to work.

Brent Royal-Gordon

More information about the swift-users mailing list