• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Unit Test "runtime information does not match" private framework
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unit Test "runtime information does not match" private framework


  • Subject: Re: Unit Test "runtime information does not match" private framework
  • From: Joar Wingfors <email@hidden>
  • Date: Sun, 14 Jul 2013 01:02:56 -0700

Hi Jerry,

The error message is probably misleading - there are other reasons for why you could fail like this, not related to GC.

Please review your project settings, based on the information in this article:

	<http://developer.apple.com/library/mac/#documentation/developertools/Conceptual/UnitTesting/02-Setting_Up_Unit_Tests_in_a_Project/setting_up.html>

Joar


On 14 jul 2013, at 00:56, Jerry Krinock <email@hidden> wrote:

> Unit tests which I've added to a pre-existing Mac app project crash upon loading with this…
>
> "The test bundle at /Users/jk/Library/Developer/Xcode/DerivedData/MyApp-erjagcrpeurpyadfanfvztysloib/Build/Products/Debug/MyAppTests.octest could not be loaded because its Objective-C runtime information does not match the runtime information required by the test rig.  This is likely because the test rig is being run with Objective-C garbage collection disabled, but the test bundle requires Objective-C garbage collection.  To enable Objective-C garbage collection for the test rig, run it in an environment without the OBJC_DISABLE_GC environment variable."
>
> The app is actually a thin wrapper around a framework, which we'll call MyFramework.  I've read a half dozen articles and forum postings on the topic, in particular one by Todd Huss [1], and tried the three Build settings that Todd lists in there [steps 4-6], but none of them help.  (I set the Bundle Loader to $(BUILT_PRODUCTS_DIR)/MyFramework.framework/MyFramework.)
>
> One thing Todd didn't mention, maybe because it's obvious, is that the Test Bundle target must link, in "Link Binary with Libraries", to MyFramework, or maybe the app.  If I do *not* so link, instead of getting the error above, the test loads OK but, as expected, crashes the first time that a test case attempts to instantiate a testee object in MyFramework.
>
> Trying to understand that long error message, I need but don't have a checklist of that so-called "runtime information", so I can see if they "match".  Taking some wild guesses, both the Test Bundle and MyFramework have the same Build Settings for
>
> • Architecture = Standard 32/64 Intel
> • SDK = Latest Mac OS X (Mac OS X 10.8)
> • Objective-C Automatic Reference Counting = NO  (It's an old project)
>
> And neither uses Garbage Collection.  Looks like there's not even a Build Setting for that any more (Xcode 4.6).  I should file a bug on the "This is likely because … garbage collection" part of that error message.
>
> What other "runtime information" might be relevant?
>
> The "Test Rig" Build Setting in both the Test Bundle target and MyFramework is empty.  Why is it referring to a "test rig"?
>
> Thanks,
>
> Jerry Krinock
>
> [1]  http://twobitlabs.com/2011/06/adding-ocunit-to-an-existing-ios-project-with-xcode-4/
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Unit Test "runtime information does not match" private framework
      • From: Jerry Krinock <email@hidden>
References: 
 >Unit Test "runtime information does not match" private framework (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Unit Test "runtime information does not match" private framework
  • Next by Date: Re: Is there still no way to just compile a single file?
  • Previous by thread: Unit Test "runtime information does not match" private framework
  • Next by thread: Re: Unit Test "runtime information does not match" private framework
  • Index(es):
    • Date
    • Thread