Kodeco Forums

Video Tutorial: In-App Purchase Part 1: Getting Started

In this video you'll discover how to add IAP products to iTunes Connect, an then retrieve them inside your app.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4158-in-app-purchase/lessons/2

Hi. Thanks a lot for the tutorial.

I’m trying to create in-app purchase of type Automatically Renewable Subscriptions in iTunes Connect. At the end of the process Apple demands link to privacy policy. And it seems that I can’t avoid providing it.

What’s that about? I do not need user’s credentials to provide privacy for.

Is there simple solution for the issue?

Thanks.

If you’re not collecting or storing the user’s credentials, then the privacy policy will be pretty simple.

It’s important to provide a privacy policy because it provides the user a place to look up exactly what your app will be doing with any data that it collects, and this includes against purchases.

There is no easier way around it - it’s there and important for a reason,

Sorry not be be able to give you a silver bullet…

sam

Hello,

I don’t understand one thing, why should I provide list of identifiers to get the products? Why can’t I get list of all products without any ids? For me it looks like I already can get product if I know id.

Thanks.

Heads up! In video 2, it is mentioned that you can use “+” to create sandbox accounts using aliases on your email address. This is no longer supported. Each sandbox account must have its own unique email address without an alias.

1 Like

@isaac_overacker

That’s good to know—thanks for highlighting that on the forum.

A real shame tho—that ability was really useful :frowning:

sam

hi!

can you help me out here? I’m really interested in learning how to correctly implement a multiple currency model for my iOS game. I’m thinking something like what’s in Toy Blast, or Boom Beach. in the case of Toy blast, you can purchase consumable items such as powerups using coins. the coins can be earned in the game, through events but can also be purchased.

i’m especially interested in integrating a user’s coins across their devices, using apple’s cloud servers if it’s secure to do so, to keep track of their coins… in lieu of that, a way to properly define the data and store it on my own servers. especially keeping in mind potential hacking, and also keeping in mind keeping a full accounting of all coin and power-up use… and while doing coins, also implementing timers for events, new lives, opening chests and so forth.

i have NOT found, online, any good examples of how to implement all of the above, but I feel it’s become the bare minimum necessary for a typical game app on iOS these days. can you point me in the correct direction?

Hi @dkliman,

Sorry about the late reply. If you’re only focusing on iOS, then I think you should consider using CloudKit. That provides built-in authentication and is secure. You can easily access it from all iOS devices, and you aren’t required to support your own servers.

Although we don’t have any content that directly uses CloudKit for saving game state, I recommend that you take a look at this tutorial on CloudKit:

https://www.raywenderlich.com/134694/cloudkit-tutorial-getting-started

Or there’s a video course (which is currently in the process of being updated):

https://videos.raywenderlich.com/courses/45-introduction-to-cloudkit/lessons/1

An alternative might be to use something like realm, but then you’re likely to need to host your own datastore. We have content that looks a realm:

https://videos.raywenderlich.com/courses/19-beginning-realm-on-ios/lessons/1

I think that this course was created before Realm had a server-side aspect, so it might not be that helpful. However, it too is currently being updated.

Hope that gives you some pointers

sam

1 Like

since I wrote that question, I discovered SwiftyStorekit and RebelloperStore, which both use CloudKit. as for saving game state, that’s definitely something I’m interested in knowing more about.

hi sam, can you help me with my stackoverflow question? ios - How to identify clusters of heterogeneous balls in a bin in 2D - Stack Overflow

Hi @dkliman

I don’t know anything about SpriteKit, so there might be a better way of doing this, but the brute force approach is O(N²). I have no idea whether this will be fast enough for your case, but it’s certainly worth trying and then you can optimise later if needs be.

  1. Group the balls into sets/arrays of distinct colours.
  2. Select a ball in the first set.
  3. Find any balls that are within a specified boundary in the same-coloured set, add them to the current grouping.
  4. Mark the current ball as “done”.
  5. For each of the other balls in that grouping, repeat steps 3 + 4 until there are no more balls that satisfy condition 3. This grouping is now complete.
  6. Repeat steps 3–5 for all the balls not marked as done in that current coloured set.
  7. Repeat steps 2–6 for the remaining coloured sets.

All of these calculations are relatively simple arithmetic, so I would expect this to be quite fast. Don’t attempt to optimise prematurely :slight_smile:

Hope that helps

sam

a user on stackoverflow, in a tantalizingly fermatian way, said there is a very easy solution within spritekit… here is one thing he said:

Yeah, when 2 of the same color nodes touch each other, you can place them into an SKNode and treat it like a container, then when the 3rd one touches, you can see if the node it touches is in a container, and continue to add to this new container. It is a bit of work, that is why I haven’t wrote an answer lol . it doesn’t have any loops so it’s just linear time.

still not really sure how to implement that…

This video course is more than six months old, so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]