Skip to content

Commit 77fda7e

Browse files
committed
feat: Get ready for v1.0.0
1 parent 660d36c commit 77fda7e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+4761
-563
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'bug'
6+
assignees: ''
7+
8+
---
9+
10+
<!--- Provide a general summary of the issue in the Title above -->
11+
12+
## Expected Behavior
13+
<!--- Tell us what should happen -->
14+
15+
## Current Behavior
16+
<!--- Tell us what happens instead of the expected behavior -->
17+
18+
## Possible Solution
19+
<!--- Not obligatory, but suggest a fix/reason for the bug -->
20+
21+
## Steps to Reproduce (for bugs)
22+
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
23+
<!--- reproduce this bug. Include code to reproduce, if relevant -->
24+
1.
25+
2.
26+
3.
27+
4.
28+
29+
## Context
30+
<!--- How has this issue affected you? What are you trying to accomplish? -->
31+
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
32+
33+
## Your Environment
34+
<!--- Include as many relevant details about the environment you experienced the bug in -->
35+
* Version used:
36+
* Environment name and version (device, simalator):
37+
* Operating System and version (iOS, osx):
38+
* Link to your project:
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: 'enhancement'
6+
assignees: ''
7+
8+
---
9+
10+
<!--- Provide a general summary of the feature request in the Title above -->
11+
12+
## Expected Behavior
13+
<!--- A clear and concise description of what you want to happen -->
14+
15+
## Current Behavior
16+
<!--- Explain the difference from current behavior -->
17+
18+
## Possible Solution
19+
<!--- Suggest ideas of how to implement the addition or change -->
20+
21+
## Alternatives Considered
22+
<!--- A clear and concise description of any alternative solutions or features you've considered -->
23+
24+
## Additional Context
25+
<!--- Add any other context or screenshots about the feature request here. -->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!--- Provide a general summary of your changes in the Title above -->
2+
<!--- Pull request titles must use the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) format -->
3+
4+
## Issue being fixed or feature implemented
5+
<!--- Why is this change required? What problem does it solve? -->
6+
<!--- If it fixes an open issue, please link to the issue here. -->
7+
8+
9+
## What was done?
10+
<!--- Describe your changes in detail -->
11+
12+
13+
## How Has This Been Tested?
14+
<!--- Please describe in detail how you tested your changes. -->
15+
<!--- Include details of your testing environment, and the tests you ran to -->
16+
<!--- see how your change affects other areas of the code, etc. -->
17+
18+
19+
## Breaking Changes
20+
<!--- Please describe any breaking changes your code introduces and verify that -->
21+
<!--- the title includes "!" following the conventional commit type (e.g. "feat!: ..."-->
22+
23+
24+
## Checklist:
25+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
26+
- [ ] I have performed a self-review of my own code
27+
- [ ] I have commented my code, particularly in hard-to-understand areas
28+
- [ ] I have added or updated relevant unit/integration/functional/e2e tests
29+
- [ ] I have made corresponding changes to the documentation
30+

.github/workflows/ios-tests.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: iOS Tests
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
test:
12+
name: Build and Test on iOS
13+
runs-on: macos-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Select Xcode version
20+
run: sudo xcode-select -s /Applications/Xcode_16.4.app
21+
22+
- name: Show Xcode version
23+
run: xcodebuild -version
24+
25+
- name: Show available simulators
26+
run: xcrun simctl list devices
27+
28+
- name: Build Swift Package
29+
run: swift build
30+
31+
- name: Run iOS Tests with StoreKit Configuration
32+
run: |
33+
xcodebuild test \
34+
-scheme Mercato \
35+
-destination 'platform=iOS Simulator,name=iPhone 16,OS=18.5' \
36+
-configuration Debug \
37+
-enableCodeCoverage YES \
38+
| xcpretty --test --color
39+
40+
- name: Upload test results
41+
uses: actions/upload-artifact@v3
42+
if: failure()
43+
with:
44+
name: test-results
45+
path: |
46+
~/Library/Developer/Xcode/DerivedData/*/Logs/Test/*.xcresult

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,14 @@ fastlane/test_output
9090
iOSInjectionProject/
9191

9292
.DS_Store
93+
.swiftpm
9394
/.build
9495
/Packages
9596
/*.xcodeproj
9697
xcuserdata/
9798
DerivedData/
9899
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
100+
.idea
99101
/TODO
102+
CLAUDE.md
103+
.claude

.swiftformat

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# options
2-
--swiftversion 5.7
2+
--swiftversion 6.0
33
--self remove # redundantSelf
44
--importgrouping testable-bottom # sortedImports
5-
--commas always # trailingCommas
5+
--commas inline # trailingCommas
66
--trimwhitespace always # trailingSpace
77
--indent 4 #indent
88
--ifdef no-indent #indent
99
--indentstrings true #indent
1010

11-
--wraparguments after-first # wrapArguments
12-
--wrapparameters after-first # wrapArguments
11+
--wraparguments before-first # wrapArguments
12+
--wrapparameters before-first # wrapArguments
1313
--wrapcollections before-first # wrapArguments
1414
--wrapconditions after-first # wrapArguments
1515
--wrapreturntype preserve #wrapArguments
16-
--closingparen same-line # wrapArguments
16+
--closingparen balanced # wrapArguments
1717
--wraptypealiases before-first # wrapArguments
1818
--funcattributes prev-line # wrapAttributes
1919
--typeattributes prev-line # wrapAttributes

CHANGELOG.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,30 @@ Mercato 1.0.0
55
---------
66

77
### Added
8+
* Subscription state monitoring for billing retry and grace period (addresses [#6](https://github.com/tikhop/Mercato/issues/6))
9+
- `isInBillingRetry(for:)` - Check if subscription is in billing retry state
10+
- `isInGracePeriod(for:)` - Check if subscription is in grace period
11+
- `renewalState(for:)` - Get current renewal state for a subscription
12+
- `subscriptionStatusUpdates` - Direct access to StoreKit 2's subscription status update stream
13+
- `allSubscriptionStatuses` - Stream of all subscription group statuses (iOS 17+)
14+
* Comprehensive product extension methods for subscription details (localizedPrice, localizedPeriod, hasTrial, priceInDay)
15+
* PurchaseOptionsBuilder for fluent configuration of purchase options
16+
* PromotionalOffer model for handling subscription offers
17+
* ProductService with better caching for product fetching
18+
* PriceFormatter and PeriodFormatter utilities for localized formatting
19+
* CurrencySymbolsLibrary for comprehensive currency symbol support
20+
* Example iOS application demonstrating usage
21+
* Detailed usage documentation in Documentation/Usage.md
22+
* Support for visionOS platform
823

924
### Updated
25+
* Migrated to Swift 6.0 tools version while maintaining Swift 5.10 compatibility
26+
* Reorganized code structure
27+
* Enhanced error handling with more specific MercatoError cases
28+
* Simplified purchase API with automatic option building
29+
* Enhanced README with comprehensive usage examples
1030

11-
### Fixed
12-
13-
Mercato 0.0.1
31+
Mercato 0.0.1-0.0.3
1432
---------
1533

1634
* Listen for transaction updates. If your app has unfinished transactions, you receive them immediately after the app launches

0 commit comments

Comments
 (0)