Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .claude/guides/04-apple-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public protocol OpenIapModuleProtocol {
func fetchProducts(_ params: ProductRequest) async throws -> FetchProductsResult
func requestPurchase(_ params: RequestPurchaseProps) async throws -> RequestPurchaseResult?
func finishTransaction(purchase: PurchaseInput, isConsumable: Bool?) async throws -> Void
func verifyPurchase(_ props: ReceiptValidationProps) async throws -> ReceiptValidationResult
func verifyPurchase(_ props: VerifyPurchaseProps) async throws -> VerifyPurchaseResult
// ... more methods
}
```
Expand Down
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"cSpell.words": [
"hyodotdev",
"openiap"
"Iapkit",
"openiap",
"Skus"
],
"files.associations": {
"*.podspec": "ruby"
Expand Down
2 changes: 1 addition & 1 deletion packages/apple/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ swift test
#### OpenIap Prefix (Public Models)

- Prefix all public model types with `OpenIap`.
- Examples: `ProductIOS`, `PurchaseIOS`, `ProductIOSRequest`, `RequestPurchaseProps`, `PurchaseIOSOptions`, `ReceiptValidationProps`, `ReceiptValidationResultIOS`, `ActiveSubscription`, `PurchaseIOSState`, `PurchaseIOSOffer`, `ProductIOSType`, `ProductIOSTypeIOS`.
- Examples: `ProductIOS`, `PurchaseIOS`, `ProductRequest`, `RequestPurchaseProps`, `PurchaseOptions`, `VerifyPurchaseProps`, `VerifyPurchaseResultIOS`, `ActiveSubscription`, `PurchaseState`, `PurchaseOfferIOS`, `ProductTypeIOS`.
- Private/internal helper types do not need the prefix.
- When renaming existing types, add a public `typealias` from the old name to the new name to preserve source compatibility, then migrate usages incrementally.

Expand Down
3 changes: 3 additions & 0 deletions packages/apple/Example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ DerivedData/
.swiftpm/configuration/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc

# Local secrets (API keys)
OpenIapExample/Info.plist
2 changes: 2 additions & 0 deletions packages/apple/Example/Martie.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@
DEVELOPMENT_ASSET_PATHS = "\"OpenIapExample/Preview Content\"";
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = OpenIapExample/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = OpenIAP;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
Expand Down Expand Up @@ -448,6 +449,7 @@
DEVELOPMENT_ASSET_PATHS = "\"OpenIapExample/Preview Content\"";
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = OpenIapExample/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = OpenIAP;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C0E1F5E42C8F1A9400123456"
BuildableName = "OpenIapExample.app"
BlueprintName = "OpenIapExample"
ReferencedContainer = "container:Martie.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C0E1F5E42C8F1A9400123456"
BuildableName = "OpenIapExample.app"
BlueprintName = "OpenIapExample"
ReferencedContainer = "container:Martie.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key = "IAPKIT_API_KEY"
value = "iapkit_f0jyx28mleooxcrrxkmxlh"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C0E1F5E42C8F1A9400123456"
BuildableName = "OpenIapExample.app"
BlueprintName = "OpenIapExample"
ReferencedContainer = "container:Martie.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
8 changes: 8 additions & 0 deletions packages/apple/Example/OpenIapExample/Info.plist.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IAPKIT_API_KEY</key>
<string>YOUR_IAPKIT_API_KEY_HERE</string>
</dict>
</plist>
Loading
Loading