Commit 9f5d0168 authored by Soomin Lee's avatar Soomin Lee Committed by Carola Nitz

iOS 7 fix crash on playback

Added a category for iOS 7 to the UINavigationbar that exchanges the
layoutSubViews method with our own to add a missing super method.
Signed-off-by: default avatarCarola Nitz <nitz.carola@googlemail.com>
parent 9629eaa7
......@@ -20,7 +20,7 @@ pod 'VLC-LXReorderableCollectionViewFlowLayout', '0.1.3v'
pod 'VLC-WhiteRaccoon'
pod 'VLC-LiveSDK', '5.7.0x'
pod 'MediaLibraryKit-unstable'
pod 'MobileVLCKit-unstable', '3.0.0a44'
pod 'MobileVLCKit-unstable', '3.0.0a46'
pod 'GTMAppAuth'
pod 'ObjectiveDropboxOfficial', :git => 'git://github.com/carolanitz/dropbox-sdk-obj-c.git' #update ios platform version
end
......@@ -41,7 +41,7 @@ pod 'VLC-LXReorderableCollectionViewFlowLayout', '0.1.3v'
pod 'VLC-WhiteRaccoon'
pod 'VLC-LiveSDK', '5.7.0x'
pod 'MediaLibraryKit-unstable'
pod 'MobileVLCKit-unstable', '3.0.0a44'
pod 'MobileVLCKit-unstable', '3.0.0a46'
pod 'ObjectiveDropboxOfficial', :git => 'git://github.com/carolanitz/dropbox-sdk-obj-c.git' #update ios platform version
pod 'GTMAppAuth'
end
......@@ -78,7 +78,7 @@ pod 'VLC-WhiteRaccoon'
pod 'VLC-LiveSDK', '5.7.0x'
pod 'ObjectiveDropboxOfficial', :git => 'git://github.com/carolanitz/dropbox-sdk-obj-c.git' #update ios platform version
pod 'HockeySDK-tvOS', '~>5.0.0'
pod 'TVVLCKit-unstable', '3.0.0a44'
pod 'TVVLCKit-unstable', '3.0.0a46'
end
......
......@@ -41,7 +41,7 @@ PODS:
- MetaDataFetcherKit (0.1.8):
- AFNetworking (= 3.1.0)
- OROpenSubtitleDownloader
- MobileVLCKit-unstable (3.0.0a44)
- MobileVLCKit-unstable (3.0.0a46)
- NSData+Base64 (1.0.0)
- ObjectiveDropboxOfficial (1.1)
- OBSlider (1.1.0)
......@@ -49,7 +49,7 @@ PODS:
- AFNetworking
- xmlrpc
- RESideMenu (4.0.7)
- TVVLCKit-unstable (3.0.0a44)
- TVVLCKit-unstable (3.0.0a46)
- upnpx (1.4.0)
- VLC-LiveSDK (5.7.0x)
- VLC-LXReorderableCollectionViewFlowLayout (0.1.3v)
......@@ -69,12 +69,12 @@ DEPENDENCIES:
- InAppSettingsKit (from `git://github.com/fkuehne/InAppSettingsKit.git`, commit `415ea6bb`)
- MediaLibraryKit-unstable
- MetaDataFetcherKit (~> 0.1.8)
- MobileVLCKit-unstable (= 3.0.0a44)
- MobileVLCKit-unstable (= 3.0.0a46)
- ObjectiveDropboxOfficial (from `git://github.com/carolanitz/dropbox-sdk-obj-c.git`)
- OBSlider (= 1.1.0)
- OROpenSubtitleDownloader (from `https://github.com/orta/OROpenSubtitleDownloader.git`, commit `0509eac2`)
- RESideMenu (~> 4.0.7)
- TVVLCKit-unstable (= 3.0.0a44)
- TVVLCKit-unstable (= 3.0.0a46)
- upnpx (~> 1.4.0)
- VLC-LiveSDK (= 5.7.0x)
- VLC-LXReorderableCollectionViewFlowLayout (= 0.1.3v)
......@@ -126,13 +126,13 @@ SPEC CHECKSUMS:
InAppSettingsKit: 76d5cfbaa3e3f8aa53fe3628516da7eb1aa6a5cb
MediaLibraryKit-unstable: b4834ad57d5d2f49f30b9edd2d7650d151fc5534
MetaDataFetcherKit: 44c90defa89b3a72cef60e07ad9de37821dd7c5d
MobileVLCKit-unstable: b6269766db34b00ae6ed68ff729e1d9fcf91a412
MobileVLCKit-unstable: 72fe258657832973bc9d38225b377dedac42debe
NSData+Base64: 4e84902c4db907a15673474677e57763ef3903e4
ObjectiveDropboxOfficial: e11cdf40e8965a6c24c6d6ff64905f2df43ab653
OBSlider: 490f108007bfdd5414a38650b211fe403a95b8a0
OROpenSubtitleDownloader: 154b8c08acbf8836b77ac259018dc8b5baef907e
RESideMenu: f24c508404b49c667344c54aba7e590883533958
TVVLCKit-unstable: 79c0183503f362bac3b4ce49b0c62e14f5e59ef8
TVVLCKit-unstable: d2b7e7e8196d578b64f3aa4c874f1dfe4bebb79f
upnpx: c695b99229e08154d23abe5c252cb64f1600f35d
VLC-LiveSDK: c9566a9edde968f969138f84cfd40b540a109b3f
VLC-LXReorderableCollectionViewFlowLayout: 0204946967b746ca183835e854826290be06e2f4
......@@ -140,6 +140,6 @@ SPEC CHECKSUMS:
XKKeychain: 852ef663c56a7194c73d3c68e8d9d4f07b121d4f
xmlrpc: 109bb21d15ed6d108b2c1ac5973a6a223a50f5f4
PODFILE CHECKSUM: 0581a4dd4096cd668a8d1177e72912868f6db6f7
PODFILE CHECKSUM: 59b4a992488968d963c6f5b166897c1e6880c350
COCOAPODS: 1.3.1
/*****************************************************************************
* UINavigationBar+VLC.h
* VLC-iOS
*****************************************************************************
* Copyright (C) 2017 VLC authors and VideoLAN
* $Id$
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import <UIKit/UIKit.h>
@interface UINavigationBar (VLC)
@end
/*****************************************************************************
* UINavigationBar+VLC.m
* VLC-iOS
*****************************************************************************
* Copyright (C) 2017 VLC authors and VideoLAN
* $Id$
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import "UINavigationBar+VLC.h"
#import <objc/runtime.h>
@implementation UINavigationBar (VLC)
+ (void)load {
if (SYSTEM_RUNS_IOS7) {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
Class class = [self class];
SEL originalSelector = @selector(layoutSubviews);
SEL swizzledSelector = @selector(vlc_layoutSubviews);
Method originalMethod = class_getInstanceMethod(class, originalSelector);
Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector);
BOOL didAddMethod =
class_addMethod(class,
originalSelector,
method_getImplementation(swizzledMethod),
method_getTypeEncoding(swizzledMethod));
if (didAddMethod) {
class_replaceMethod(class,
swizzledSelector,
method_getImplementation(originalMethod),
method_getTypeEncoding(originalMethod));
} else {
method_exchangeImplementations(originalMethod, swizzledMethod);
}
});
}
}
- (void)vlc_layoutSubviews
{
[self vlc_layoutSubviews];
[super layoutSubviews];
}
@end
......@@ -773,6 +773,7 @@
7DF90B4B1BE7A8110059C0E3 /* IASKSpecifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DF90B491BE7A8110059C0E3 /* IASKSpecifier.m */; };
7DF9352F1958AB0600E60FD4 /* UIColor+Presets.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DF9352E1958AB0600E60FD4 /* UIColor+Presets.m */; };
7DFFD4071D42436B00A41B0A /* VLCExtensionDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DFFD4061D42436B00A41B0A /* VLCExtensionDelegate.m */; };
8DA8FEBC1FD562E3006D2836 /* UINavigationBar+VLC.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DA8FEBB1FD562E3006D2836 /* UINavigationBar+VLC.m */; };
8F91EC79195CEC7900F5BCBA /* VLCOpenInActivity.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F91EC78195CEC7900F5BCBA /* VLCOpenInActivity.m */; };
8F91EC7F195E1DAB00F5BCBA /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8F91EC7E195E1DAB00F5BCBA /* AssetsLibrary.framework */; };
9B088308183D7BEC004B5C2A /* VLCCloudStorageTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B088307183D7BEC004B5C2A /* VLCCloudStorageTableViewController.m */; };
......@@ -1542,6 +1543,8 @@
8939257D0D04F9AFF766DEA5 /* libPods-VLC-TV.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-VLC-TV.a"; sourceTree = BUILT_PRODUCTS_DIR; };
8B9DD09C453D2346D109D586 /* Pods-VLC-TV.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VLC-TV.debug.xcconfig"; path = "Pods/Target Support Files/Pods-VLC-TV/Pods-VLC-TV.debug.xcconfig"; sourceTree = "<group>"; };
8C707B9BB2C5681D50CC9B99 /* Pods-VLC-tvOS-Debug.distribution.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VLC-tvOS-Debug.distribution.xcconfig"; path = "Pods/Target Support Files/Pods-VLC-tvOS-Debug/Pods-VLC-tvOS-Debug.distribution.xcconfig"; sourceTree = "<group>"; };
8DA8FEBA1FD562E3006D2836 /* UINavigationBar+VLC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UINavigationBar+VLC.h"; sourceTree = "<group>"; };
8DA8FEBB1FD562E3006D2836 /* UINavigationBar+VLC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UINavigationBar+VLC.m"; sourceTree = "<group>"; };
8DEAD87A672248D0A6790405 /* libPods-vlc-ios.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-vlc-ios.a"; sourceTree = BUILT_PRODUCTS_DIR; };
8F91EC77195CEC7900F5BCBA /* VLCOpenInActivity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCOpenInActivity.h; path = Sources/VLCOpenInActivity.h; sourceTree = SOURCE_ROOT; };
8F91EC78195CEC7900F5BCBA /* VLCOpenInActivity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCOpenInActivity.m; path = Sources/VLCOpenInActivity.m; sourceTree = SOURCE_ROOT; };
......@@ -2664,6 +2667,8 @@
DD13A37A1BEE2FAA00A35554 /* VLCMaskView.m */,
DD4089F31BF6556F0022745E /* VLCFullWidthCollectionViewFlowLayout.h */,
DD4089F41BF6556F0022745E /* VLCFullWidthCollectionViewFlowLayout.m */,
8DA8FEBA1FD562E3006D2836 /* UINavigationBar+VLC.h */,
8DA8FEBB1FD562E3006D2836 /* UINavigationBar+VLC.m */,
);
name = "UI Elements";
sourceTree = "<group>";
......@@ -4593,6 +4598,7 @@
7D92897A1877467E009108FD /* VLCFirstStepsFourthPageViewController.m in Sources */,
DD3EFF391BDEBCE500B68579 /* VLCLocalNetworkServiceVLCMedia.m in Sources */,
DD3EFF5D1BDEBCE500B68579 /* VLCLocalServerDiscoveryController.m in Sources */,
8DA8FEBC1FD562E3006D2836 /* UINavigationBar+VLC.m in Sources */,
D6E034ED1CC284FC0037F516 /* VLCStreamingHistoryCell.m in Sources */,
7DC19B0C1868D21800810BF7 /* VLCFirstStepsSixthPageViewController.m in Sources */,
DD3EFEED1BDEBA3800B68579 /* VLCNetworkServerBrowserViewController.m in Sources */,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment