0

I am unable to use the today widget after updating my app through AdHoc build installation. The today widget seems to freeze after the main app is updated.

I have referred to the following links but could not find a solution to it.

Today Extension widget freezes when the main app is updated

Today widget not respond after app update

I am facing similar issue as mentioned in the above two links. I have tried setting the preferredContentSize as below but doesn't seem to solve the issue:

CGSize currentSize = self.preferredContentSize;
currentSize.height = 85.0;
self.preferredContentSize = currentSize;

Issue gets resolved if we restart the phone.

Also please note that I am providing support for iOS 7 to iOS 9.3.5. Application is not iOS 10 compatible.

Please post your comments/suggestions to solve this issue.

Community
  • 1
  • 1
Parth Bhatt
  • 19,381
  • 28
  • 133
  • 216

1 Answers1

0

Change preferredContentSize in this method too:

- (void)widgetActiveDisplayModeDidChange:(NCWidgetDisplayMode)activeDisplayMode withMaximumSize:(CGSize)maxSize

it will look somewhat similar to:

- (void)widgetActiveDisplayModeDidChange:(NCWidgetDisplayMode)activeDisplayMode withMaximumSize:(CGSize)maxSize
{
    if (activeDisplayMode == NCWidgetDisplayModeCompact)
        self.preferredContentSize = maxSize;
    else
    {
        self.preferredContentSize = CGSizeMake(0, 100*myArray.count);
    }
}
Mehul Thakkar
  • 12,440
  • 10
  • 52
  • 81
  • 1
    Thanks for the reply. I am sorry that I forgot to mention in my post, but this happens in the iOS 9.3.5 and I am not yet providing support for iOS 10 in my application. – Parth Bhatt Oct 25 '16 at 08:06