Alfresco / alfresco-ios-app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uploading files after iOS9

frankbolviken opened this issue · comments

We are having issues with file upload after iOS9.
Immediately after the app is uploaded, the app crashes.
This also actually happens when you swipe on a item in the navigator to get the delete button.
Have you experienced something like this?

I can't see that issue myself (see https://youtu.be/XHcX4SUW0CQ) and I haven't heard of any other reports; either from customers or internal users.

Are you performing any steps very differently to my screen capture video? Is this on a particular type of device?

Im uploading a photo from the gallery.
In the code I pasted below is the problem. The previousIndex is nil, and it crashes on getting the previousAttributes. Both on swipe of the row to get the delete button and upload. By adding a check for previousIndex != nil it works to upload. Doesn't crash on the delete button either, but i cannot click it and UI freaks out.

  • (void)setSelectedIndexPathForSwipeToDelete:(NSIndexPath *)selectedIndexPathForSwipeToDelete
    {
    NSIndexPath *previousIndex = _selectedIndexPathForSwipeToDelete;
    _selectedIndexPathForSwipeToDelete = selectedIndexPathForSwipeToDelete;
    //hide the delete button from the previous selected index path
    UICollectionViewCell *previousCell = [self.collectionView cellForItemAtIndexPath:previousIndex];
    BaseLayoutAttributes *previousAttributes = (BaseLayoutAttributes *)[self layoutAttributesForItemAtIndexPath:previousIndex];
    previousAttributes.animated = YES;
    [previousCell applyLayoutAttributes:previousAttributes];
    //show the new delete button
    UICollectionViewCell *cell = [self.collectionView cellForItemAtIndexPath:_selectedIndexPathForSwipeToDelete];
    BaseLayoutAttributes *attributes = (BaseLayoutAttributes *)[self layoutAttributesForItemAtIndexPath:_selectedIndexPathForSwipeToDelete];
    attributes.animated = YES;
    [cell applyLayoutAttributes:attributes];

}

Ah ok, I wasn't aware you were building from HEAD and assumed you were using the App Store app. Coincidentally our internal QA found the same bug today https://issues.alfresco.com/jira/browse/IOS-363 and I have an initial fix in place already; just need to do some more testing tomorrow.

Thanks for the bug report
Mike