Skip to content

chasays/2028_game_iOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2048 Game with History Tracking

This is a complete implementation of the 2048 game with history tracking. The app works with both personal development teams (free Apple IDs) and paid developer accounts.

Features

  • Complete 2048 game implementation with swipe controls
  • Game history tracking with local storage
  • iCloud synchronization using CloudKit (for paid developer accounts)
  • Statistics display (best score, average score, total games)
  • Sync status indicators

Configuration for Personal Development Teams (Free Apple IDs)

The app will work with personal development teams, but iCloud features will be automatically disabled since they're not supported with free accounts. The app will:

  • Function as a complete 2048 game
  • Save game history locally
  • Display statistics
  • Gracefully handle the absence of iCloud

Configuration for Paid Developer Accounts

To enable iCloud synchronization, you need to configure the project in Xcode:

  1. Enable iCloud Capability:

    • Open the project in Xcode
    • Select your project target
    • Go to the "Signing & Capabilities" tab
    • Click the "+" button and add "iCloud"
    • Check "CloudKit" in the Services section
  2. Configure iCloud Containers:

    • In the iCloud capability, ensure a container is selected
    • The default container (iCloud.$(PRODUCT_BUNDLE_IDENTIFIER)) should work
  3. Set Team and Bundle Identifier:

    • Make sure you have a valid Apple Developer Team selected
    • Set an appropriate Bundle Identifier in the project settings

Files Overview

  • ContentView.swift: Main game interface with swipe controls
  • Game2048Model.swift: Game logic and state management
  • GameHistory.swift: History tracking with optional iCloud sync
  • GameHistoryView.swift: History display with statistics
  • test_app_ios.entitlements: Minimal entitlements configuration

Testing

  1. Run the app on a device or simulator
  2. Play a few games to generate history
  3. For paid accounts: Sign in with the same Apple ID on multiple devices to test iCloud sync

Notes

  • The app gracefully handles the absence of iCloud for personal development teams
  • All core game functionality works without iCloud
  • Local history storage is always available

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages