Post

Replies

Boosts

Views

Activity

metadata file in .itmsp file (Transporter)
I am attempting to upload an application to the app store. The selected method was using Transporter through terminal commands. In this sense, I keep receiving a metadata error which is as follows : Command (Assume values are filled in) /usr/local/itms/bin/iTMSTransporter -m upload \ -u "MY_EMAIL" \ -p "YOUR_APP_SPECIFIC_PASSWORD" \ -f "/Users/isseyyohannes/Desktop/ALGORA_Performance.itmsp" \ --asc-provider "GL5BCCW69X" -v detailed I receive the following error Package Summary: 1 package(s) were not uploaded because they had problems: /Users/isseyyohannes/Desktop/ALGORA_Performance.itmsp - Error Messages: ERROR ITMS-3000: "Line 9 column 25: element "data_file" incomplete; missing required elements "checksum" and "size" at XPath /package/software_assets/asset/data_file" ERROR ITMS-3000: "Line 12 column 24: element "software_metadata" not allowed here; expected the element end-tag or element "metadata_token" at XPath /package/software_metadata" ERROR ITMS-3000: "Line 13 column 19: element "software" not allowed here; expected the element end-tag or element "game_center", "in_app_purchases", "products", "read_only_info" or "versions" at XPath /package/software_metadata/software" ERROR ITMS-3000: "Line 16 column 28: element "bundle_id" not allowed anywhere; expected element "read_only_value" at XPath /package/software_metadata/software/read_only_info/bundle_id" ERROR ITMS-3000: "Line 17 column 30: element "app_version" not allowed anywhere; expected element "read_only_value" at XPath /package/software_metadata/software/read_only_info/app_version" ERROR ITMS-3000: "Line 18 column 33: element "product_family" not allowed anywhere; expected element "read_only_value" at XPath /package/software_metadata/software/read_only_info/product_family" ERROR ITMS-3000: "Line 19 column 30: element "read_only_info" incomplete; missing required element "read_only_value"" ERROR ITMS-3000: "Line 20 column 20: element "software" incomplete; expected element "software_assets" or "software_metadata"" ERROR ITMS-3000: "Package "null" failed schema validation." [2025-02-19 15:45:07 EST] <main> DBG-X: Returning 1 Essentially just a bunch of warnings about my metadata file which I edited manually to read the following <?xml version="1.0" encoding="UTF-8"?> <package version="software5.10" xmlns="http://apple.com/itunes/importer"> <provider>GL5BCCW69X</provider> <team_id>GL5BCCW69X</team_id> <software_assets> <asset type="bundle"> <data_file> <file_name>ALGORA_Performance.pkg</file_name> <checksum type="sha1">7acb9fcb19eb203bdc6038f88d06a67386900b28</checksum> <size>75619323</size> </data_file> </asset> <software_metadata> <software> <vendor_id>93274081</vendor_id> <read_only_info> <read_only_value key="bundle_id">com.algora.ALGORA-Performance</read_only_value> <read_only_value key="app_version">0.0.0</read_only_value> <read_only_value key="product_family">macOS</read_only_value> </read_only_info> </software> </software_metadata> </software_assets> </package> Last note is that I manually created the metadata.xml file and moved it via local terminal for fear of having to use XCode which I am not familiar with. ANY HELP IS APPRECIATED
1
0
234
1w
StoreKit2 Subscription Verification
My question is simple, I do not have much experience in writing swift code, I am only doing it to create a small executable that I can call from my python application which completes Subcription Management. I was hoping someone with more experience could point out my flaws along with giving me tips on how to verify that the check is working for my applicaiton. Any inight is appreciated, thank you. import Foundation import StoreKit class SubscriptionValidator { static func getReceiptURL() -> URL? { guard let appStoreReceiptURL = Bundle.main.appStoreReceiptURL else { print("No receipt found.") return nil } return appStoreReceiptURL } static func validateReceipt() -> Bool { guard let receiptURL = getReceiptURL(), let receiptData = try? Data(contentsOf: receiptURL) else { print("Could not read receipt.") return false } let receiptString = receiptData.base64EncodedString() let validationResult = sendReceiptToApple(receiptString: receiptString) return validationResult } static func sendReceiptToApple(receiptString: String) -> Bool { let isSandbox = Bundle.main.appStoreReceiptURL?.lastPathComponent == "sandboxReceipt" let urlString = isSandbox ? "https://sandbox.itunes.apple.com/verifyReceipt" : "https://buy.itunes.apple.com/verifyReceipt" let url = URL(string: urlString)! let requestData: [String: Any] = [ "receipt-data": receiptString, "password": "0b7f88907b77443997838c72be52f5fc" ] guard let requestBody = try? JSONSerialization.data(withJSONObject: requestData) else { print("Error creating request body.") return false } var request = URLRequest(url: url) request.httpMethod = "POST" request.httpBody = requestBody request.setValue("application/json", forHTTPHeaderField: "Content-Type") let semaphore = DispatchSemaphore(value: 0) var isValid = false let task = URLSession.shared.dataTask(with: request) { data, response, error in guard let data = data, error == nil, let jsonResponse = try? JSONSerialization.jsonObject(with: data) as? [String: Any], let status = jsonResponse["status"] as? Int else { print("Receipt validation failed.") semaphore.signal() return } if status == 0, let receipt = jsonResponse["receipt"] as? [String: Any], let inApp = receipt["in_app"] as? [[String: Any]] { for purchase in inApp { if let expiresDateMS = purchase["expires_date_ms"] as? String, let expiresDate = Double(expiresDateMS) { let expiryDate = Date(timeIntervalSince1970: expiresDate / 1000.0) if expiryDate > Date() { isValid = true } } } } semaphore.signal() } task.resume() semaphore.wait() return isValid } }
0
0
170
1w
Could not find the main bundle or the Info.plist is missing a CFBundleIdentifier
I had a standalone python application (created with pyinstaller) which was working perfectly alone. This macOS application was created in VS. I later decided to improve the application by implementing some Swift features (Subscription Manager). This required me to write a brief Swift file (Subscription Management) in XCode which the Python file called on. Python Standalone Application Calling Swift : # Function to check if the user has a valid subscription def check_subscription(): subscription_manager_path = "/Users/isseyyohannes/Library/Developer/Xcode/DerivedData/SubscriptionManager2-ezwjnnjruizvamaesqighyoxljmy/Build/Products/Debug/SubscriptionManager2" # Adjust path try: result = subprocess.run([subscription_manager_path], capture_output=True, text=True, check=True) return "VALID_SUBSCRIPTION" in result.stdout # Return True if valid, False otherwise except subprocess.CalledProcessError as e: print(f"Error checking subscription: {e}") return False # Return False if there's an issue However, when I try to run xcrun altool --validate-app ... I get the following error message. The error reads as follows Running altool at path '/Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Frameworks/AppStoreService.framework/Support/altool'... 2025-02-16 11:02:21.089 *** Error: Validation failed for '/Users/isseyyohannes/Desktop/ALGORA Performance.app'. 2025-02-16 11:02:21.089 *** Error: Could not find the main bundle or the Info.plist is missing a CFBundleIdentifier in ‘/Users/isseyyohannes/Desktop/ALGORA Performance.app’. Unable to validate your application. (-21017) { NSLocalizedDescription = "Could not find the main bundle or the Info.plist is missing a CFBundleIdentifier in \U2018/Users/isseyyohannes/Desktop/ALGORA Performance.app\U2019."; NSLocalizedFailureReason = "Unable to validate your application."; I located the Info.plist file which had everything correct (my Bundle ID, etc.) for the python file. I am successfully able to notarize the application, just having issues submitting it. **It is worth noting I currently have a python executable calling on a file written in swift code and created in xcode. I created the python application with the following command on VS. pyinstaller --onefile --noconsole \ --icon="/Users/isseyyohannes/Downloads/E0BWowfbDkzEiEAckjsHAsYMzpdjjttT.icns" \ --codesign-identity "Developer ID Application: Issey Yohannes (GL5BCCW69X)" \ --add-binary="/Users/isseyyohannes/Library/Developer/Xcode/DerivedData/SubscriptionManager2-ezwjnnjruizvamaesqighyoxljmy/Build/Products/Debug/SubscriptionManager2:." \ --osx-bundle-identifier com.algora1 \ /Users/isseyyohannes/Desktop/ALGORA\ Performance.py Note : All steps on Apple Developer site are done (ex. Creating identifier, secret password etc)
1
0
198
1w
Code Signing Python Libraries
I am trying to code sign an application which relies on many python libraries to run. For background knowledge, the .app was created with a —onefile command on Visual Studio. I code signed my application itself using codesign --deep --force --verify --timestamp --sign "Developer ID Application: Issey Yohannes (GL5BCCW69X)" /Users/isseyyohannes/Desktop/Automated\ ALGORA.app However, when I try to run the application the error shows in terminal as follows [PYI-16345:ERROR] Failed to load Python shared library '/var/folders/g9/2zbc7y_97xxbq7bnc301nnyc0000gn/T/_MEI6keRcA/Python': dlopen: dlopen(/var/folders/g9/2zbc7y_97xxbq7bnc301nnyc0000gn/T/_MEI6keRcA/Python, 10): no suitable image found. Did find: /var/folders/g9/2zbc7y_97xxbq7bnc301nnyc0000gn/T/_MEI6keRcA/Python: code signature in (/var/folders/g9/2zbc7y_97xxbq7bnc301nnyc0000gn/T/_MEI6keRcA/Python) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?) /var/folders/g9/2zbc7y_97xxbq7bnc301nnyc0000gn/T/_MEI6keRcA/Python: stat() failed with errno=1 Through some external tools, I was able to narrow the issue as follows Hardened Runtime Restriction: Your application is attempting to load a shared library (Python) at runtime, but the library is either: Not properly signed with the same Team ID as your app. Not marked as a valid platform binary. macOS requires all loaded libraries to comply with its code-signing and runtime security policies. Any insight is much appreciated.
2
0
404
Jan ’25