I had a standalone python application (created with pyinstaller) which was working. 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.
I do believe the Swift file (executable) might have its own Info.plist file...I just can't seem to find and change it. Perhaps this is the issue.
Note : All steps on Apple Developer site are done (ex. Creating identifier, secret password etc)