When linking the JavaScriptCore framework to the iOS 7 destination, the application links to Frameworks/JavaScriptCore.framework :
otool -L -arch armv7 MyApp MyApp: /System/Library/Frameworks/JavaScriptCore.framework/JavaScriptCore (compatibility version 1.0.0, current version 537.51.2) /System/Library/Frameworks/UIKit.framework/UIKit (compatibility version 1.0.0, current version 2935.137.0) ...
When binding the JavaScriptCore framework with the iOS 6 destination, the application links to PrivateFrameworks/JavaScriptCore.framework :
otool -L -arch armv7 MyApp MyApp: /System/Library/PrivateFrameworks/JavaScriptCore.framework/JavaScriptCore (compatibility version 1.0.0, current version 537.51.2) /System/Library/Frameworks/UIKit.framework/UIKit (compatibility version 1.0.0, current version 2935.137.0) ...
This is because the JavaScriptCore framework has special characters that instruct the linker to change the dylib installation path depending on the target deployment version:
nm JavaScriptCore.framework/JavaScriptCore | grep '\$ld\$' 00000000003959a0 S $ld$install_name$os4.3$/System/Library/PrivateFrameworks/JavaScriptCore.framework/JavaScriptCore 00000000003959a1 S $ld$install_name$os5.0$/System/Library/PrivateFrameworks/JavaScriptCore.framework/JavaScriptCore 00000000003959a2 S $ld$install_name$os5.1$/System/Library/PrivateFrameworks/JavaScriptCore.framework/JavaScriptCore 00000000003959a3 S $ld$install_name$os6.0$/System/Library/PrivateFrameworks/JavaScriptCore.framework/JavaScriptCore 00000000003959a4 S $ld$install_name$os6.1$/System/Library/PrivateFrameworks/JavaScriptCore.framework/JavaScriptCore
Framework JavaScriptCore is available in the PrivateFrameworks directory in iOS 4.3 to 6.1, so the application finds it there when it starts. On iOS 7, PrivateFrameworks/JavaScriptCore.framework is a symbolic link to Frameworks/JavaScriptCore.framework , so the application can run on both iOS 6 and 7.
Although itβs not documented anywhere, it was a clearly deliberate step from Apple to add backward compatibility with the JavaScriptCore framework. But, unfortunately, the App Store review team did not receive any notes from the JavaScriptCore team, and applications that link the JavaScriptCore framework and target iOS below 7 will be rejected because they use the framework in the PrivateFrameworks directory. Please duplicate rdar: // problem / 17076670 if you want Apple to solve this problem.
In the meantime, you can bypass the failure by removing the JavaScriptCore framework from your project and using the following other linker flags instead (adapt undefined for each error)
-Wl,-U,_JSGlobalContextCreate -Wl,-U,_JSGlobalContextRelease
This tells the linker to dynamically resolve characters. Since the JavaScriptCore framework is always indirectly loaded via UIKit β WebKit β JavaScriptCore, the characters will be easily removed at runtime, and your application should not be rejected because it does not explicitly bind the explicit JavaScriptCore structure.