feat(ios): [IAP] Paywall Initial Commit (#13609)

Requires https://github.com/toeverything/AFFiNE/pull/13606 to be merged.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- New Features
- Introduced an in-app Paywall with Pro, AI, and Believer plans, feature
previews, paging dots, and selectable pricing options.
- Added purchase and restore actions, plus a unified, polished UI using
new color/icon resources.

- Documentation
  - Added Swift Code Style Guidelines.

- Chores
- Updated dependencies (including MarkdownView 3.4.2), added new
resource packages, and removed an unused dependency.
  - Raised iOS deployment target to 16.5 and refreshed project settings.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
This commit is contained in:
Lakr
2025-09-19 19:01:46 +08:00
committed by GitHub
parent 1f228382c2
commit 360c9545f4
53 changed files with 1718 additions and 8 deletions
@@ -8,6 +8,10 @@
/* Begin PBXBuildFile section */
2E0DD47B57B994A104B25EED /* Pods_AFFiNE.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF48636D7DB5BEE00770FD9A /* Pods_AFFiNE.framework */; };
5027D4782E7C5FBD00ADD25A /* AffinePaywall in Frameworks */ = {isa = PBXBuildFile; productRef = 5027D4772E7C5FBD00ADD25A /* AffinePaywall */; };
5027D47A2E7C5FC100ADD25A /* AffineResources in Frameworks */ = {isa = PBXBuildFile; productRef = 5027D4792E7C5FC100ADD25A /* AffineResources */; };
5027D47C2E7C5FC400ADD25A /* AffineGraphQL in Frameworks */ = {isa = PBXBuildFile; productRef = 5027D47B2E7C5FC400ADD25A /* AffineGraphQL */; };
5027D4802E7C611900ADD25A /* Tools.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5027D47F2E7C611900ADD25A /* Tools.swift */; };
5075136A2D1924C600AD60C0 /* RootViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 507513692D1924C600AD60C0 /* RootViewController.swift */; };
50802D612D112F8700694021 /* Intelligents in Frameworks */ = {isa = PBXBuildFile; productRef = 50802D602D112F8700694021 /* Intelligents */; settings = {ATTRIBUTES = (Required, ); }; };
50A285D72D112A5E000D5A6D /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = 50A285D62D112A5E000D5A6D /* Localizable.xcstrings */; };
@@ -47,6 +51,8 @@
/* Begin PBXFileReference section */
3256F4410D881A03FE77D092 /* Pods-AFFiNE.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AFFiNE.debug.xcconfig"; path = "Pods/Target Support Files/Pods-AFFiNE/Pods-AFFiNE.debug.xcconfig"; sourceTree = "<group>"; };
5027D4762E7C5FB700ADD25A /* AffinePaywall */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = AffinePaywall; sourceTree = "<group>"; };
5027D47F2E7C611900ADD25A /* Tools.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tools.swift; sourceTree = "<group>"; };
5039CC962D1D42C700874F32 /* AffineGraphQL */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = AffineGraphQL; sourceTree = "<group>"; };
504EC3041FED79650016851F /* AFFiNE.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AFFiNE.app; sourceTree = BUILT_PRODUCTS_DIR; };
507513692D1924C600AD60C0 /* RootViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootViewController.swift; sourceTree = "<group>"; };
@@ -91,7 +97,10 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
5027D47A2E7C5FC100ADD25A /* AffineResources in Frameworks */,
5027D4782E7C5FBD00ADD25A /* AffinePaywall in Frameworks */,
9DFCD1462D27D1D70028C92B /* libaffine_mobile_native.a in Frameworks */,
5027D47C2E7C5FC400ADD25A /* AffineGraphQL in Frameworks */,
50802D612D112F8700694021 /* Intelligents in Frameworks */,
2E0DD47B57B994A104B25EED /* Pods_AFFiNE.framework in Frameworks */,
);
@@ -136,6 +145,7 @@
isa = PBXGroup;
children = (
5039CC962D1D42C700874F32 /* AffineGraphQL */,
5027D4762E7C5FB700ADD25A /* AffinePaywall */,
50CECF1E2E7C1084004487AA /* AffineResources */,
50802D5E2D112F7D00694021 /* Intelligents */,
);
@@ -165,6 +175,7 @@
9D90BE1B2CCB9876006677DB /* AffineViewController.swift */,
50FF428B2D2E77CC0050AA83 /* AffineViewController+AIButton.swift */,
50FF42892D2E757E0050AA83 /* ApplicationBridgedWindowScript.swift */,
5027D47F2E7C611900ADD25A /* Tools.swift */,
9D90BE1D2CCB9876006677DB /* Assets.xcassets */,
9D90BE1E2CCB9876006677DB /* capacitor.config.json */,
9D90BE1F2CCB9876006677DB /* config.xml */,
@@ -340,6 +351,7 @@
50FF428C2D2E77CC0050AA83 /* AffineViewController+AIButton.swift in Sources */,
9D90BE272CCB9876006677DB /* AffineViewController.swift in Sources */,
9D90BE282CCB9876006677DB /* AppDelegate.swift in Sources */,
5027D4802E7C611900ADD25A /* Tools.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -484,7 +496,7 @@
DEVELOPMENT_TEAM = 964G86XT2P;
INFOPLIST_FILE = App/Info.plist;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity";
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
IPHONEOS_DEPLOYMENT_TARGET = 16.5;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@@ -520,7 +532,7 @@
DEVELOPMENT_TEAM = 964G86XT2P;
INFOPLIST_FILE = App/Info.plist;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity";
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
IPHONEOS_DEPLOYMENT_TARGET = 16.5;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@@ -569,6 +581,18 @@
/* End XCConfigurationList section */
/* Begin XCSwiftPackageProductDependency section */
5027D4772E7C5FBD00ADD25A /* AffinePaywall */ = {
isa = XCSwiftPackageProductDependency;
productName = AffinePaywall;
};
5027D4792E7C5FC100ADD25A /* AffineResources */ = {
isa = XCSwiftPackageProductDependency;
productName = AffineResources;
};
5027D47B2E7C5FC400ADD25A /* AffineGraphQL */ = {
isa = XCSwiftPackageProductDependency;
productName = AffineGraphQL;
};
50802D602D112F8700694021 /* Intelligents */ = {
isa = XCSwiftPackageProductDependency;
productName = Intelligents;