0

I am using an application that contains some classes supported on ios7 and cause crashing when launching the app on ios6 So i am trying to find a way to disable these classes(some functions in these classes) when building on ios6 target but still can't find anything useful on the internet. i tired the following link:

How to execute a block of code in IOS7 not in IOS6? but not worked for me and the app still crahed on startup.

Also,

I tried to use the following for the defined classes

#define IS_IOS7 (([[UIDevice currentDevice].systemVersion intValue] > 6)?64:0)
if(IS_IOS7)
{
//classes definition
}

but still without any success and the application continue crashing on launching. Can anyone help me with this issue?

Thank you

Community
  • 1
  • 1
Iphone User
  • 1,930
  • 2
  • 17
  • 26
  • Dear @borrrden ..i tried that link but not worked in my case!! – Iphone User Jun 03 '14 at 07:48
  • Did you check the duplicate of that question as well? – borrrden Jun 03 '14 at 07:51
  • @borrrden, yes it is the first thing i tried because i use that method in all my application, but in the case where the class is not supported by ios6 will not work! – Iphone User Jun 03 '14 at 07:53
  • It most definitely will work, as many others have shown. Perhaps you should make a new question detailing the crash (error messages, etc). – borrrden Jun 03 '14 at 08:01
  • Only thing shown in debug are: dyld: Symbol not found: _AVSpeechUtteranceDefaultSpeechRate Referenced from: /Users/zhf/Library/Application Support/iPhone Simulator/6.1/Applications/4A005E97-6DB5-49A4-B674-967BD553A47A/Broders.app/Broders Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/System/Library/Frameworks/AVFoundation.framework/AVFoundation in /Users/zhf/Library/Application Support/iPhone Simulator/6.1/Applications/4A005E97-6DB5-49A4-B674-967BD553A47A/Broders.app/Broders and the app crash after it – Iphone User Jun 03 '14 at 08:08
  • i have simplified my code to 1 line to test it : if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_6_1) { // Load resources for iOS 6.1 or earlier } else { CGFloat _utteranceRate; _utteranceRate = (AVSpeechUtteranceDefaultSpeechRate + AVSpeechUtteranceMinimumSpeechRate) / 2.0; } If i comment that line the application will work..the above code will crash – Iphone User Jun 03 '14 at 08:16
  • @borrrden Finally after 4 days of searching if found my solution here in case anyone will benefit from my comment http://stackoverflow.com/questions/21102500/use-avspeechsynthesizer-on-ios-7-but-retain-compatibility-for-ios-6 Thank you anw for your corporation:) – Iphone User Jun 03 '14 at 08:32

0 Answers0