Skip to content

Commit 1d14b9d

Browse files
committed
Convert demo to iOS SwiftUI app
1 parent 678fbaa commit 1d14b9d

File tree

4 files changed

+57
-14
lines changed

4 files changed

+57
-14
lines changed

DemoApp/CowCodableDemoApp/CowCodableDemoApp.xcodeproj/project.pbxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
A10000000000000000000027 /* RescueLogView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A10000000000000000000037 /* RescueLogView.swift */; };
1818
A10000000000000000000028 /* OutputFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = A10000000000000000000038 /* OutputFormatter.swift */; };
1919
E60C7D312F4CBD0A0093DF6E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E60C7D302F4CBD0A0093DF6E /* Assets.xcassets */; };
20-
E60C7D332F4CC1DC0093DF6E /* Logo.icon in Resources */ = {isa = PBXBuildFile; fileRef = E60C7D322F4CC1DC0093DF6E /* Logo.icon */; };
20+
E60C7D332F4CC1DC0093DF6E /* AppIcon.icon in Resources */ = {isa = PBXBuildFile; fileRef = E60C7D322F4CC1DC0093DF6E /* AppIcon.icon */; };
2121
/* End PBXBuildFile section */
2222

2323
/* Begin PBXFileReference section */
@@ -31,7 +31,7 @@
3131
A10000000000000000000037 /* RescueLogView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RescueLogView.swift; sourceTree = "<group>"; };
3232
A10000000000000000000038 /* OutputFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OutputFormatter.swift; sourceTree = "<group>"; };
3333
E60C7D302F4CBD0A0093DF6E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
34-
E60C7D322F4CC1DC0093DF6E /* Logo.icon */ = {isa = PBXFileReference; lastKnownFileType = folder.iconcomposer.icon; path = Logo.icon; sourceTree = "<group>"; };
34+
E60C7D322F4CC1DC0093DF6E /* AppIcon.icon */ = {isa = PBXFileReference; lastKnownFileType = folder.iconcomposer.icon; path = AppIcon.icon; sourceTree = "<group>"; };
3535
/* End PBXFileReference section */
3636

3737
/* Begin PBXFrameworksBuildPhase section */
@@ -107,7 +107,7 @@
107107
isa = PBXGroup;
108108
children = (
109109
E60C7D302F4CBD0A0093DF6E /* Assets.xcassets */,
110-
E60C7D322F4CC1DC0093DF6E /* Logo.icon */,
110+
E60C7D322F4CC1DC0093DF6E /* AppIcon.icon */,
111111
);
112112
path = Resource;
113113
sourceTree = "<group>";
@@ -177,7 +177,7 @@
177177
buildActionMask = 2147483647;
178178
files = (
179179
E60C7D312F4CBD0A0093DF6E /* Assets.xcassets in Resources */,
180-
E60C7D332F4CC1DC0093DF6E /* Logo.icon in Resources */,
180+
E60C7D332F4CC1DC0093DF6E /* AppIcon.icon in Resources */,
181181
);
182182
runOnlyForDeploymentPostprocessing = 0;
183183
};
@@ -325,7 +325,7 @@
325325
A10000000000000000000018 /* Debug */ = {
326326
isa = XCBuildConfiguration;
327327
buildSettings = {
328-
ASSETCATALOG_COMPILER_APPICON_NAME = Logo;
328+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
329329
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
330330
CODE_SIGN_STYLE = Automatic;
331331
CURRENT_PROJECT_VERSION = 1;
@@ -359,7 +359,7 @@
359359
A10000000000000000000019 /* Release */ = {
360360
isa = XCBuildConfiguration;
361361
buildSettings = {
362-
ASSETCATALOG_COMPILER_APPICON_NAME = Logo;
362+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
363363
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
364364
CODE_SIGN_STYLE = Automatic;
365365
CURRENT_PROJECT_VERSION = 1;

DemoApp/CowCodableDemoApp/Resource/Logo.icon/Assets/AppIcon.png renamed to DemoApp/CowCodableDemoApp/Resource/AppIcon.icon/Assets/AppIcon.png

File renamed without changes.

DemoApp/CowCodableDemoApp/Resource/Logo.icon/icon.json renamed to DemoApp/CowCodableDemoApp/Resource/AppIcon.icon/icon.json

File renamed without changes.

README.md

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,38 @@ CowCodable/
102102
└── CowCodableDemoApp/
103103
```
104104

105+
106+
## Requirements
107+
108+
- Swift 5.9+
109+
- iOS 16.0+
110+
- macOS 13.0+
111+
- Xcode 15+
112+
113+
CowCodable uses modern Swift concurrency and type-safe rescue strategies.
114+
115+
## Installation
116+
117+
### Swift Package Manager
118+
119+
#### Using Xcode
120+
121+
1. Open your project in Xcode.
122+
2. Go to **File → Add Package Dependencies…**
123+
3. Enter the repository URL: https://github.com/ANSCoder/CowCodable.git
124+
4. Select the latest version.
125+
5. Add the **CowCodable** library to your target.
126+
127+
#### Using `Package.swift`
128+
129+
Add CowCodable to your dependencies:
130+
131+
```swift
132+
dependencies: [
133+
.package(url: "https://github.com/ANSCoder/CowCodable.git", from: "1.0.0")
134+
]
135+
136+
105137
## Demo App
106138

107139
The repository includes a separate iOS SwiftUI demo app target:
@@ -135,12 +167,19 @@ The app imports `CowCodable` as a local Swift package dependency from this repos
135167

136168
Switching the segmented control changes only the configured rescue policy; input JSON stays unchanged so behavior differences are observable.
137169

138-
### Screenshot Placeholders
170+
## Screenshots
171+
172+
### Main View
173+
![Main Demo](docs/screenshots/demo-main.png)
139174

140-
- `docs/screenshots/demo-main.png` (full app view)
141-
- `docs/screenshots/demo-strict.png` (strict mode example)
142-
- `docs/screenshots/demo-permissive.png` (permissive mode example)
143-
- `docs/screenshots/demo-overflow.png` (overflow case with logs)
175+
### Strict Mode
176+
![Strict Mode](docs/screenshots/demo-strict.png)
177+
178+
### Permissive Mode
179+
![Permissive Mode](docs/screenshots/demo-permissive.png)
180+
181+
### Overflow Case
182+
![Overflow](docs/screenshots/demo-overflow.png)
144183

145184
## Example Model
146185

@@ -181,10 +220,14 @@ The repository uses deterministic validation for both SDK and demo app:
181220

182221
These checks run in CI at `.github/workflows/ci.yml`.
183222

184-
## Formatting
223+
## Code Style
224+
225+
This project enforces consistent formatting via:
226+
227+
- `.editorconfig` (editor-level policy)
228+
- `.swiftformat` (SwiftFormat configuration)
185229

186-
- Root editor policy: `/Users/anandnimje/Documents/CowCodable/.editorconfig`
187-
- SwiftFormat policy: `/Users/anandnimje/Documents/CowCodable/.swiftformat`
230+
Formatting is validated in CI.
188231

189232
## License
190233

0 commit comments

Comments
 (0)