iOS errors


#1

I am getting a couple of errors on iOS:

1.

On app startup, a breakpoint on Juce Message Thread at line 497 of juce_ios_Audio.cpp:

            AudioUnitSetProperty (audioUnit, kAudioUnitProperty_AudioChannelLayout, kAudioUnitScope_Output, 0, &layout, sizeof (layout));

Looks like a duplicate from the previous line?

 

2.

On touch interactions in a Juce view - in juce_ios_UIViewComponentPeer.mm:

[UITouch maximumPossibleForce]: unrecognized selector sent to instance

       #if defined (__IPHONE_9_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_9_0
        if (touch.maximumPossibleForce > 0)   // <-- breakpoint here
            // NB: other devices return 0 or 1.0 if pressure is unknown, so we'll clip our value to a believable range:
            pressure = jlimit (0.0001f, 0.9999f, (float) (touch.force / touch.maximumPossibleForce));
       #endif

Note: I have deploment target to iOS 7.0

(I have set breakpoints on all Objective-C and C++ errors and also malloc errors)


#2

Can't see anything wrong with the AudioUnitSetProperty call... Yes, it's almost the same as the other line, but it's setting the layout for the output, which is deliberate. When you say a breakpoint, what do you mean? An assertion somewhere inside the actual Apple SDK code?

Thanks for the heads-up on the other one - I think it should still work OK if you ignore the warning, but I'll add some code to avoid calling it on older devices.


#3

Thanks Jules - I'm not honestly sure where the first one comes from, need to investigate a bit more, but it seems ok to ignore it i.e. the app still loads fine without xcode attached. 

The second issue seems to crash the app when xcode not attached (on an iOS 7.1 device), thanks for looking into it.