I made this game, Shapes & Numbers, a few months ago using Swift Playgrounds. During this process, one of the things I found out was that there are some important missing capabilities when using Swift Playgrounds. Namely - you can't add game center OR in-app purchases to your app.
So... I converted the Swift Playgrounds project over to an Xcode project and got to work integrating these two capabilities into my game.
0:00 - Intro and Setup
0:24 - Adding GameCenter to SpriteKit Game
5:37 - Adding In-App Purchases to SpriteKit Game
It was slow going since Apple doesn't make it easy to convert a Swift Playgrounds project into a full Xcode project. But once I figured that out, I was able to add some boilerplate code I found on Apple's Developer documentation. Adjust it using the information I found on Stack Overflow and I was off to the races.
I now have a working sandbox of my first in-app purchase and two leaderboards in a game that I started making using Swift Playgrounds with SwiftUI.
Are there better ways to do this? Absolutely - but this way seems to be working so far and I've learned a lot about adding Game Center and adding in-app purchases to my iOS projects that I'll be able to take with me to future builds.
I hope you enjoyed this video!
Converting Swift Playgrounds to XCODE: [ Ссылка ]
//Things I've Made
ZER0ED: [ Ссылка ]
Shapes&Numbers: [ Ссылка ]
My Website: [ Ссылка ]
//Affiliate Links To Gear I Use
MacBook: [ Ссылка ]
iPad Pro: [ Ссылка ]
Apple Pencil: [ Ссылка ]
Camera: [ Ссылка ]
Lens: [ Ссылка ]
SM7B: [ Ссылка ]
Ещё видео!