Bläddra i källkod

Align IAP product IDs and StoreKit config with App Store Connect.

Use ASC-compliant product ID prefixes, sync Products.storekit with live pricing and metadata, and ignore local secrets in git.

Co-authored-by: Cursor <cursoragent@cursor.com>
Hussain Afzal 2 veckor sedan
förälder
incheckning
7dd5f9c81f

+ 10 - 0
.gitignore

@@ -30,3 +30,13 @@ Pods/
 
 # Carthage
 Carthage/Build/
+
+# Python
+.venv/
+__pycache__/
+*.py[cod]
+
+# Secrets / local config
+.env
+*.p8
+AuthKey_*.p8

+ 38 - 75
Products.storekit

@@ -9,86 +9,49 @@
       }
     ]
   },
-  "identifier" : "F3A1B2C4",
+  "identifier" : "E3FFB231",
   "nonRenewingSubscriptions" : [
 
   ],
   "products" : [
     {
-      "displayPrice" : "99.99",
+      "displayPrice" : "39.99",
       "familyShareable" : false,
-      "internalID" : "6738291001",
+      "internalID" : "6787951379",
       "localizations" : [
         {
-          "description" : "Lifetime access to all premium features.",
-          "displayName" : "Lifetime Premium",
+          "description" : "One-time purchase for permanent premium access.",
+          "displayName" : "Premium Lifetime",
           "locale" : "en_US"
         }
       ],
-      "productID" : "com.printer-app-all-printers.premium.lifetime",
-      "referenceName" : "Lifetime Premium",
+      "productID" : "com.printer_app_all_printers.premium.lifetime",
+      "referenceName" : "Premium Lifetime",
       "type" : "NonConsumable"
     }
   ],
   "settings" : {
+    "_applicationInternalID" : "6785834649",
+    "_askToBuyEnabled" : false,
+    "_billingGracePeriodEnabled" : false,
+    "_billingIssuesEnabled" : false,
+    "_developerTeamID" : "GYWNF5WK4J",
+    "_disableDialogs" : false,
     "_failTransactionsEnabled" : false,
+    "_lastSynchronizedDate" : 805032640.839095,
+    "_locale" : "en_US",
+    "_renewalBillingIssuesEnabled" : false,
+    "_storefront" : "USA",
     "_storeKitErrors" : [
-      {
-        "current" : null,
-        "enabled" : false,
-        "name" : "Load Products"
-      },
-      {
-        "current" : null,
-        "enabled" : false,
-        "name" : "Purchase"
-      },
-      {
-        "current" : null,
-        "enabled" : false,
-        "name" : "Verification"
-      },
-      {
-        "current" : null,
-        "enabled" : false,
-        "name" : "App Store Sync"
-      },
-      {
-        "current" : null,
-        "enabled" : false,
-        "name" : "Subscription Status"
-      },
-      {
-        "current" : null,
-        "enabled" : false,
-        "name" : "App Transaction"
-      },
-      {
-        "current" : null,
-        "enabled" : false,
-        "name" : "Manage Subscriptions Sheet"
-      },
-      {
-        "current" : null,
-        "enabled" : false,
-        "name" : "Refund Request Sheet"
-      },
-      {
-        "current" : null,
-        "enabled" : false,
-        "name" : "Offer Code Redeem Sheet"
-      }
-    ]
+
+    ],
+    "_timeRate" : 0
   },
   "subscriptionGroups" : [
     {
-      "id" : "21502901",
+      "id" : "22212410",
       "localizations" : [
-        {
-          "description" : "Premium subscription for Printer App - All Printers.",
-          "displayName" : "Premium",
-          "locale" : "en_US"
-        }
+
       ],
       "name" : "Premium",
       "subscriptions" : [
@@ -102,19 +65,19 @@
           "displayPrice" : "4.99",
           "familyShareable" : false,
           "groupNumber" : 1,
-          "internalID" : "6738291002",
+          "internalID" : "6787947801",
           "introductoryOffer" : null,
           "localizations" : [
             {
-              "description" : "Monthly access to all premium features.",
-              "displayName" : "Monthly Premium",
+              "description" : "Unlimited scans, OCR, draw & print, and more.",
+              "displayName" : "Premium Monthly",
               "locale" : "en_US"
             }
           ],
-          "productID" : "com.printer-app-all-printers.premium.monthly",
+          "productID" : "com.printer_app_all_printers.premium.monthly",
           "recurringSubscriptionPeriod" : "P1M",
-          "referenceName" : "Monthly Premium",
-          "subscriptionGroupID" : "21502901",
+          "referenceName" : "Premium Monthly",
+          "subscriptionGroupID" : "22212410",
           "type" : "RecurringSubscription",
           "winbackOffers" : [
 
@@ -127,27 +90,27 @@
           "codeOffers" : [
 
           ],
-          "displayPrice" : "29.99",
+          "displayPrice" : "24.99",
           "familyShareable" : false,
-          "groupNumber" : 1,
-          "internalID" : "6738291003",
+          "groupNumber" : 2,
+          "internalID" : "6787948061",
           "introductoryOffer" : {
-            "internalID" : "6738291004",
+            "internalID" : "39BA41E8",
             "numberOfPeriods" : 1,
             "paymentMode" : "free",
-            "subscriptionPeriod" : "P1W"
+            "subscriptionPeriod" : "P3D"
           },
           "localizations" : [
             {
-              "description" : "Yearly access to all premium features with a free trial.",
-              "displayName" : "Yearly Premium",
+              "description" : "Full premium access. Best savings vs monthly.",
+              "displayName" : "Premium Yearly",
               "locale" : "en_US"
             }
           ],
-          "productID" : "com.printer-app-all-printers.premium.yearly",
+          "productID" : "com.printer_app_all_printers.premium.yearly",
           "recurringSubscriptionPeriod" : "P1Y",
-          "referenceName" : "Yearly Premium",
-          "subscriptionGroupID" : "21502901",
+          "referenceName" : "Premium Yearly",
+          "subscriptionGroupID" : "22212410",
           "type" : "RecurringSubscription",
           "winbackOffers" : [
 

+ 11 - 4
smart_printer.xcodeproj/project.pbxproj

@@ -6,9 +6,13 @@
 	objectVersion = 77;
 	objects = {
 
+/* Begin PBXBuildFile section */
+		F87934A62FFBD2470043D1E6 /* Products.storekit in Resources */ = {isa = PBXBuildFile; fileRef = F87934A52FFBD2470043D1E6 /* Products.storekit */; };
+/* End PBXBuildFile section */
+
 /* Begin PBXFileReference section */
 		272FF22A2FD19A2200A87B72 /* Printer App - All Printers.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Printer App - All Printers.app"; sourceTree = BUILT_PRODUCTS_DIR; };
-		272FF22E2FD19A2200A87B72 /* Products.storekit */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = Products.storekit; sourceTree = "<group>"; };
+		F87934A52FFBD2470043D1E6 /* Products.storekit */ = {isa = PBXFileReference; lastKnownFileType = text; path = Products.storekit; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFileSystemSynchronizedRootGroup section */
@@ -33,7 +37,7 @@
 		272FF2212FD19A2200A87B72 = {
 			isa = PBXGroup;
 			children = (
-				272FF22E2FD19A2200A87B72 /* Products.storekit */,
+				F87934A52FFBD2470043D1E6 /* Products.storekit */,
 				272FF22C2FD19A2200A87B72 /* smart_printer */,
 				272FF22B2FD19A2200A87B72 /* Products */,
 			);
@@ -111,6 +115,7 @@
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				F87934A62FFBD2470043D1E6 /* Products.storekit in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -254,6 +259,7 @@
 				CODE_SIGN_STYLE = Automatic;
 				COMBINE_HIDPI_IMAGES = YES;
 				CURRENT_PROJECT_VERSION = 1;
+				DEVELOPMENT_TEAM = GYWNF5WK4J;
 				ENABLE_APP_SANDBOX = YES;
 				ENABLE_USER_SELECTED_FILES = readonly;
 				GENERATE_INFOPLIST_FILE = YES;
@@ -277,7 +283,7 @@
 					"-framework",
 					ImageCaptureCore,
 				);
-				PRODUCT_BUNDLE_IDENTIFIER = com.printer-app-all-printers;
+				PRODUCT_BUNDLE_IDENTIFIER = "com.printer-app-all-printers";
 				PRODUCT_NAME = "Printer App - All Printers";
 				REGISTER_APP_GROUPS = YES;
 				STRING_CATALOG_GENERATE_SYMBOLS = YES;
@@ -298,6 +304,7 @@
 				CODE_SIGN_STYLE = Automatic;
 				COMBINE_HIDPI_IMAGES = YES;
 				CURRENT_PROJECT_VERSION = 1;
+				DEVELOPMENT_TEAM = GYWNF5WK4J;
 				ENABLE_APP_SANDBOX = YES;
 				ENABLE_USER_SELECTED_FILES = readonly;
 				GENERATE_INFOPLIST_FILE = YES;
@@ -321,7 +328,7 @@
 					"-framework",
 					ImageCaptureCore,
 				);
-				PRODUCT_BUNDLE_IDENTIFIER = com.printer-app-all-printers;
+				PRODUCT_BUNDLE_IDENTIFIER = "com.printer-app-all-printers";
 				PRODUCT_NAME = "Printer App - All Printers";
 				REGISTER_APP_GROUPS = YES;
 				STRING_CATALOG_GENERATE_SYMBOLS = YES;

+ 1 - 1
smart_printer.xcodeproj/xcshareddata/xcschemes/Printer App - All Printers.xcscheme

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
    LastUpgradeVersion = "2640"
-   version = "1.7">
+   version = "1.8">
    <BuildAction
       parallelizeBuildables = "YES"
       buildImplicitDependencies = "YES"

+ 5 - 3
smart_printer/AppStoreConfig.swift

@@ -24,9 +24,11 @@ enum AppStoreConfig {
     }
 
     enum ProductID {
-        static let monthly = "\(bundleIdentifier).premium.monthly"
-        static let yearly = "\(bundleIdentifier).premium.yearly"
-        static let lifetime = "\(bundleIdentifier).premium.lifetime"
+        // ASC allows only alphanumeric characters, underscores, and periods.
+        private static let prefix = "com.printer_app_all_printers"
+        static let monthly = "\(prefix).premium.monthly"
+        static let yearly = "\(prefix).premium.yearly"
+        static let lifetime = "\(prefix).premium.lifetime"
 
         static let all: Set<String> = [monthly, yearly, lifetime]
     }