Hello
As you know, Acapela for iPhone 1.201 is fully compatible with iOS 5.
ARC mode (the new memory management system, introduce with iOS 5) is also compatible with our SDK.
However, there is some adaptation needed for using our SDK with ARC mode
AcapelaSetup helper class
This class, available in source code, is written in classic retain/release manual reference counting.
In order to use it with ARC, you could either remove all retain/release in this code + deleting the dealloc function, or compile the file with -fno-objc-arc compiler flag (see http://www.acapela-for-iphone.com/documentation-quick-start-how-to-add-tts-in-your-app – Step 5b)
MyInterruptionListener
In order to have a correct behaviour of MyInteruptionListener, you have to add a small keyword in out TTSDemo sample code and documentation
(Thanks to Non Umemoto, developer of Lisgo app )
In non ARC mode, the implementation listener is implemented like this:
void MyInterruptionListener(void *inClientData, UInt32 inInterruptionState) {
AcapelaSpeech* anAcapelaSpeech = *(AcapelaSpeech**)inClientData;
if (inInterruptionState == kAudioSessionBeginInterruption) {
[anAcapelaSpeech setActive:NO];
status = AudioSessionSetActive(NO);
}
if (inInterruptionState == kAudioSessionEndInterruption) {
status = AudioSessionSetActive(YES);
[anAcapelaSpeech setActive:YES];
}
}
In ARC mode, you have to bridge the inClientData in order to use it:
void MyInterruptionListener(void *inClientData, UInt32 inInterruptionState) {
AcapelaSpeech* anAcapelaSpeech = (__bridge id) (*(void **) inClientData);
if (inInterruptionState == kAudioSessionBeginInterruption) {
[anAcapelaSpeech setActive:NO];
AudioSessionSetActive(NO);
}
if (inInterruptionState == kAudioSessionEndInterruption) {
AudioSessionSetActive(YES);
[anAcapelaSpeech setActive:YES];
}
}
If you have other trick or incompatibilities with ARC, don’t hesitate to tell us.