最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

macos - Could not find the main bundle or the Info.plist is missing a CFBundleIdentifier - Stack Overflow

programmeradmin3浏览0评论

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)

发布评论

评论列表(0)

  1. 暂无评论