Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6473819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:30:43+00:00 2026-05-25T06:30:43+00:00

I have an application that uses a few classes found only in 10.7 Lion.

  • 0

I have an application that uses a few classes found only in 10.7 Lion. (For example, NSFileCoordinator.)

When my application launches, it can use NSFileCoordinator to coordinate read access to the data store. (I save to XML.)

The application launches fine under 10.7 Lion, but when launching under 10.6 Snow Leopard, the application crashes with the error shown below.

My base SDK is set to 10.7, and the deployment target is 10.6. As far as I can tell, all my code is properly wrapped, like:

if (NSClassFromString(@"NSFileCoordinator") != nil) {
  // Do something the 10.7 way
} else {
  // Do something the 10.6 way
}

But for some reason, I’m still seeing the crash. Since the Base SDK is 10.7, I can’t run the application under Xcode in 10.6, making debugging difficult. Additional messages are being logged to the console:

9/1/11 9:48:03 AM   [0x0-0x18018].com.me.myapp[173] dyld: Symbol not found: _OBJC_CLASS_$_NSFileCoordinator
9/1/11 9:48:03 AM   [0x0-0x18018].com.me.myapp[173]   Referenced from: /Volumes/Macintosh HD/Users/Me/Library/Developer/Xcode/DerivedData/Mac-ebdxgdvcqfnptlftkreamrwdxetd/Build/Products/Debug/myapp.app/Contents/MacOS/myapp
9/1/11 9:48:03 AM   [0x0-0x18018].com.me.myapp[173]   Expected in: /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
9/1/11 9:48:03 AM   [0x0-0x18018].com.me.myapp[173]  in /Volumes/Macintosh HD/Users/Me/Library/Developer/Xcode/DerivedData/Mac-ebdxgdvcqfnptlftkreamrwdxetd/Build/Products/Debug/myapp.app/Contents/MacOS/myapp

And the crash report:

Process:         myapp [137]
Path:            /Volumes/Macintosh HD/Users/Me/Library/Developer/Xcode/DerivedData/Mac-ebdxgdvcqfnptlftkreamrwdxetd/Build/Products/Debug/myapp.app/Contents/MacOS/myapp
Identifier:      com.me.myapp
Version:         1.5.0 (150)
Code Type:       X86-64 (Native)
Parent Process:  launchd [92]

Date/Time:       2011-09-01 09:40:32.591 -0400
OS Version:      Mac OS X 10.6.8 (10K549)
Report Version:  6

Interval Since Last Report:          2009 sec
Crashes Since Last Report:           5
Per-App Crashes Since Last Report:   5
Anonymous UUID:                      32784C79-0821-471E-BCBF-BE5874774075

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Crashed Thread:  0

Dyld Error Message:
  Symbol not found: _OBJC_CLASS_$_NSFileCoordinator
  Referenced from: /Volumes/Macintosh HD/Users/Me/Library/Developer/Xcode/DerivedData/Mac-ebdxgdvcqfnptlftkreamrwdxetd/Build/Products/Debug/myapp.app/Contents/MacOS/myapp
  Expected in: /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
 in /Volumes/Macintosh HD/Users/Me/Library/Developer/Xcode/DerivedData/Mac-ebdxgdvcqfnptlftkreamrwdxetd/Build/Products/Debug/myapp.app/Contents/MacOS/myapp
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:30:43+00:00Added an answer on May 25, 2026 at 6:30 am

    @Anomie has the right answer but let me expand on it some more.
    Here is the code of a command line tool that is similar to what you are doing:

    int main (int argc, const char * argv[])
    {
        @autoreleasepool {
            if (NSClassFromString(@"NSFileCoordinator")) {
                NSLog(@"Version >= 10.7");
            } else {
                NSLog(@"Version <  10.7");
            }
        }
    
        return 0;
    }
    

    The only framework that this program links to is Foundation. But in order to weakly link to this framework you must do the following:

    1. Click on the project in the project browser
    2. Go to “Build Phases”
    3. Go to “Link Binary With Libraries” and remove “Foundation.framework”
    4. Go to “Build Settings” and add the following “Other Linker Flags”:

      -weak_framework Foundation

    Rebuild your project. I’ve tested on OS X 10.6 and 10.7 and neither crashed and both produced the expected output. Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Java application that uses a C++ DLL via JNI. A few
I have an application that uses several different Java classes and would like to
I have an application that uses NHibernate as its ORM and sometimes it experiences
I have client application that uses WCF service to insert some data to backend
I have an application that uses the accelerometer. Sometimes, the application will launch without
I have an application that uses window.open() to generate dynamic popups. Unfortunately, I've had
I have an application that uses a cron like job to update a set
We have an application that uses a dual monitor setup - User A will
I have an application that uses DataTables to perform grouping, filtering and aggregation of
I have an application that uses simple sockets to pass some characters between two

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.