Pwnapple 🍎📱

Authentic iOS 6 Skeuomorphic Design System & UI Library for Android built with Jetpack Compose.

CI JitPack License: MIT Platform Kotlin Compose


🌟 Overview

Pwnapple is a pixel-accurate recreation of the iconic, beloved iOS 6 skeuomorphic design language for modern Android apps using Jetpack Compose.

Remember the days of glossy resin buttons, brushed aluminum, stitched leather, woven linen, crisp drop shadows, and satisfying tactile clicks? Pwnapple brings that warmth, depth, and tangible texture back to mobile development.

✨ Features

  • 🎨 Faithful Skeuomorphic Graphics Engine:
    • Modifier.glossHighlight(): 3D resin specular curved sheen.
    • Modifier.innerShadow(): Inset depth for recessed controls.
    • Modifier.skeuoBevel(): Multi-layer outer borders with top highlight and bottom shadow.
    • Modifier.pinstripeBackground(): The classic vertical pinstripe wallpaper (#C5CCD4).
    • Modifier.darkLinenBackground(): Dark woven linen texture.
    • ArrowBackShape: Iconic chevron back button outline with pointed arrowhead.
  • 🎛️ Comprehensive Component Suite:
    • Navigation: IosNavigationBar (Gloss Blue, Slate Black) & IosBackButton.
    • Buttons: IosButton (Silver, Action Blue, Destructive Red, Black) with depressed states & IosSegmentedControl.
    • Inputs: IosSwitch (the legendary sliding ON/OFF toggle), IosSlider, and inset IosTextField.
    • Lists: IosGroupedTable, IosTableCell (disclosure chevrons, icons, subtitles, interactive selection), and IosTableSection.
    • Tabs: IosTabBar with cyan active glow & IosBadge (glossy red notification bubble).
    • Modals: IosAlert (translucent navy UIAlertView) and IosActionSheet (bottom linen sheet).
    • Pickers: IosPickerWheel (3D rotating drum cylinder with cylindrical perspective and glass magnifying lens).
    • Indicators: IosProgressBar and IosActivityIndicator (12-blade rotating gear spinner).
  • 🔊 Zero-Asset Tactile Audio & Haptics:
    • Embedded real-time PCM audio synthesizer (SoundPlayer) using Android's native AudioTrack.
    • Generates authentic mechanical clicks, drum ratchet ticks, and switch snap latches on the fly with sub-5ms latency and 0 bytes of external audio files.
    • Toggleable or customizable via LocalPwnappleSoundFeedback.
  • 📱 Interactive Showcase App:
    • A pixel-perfect clone of the classic iOS 6 Settings.app with interactive sub-screens (Wi-Fi network chooser, Sounds ringer slider, About screen).
    • Live interactive Component Catalog and Dialog Playground.

📦 Installation

Add the JitPack repository to your root settings.gradle.kts:

dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
        maven { url = uri("https://jitpack.io") }
    }
}

Add the dependency to your module's build.gradle.kts:

dependencies {
    implementation("com.github.Heretek-AI:pwnapple:1.0.0")
}

🚀 Quick Start

1. Wrap Your App in PwnappleTheme

import ai.heretek.pwnapple.theme.PwnappleTheme

class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
            PwnappleTheme(soundFeedbackEnabled = true) {
                MyAppContent()
            }
        }
    }
}

2. Grouped Table (Settings Style)

import ai.heretek.pwnapple.components.input.IosSwitch
import ai.heretek.pwnapple.components.table.IosCellAccessory
import ai.heretek.pwnapple.components.table.IosTableCell
import ai.heretek.pwnapple.components.table.IosTableSection
import ai.heretek.pwnapple.graphics.pinstripeBackground

Column(
    modifier = Modifier
        .fillMaxSize()
        .pinstripeBackground()
) {
    IosTableSection(
        headerText = "CONNECTIVITY",
        footerText = "Turn on Airplane Mode to disable all wireless connections."
    ) {
        IosTableCell(
            title = "Airplane Mode",
            accessoryContent = {
                IosSwitch(
                    checked = isAirplaneMode,
                    onCheckedChange = { isAirplaneMode = it }
                )
            }
        )
        IosTableCell(
            title = "Wi-Fi",
            detailText = "Heretek_5G",
            accessory = IosCellAccessory.DisclosureIndicator,
            onClick = { /* Navigate to Wi-Fi settings */ }
        )
    }
}

3. Navigation Bar & Chevron Back Button

import ai.heretek.pwnapple.components.navigation.IosBackButton
import ai.heretek.pwnapple.components.navigation.IosNavigationBar

IosNavigationBar(
    title = "General",
    navigationIcon = {
        IosBackButton(text = "Settings", onClick = { navController.popBackStack() })
    }
)

4. Skeuomorphic Buttons

import ai.heretek.pwnapple.components.button.IosButton
import ai.heretek.pwnapple.components.button.IosButtonStyle

// Standard Silver Button
IosButton(
    text = "Save to Camera Roll",
    onClick = { /* action */ },
    style = IosButtonStyle.Silver
)

// Blue Action Button
IosButton(
    text = "Confirm Purchase",
    onClick = { /* action */ },
    style = IosButtonStyle.Blue
)

// Destructive Red Button
IosButton(
    text = "Delete Account",
    onClick = { /* action */ },
    style = IosButtonStyle.Red
)

5. 3D Drum Wheel Picker (UIPickerView)

import ai.heretek.pwnapple.components.picker.IosPickerWheel

var selectedIndex by remember { mutableIntStateOf(0) }
val items = listOf("iPhone 3GS", "iPhone 4", "iPhone 4S", "iPhone 5")

IosPickerWheel(
    items = items,
    selectedIndex = selectedIndex,
    onSelectedIndexChange = { selectedIndex = it }
)

6. Modal Dialogs (UIAlertView & UIActionSheet)

import ai.heretek.pwnapple.components.dialog.IosAlert
import ai.heretek.pwnapple.components.dialog.IosActionSheet

if (showAlert) {
    IosAlert(
        title = "Cannot Connect to iTunes Store",
        message = "Please verify your internet connection and try again.",
        confirmButtonText = "OK",
        onDismissRequest = { showAlert = false }
    )
}

🔊 Audio Feedback Customization

Audio cues are generated on-the-fly using native PCM audio:

  • To disable audio globally:
    PwnappleTheme(soundFeedbackEnabled = false) { ... }
    
  • To toggle dynamically at runtime:
    val soundFeedback = LocalPwnappleSoundFeedback.current
    soundFeedback.enabled = false // silences all clicks
    

🛠️ Building & Running the Sample App

  1. Clone the repository:
    git clone https://github.com/Heretek-AI/pwnapple.git
    cd pwnapple
    
  2. Build the library and sample application:
    ./gradlew :pwnapple:assembleRelease :sample:assembleDebug
    
  3. Run tests:
    ./gradlew test
    

📄 License

Pwnapple is open-source software licensed under the MIT License. Created and maintained by Heretek AI.

S
Description
Authentic iOS 6 skeuomorphic UI library for Android built with Jetpack Compose
Readme MIT
112 KiB
Languages
Kotlin 100%