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)

This is impossible.

Could not find the main bundle or the Info.plist is missing a CFBundleIdentifier
 
 
Q