Test iOS9 SDK using Swift with older SDK version

I faced with a problem during writing test for the ForceTouch. My app is available for iOS8-9. I write @available(iOS 9.0, *) in my develop target and it works fine in iOS8 and its just ignored by compiler. But I catch the exception: Symbol not found: _OBJC_CLASS_$_UIApplicationShortcutItem on test target. I know that macros don't work on Swift.


the compiler ignores too. The question is how to test methods from iOS9 SDK if your app available for older version iOS too?


I had a similar problem.

This fixed it for me, make sure the deployment target is iOS8 also on your Test Target.

Need Your Help

APP Running on IOS 6 crashes in IOS 5

ios objective-c xcode ipad

Hi i have App where it works fine when i run in ios 6 and Above,whereas when i run the same app in IOS 5 and 4.3 the App crashes i get the Following Error.

Crashes when printing a specific string in array swift xcode

ios swift

The app crashes when I try to print a string from an array. So if I type pie in the text field the output should be: