Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/pull-request-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Select Xcode 26.4
run: sudo xcode-select -s /Applications/Xcode_26.4.app

- name: Install XcodeGen
run: brew install xcodegen

- name: Generate Xcode project
run: xcodegen generate

- name: List Devices
run: xcrun xctrace list devices 2>&1

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ playground.xcworkspace
Packages/
# Package.pins
Package.resolved
# *.xcodeproj
*.xcodeproj
#
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
# hence it is not needed unless you have added a package configuration file to your project
Expand Down
65 changes: 65 additions & 0 deletions Configs/Base.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// Base.xcconfig — Shared project-level settings

// Deployment
IPHONEOS_DEPLOYMENT_TARGET = 18.5
SDKROOT = iphoneos
TARGETED_DEVICE_FAMILY = 1,2

// Swift
SWIFT_VERSION = 5.0
SWIFT_EMIT_LOC_STRINGS = YES

// C / C++
GCC_C_LANGUAGE_STANDARD = gnu17
CLANG_CXX_LANGUAGE_STANDARD = gnu++20

// Modules & ARC
CLANG_ENABLE_MODULES = YES
CLANG_ENABLE_OBJC_ARC = YES
CLANG_ENABLE_OBJC_WEAK = YES

// Search Paths
ALWAYS_SEARCH_USER_PATHS = NO

// Warnings — Clang
CLANG_ANALYZER_NONNULL = YES
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES
CLANG_WARN_BOOL_CONVERSION = YES
CLANG_WARN_COMMA = YES
CLANG_WARN_CONSTANT_CONVERSION = YES
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR
CLANG_WARN_DOCUMENTATION_COMMENTS = YES
CLANG_WARN_EMPTY_BODY = YES
CLANG_WARN_ENUM_CONVERSION = YES
CLANG_WARN_INFINITE_RECURSION = YES
CLANG_WARN_INT_CONVERSION = YES
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES
CLANG_WARN_STRICT_PROTOTYPES = YES
CLANG_WARN_SUSPICIOUS_MOVE = YES
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
CLANG_WARN_UNREACHABLE_CODE = YES
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES

// Warnings — GCC
GCC_NO_COMMON_BLOCKS = YES
GCC_WARN_64_TO_32_BIT_CONVERSION = YES
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR
GCC_WARN_UNDECLARED_SELECTOR = YES
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE
GCC_WARN_UNUSED_FUNCTION = YES
GCC_WARN_UNUSED_VARIABLE = YES

// Misc
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES
COPY_PHASE_STRIP = NO
ENABLE_STRICT_OBJC_MSGSEND = YES
ENABLE_USER_SCRIPT_SANDBOXING = YES
LOCALIZATION_PREFERS_STRING_CATALOGS = YES
MTL_FAST_MATH = YES
22 changes: 22 additions & 0 deletions Configs/Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Debug.xcconfig

#include "Base.xcconfig"

// Debug Info
DEBUG_INFORMATION_FORMAT = dwarf
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE

// Optimization
GCC_OPTIMIZATION_LEVEL = 0
SWIFT_OPTIMIZATION_LEVEL = -Onone
GCC_DYNAMIC_NO_PIC = NO

// Architecture
ONLY_ACTIVE_ARCH = YES

// Testing
ENABLE_TESTABILITY = YES

// Preprocessor
GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1 $(inherited)
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG $(inherited)
14 changes: 14 additions & 0 deletions Configs/Release.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Release.xcconfig

#include "Base.xcconfig"

// Debug Info
DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
MTL_ENABLE_DEBUG_INFO = NO

// Optimization
SWIFT_COMPILATION_MODE = wholemodule

// Validation
VALIDATE_PRODUCT = YES
ENABLE_NS_ASSERTIONS = NO
37 changes: 37 additions & 0 deletions Configs/SatsBuddy.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// SatsBuddy.xcconfig — Target-level settings

// Identity
PRODUCT_BUNDLE_IDENTIFIER = com.bitcoindevkit.SatsBuddy
PRODUCT_NAME = $(TARGET_NAME)
MARKETING_VERSION = 1.0
CURRENT_PROJECT_VERSION = 1

// Signing
DEVELOPMENT_TEAM = WUQYBPQJWN
CODE_SIGN_STYLE = Automatic
CODE_SIGN_ENTITLEMENTS = SatsBuddy/SatsBuddy.entitlements

// Info.plist
GENERATE_INFOPLIST_FILE = YES
INFOPLIST_FILE = SatsBuddy/Info.plist
INFOPLIST_KEY_CFBundleDisplayName = SATSBUDDY
INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO
INFOPLIST_KEY_LSApplicationCategoryType =
INFOPLIST_KEY_NFCReaderUsageDescription = We need NFC access to scan SatsCards.
INFOPLIST_KEY_NSCameraUsageDescription = Camera access is required to scan Bitcoin addresses from QR codes
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen
INFOPLIST_KEY_UIRequiredDeviceCapabilities = nfc
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight

// Assets
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor

// Previews
ENABLE_PREVIEWS = YES

// Linking
LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,43 @@
- [KeychainAccess](https://github.com/kishikawakatsumi/KeychainAccess)
- [rust-cktap](https://github.com/bitcoindevkit/rust-cktap)

## Running SatsBuddy Locally

### Prerequisites

- Xcode (and Xcode Command Line Tools)
- [XcodeGen](https://github.com/yonaskolb/XcodeGen)
- Git

You can verify the required tools are installed with:

```bash
xcodebuild -version
xcodegen --version
git --version
```

Install XcodeGen via Homebrew if needed:

```bash
brew install xcodegen
```

### Repository Setup

Clone SatsBuddy, generate the Xcode project, and open it:

```bash
git clone https://github.com/reez/SatsBuddy.git
cd SatsBuddy
xcodegen generate
open SatsBuddy.xcodeproj
```

The `.xcodeproj` is not checked into version control — it is generated from `project.yml` and the xcconfig files in `Configs/`. You need to run `xcodegen generate` after cloning and whenever source files are added or removed.

SatsBuddy resolves `CKTap` from the remote `rust-cktap` Swift Package (`v0.2.2`).

## SwiftUI Previews

This project links native and FFI-heavy dependencies (`CKTap`, `BitcoinDevKit`).
Expand Down
Loading
Loading