Unit tests with designated AppDelegate crashes on XCode 7

Originator:ashavit3
Number:rdar://22537347 Date Originated:9/2/15
Status:Duplicate Resolved:
Product:XCode 7 Product Version:Beta 6
Classification:Developer Tools Reproducible:
 
Summary:
I perform unit tests on my project with a designated app delegate class, different from my regular app delegate . The UnitTestAppDelegate is not a member of the app target, only of the test target.

In Xcode 6 it is working, the correct delegate is used, But in Xcode 7 (beta 6) the app crashes when trying to load to test delegate. I test using simulators, both iOS 8 and 9.

See more info on http://stackoverflow.com/questions/32349140/unit-tests-with-designated-appdelegate-crashes-on-xcode-7

Steps to Reproduce:
Download repo from https://github.com/ashavit/UnitTests-Different-AppDelegate and run test (cmd+u).
Xcode 7 crashes.
Xcode 6 runs.


Expected Results:
On regular build & run first console line should be: "AppDelegate: didFinishLaunchingWithOptions"
On test build, tests should succeed, and first console line should be: "TestAppDelegate: didFinishLaunchingWithOptions"

Actual Results:
On test build, app crashes on main.m file

Version:
Xcode 7 beta 6

Notes:


Configuration:
Xcode 7

Attachments:

Comments

Engineering has provided the following information regarding this issue:

Engineering has determined that your bug report is a duplicate of another issue and will be closed.

The open or closed status of the original bug report your issue was duplicated to appears in the yellow "Duplicate of 22101460" section of the bug reporter user interface.

https://openradar.appspot.com/22101460


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!