Improve ConfigurationUtilityKit Framework loading
Summary: Adds explicit dependency on the `ConfigurationProfile` Framework. Reviewed By: mmmulani Differential Revision: D3339823 fbshipit-source-id: e1580d4f64e80ada777268988b2318325792718f
This commit is contained in:
Родитель
64cdba0a06
Коммит
5d2b911358
|
@ -84,7 +84,12 @@
|
|||
|
||||
+ (instancetype)ConfigurationUtilityKit
|
||||
{
|
||||
return [FBWeakFramework appleConfigurationFrameworkWithRelativePath:@"Contents/Frameworks/ConfigurationUtilityKit.framework" requiredClassNames:@[@"MDKMobileDevice"]];
|
||||
return [FBWeakFramework
|
||||
appleConfigurationFrameworkWithRelativePath:@"Contents/Frameworks/ConfigurationUtilityKit.framework"
|
||||
requiredClassNames:@[@"MDKMobileDevice"]
|
||||
requiredFrameworks:@[
|
||||
FBWeakFramework.ConfigurationProfile,
|
||||
]];
|
||||
}
|
||||
|
||||
+ (instancetype)ConfigurationProfile
|
||||
|
@ -94,7 +99,7 @@
|
|||
|
||||
+ (instancetype)MobileDevice
|
||||
{
|
||||
return [FBWeakFramework appleConfigurationFrameworkWithRelativePath:@"/System/Library/PrivateFrameworks/MobileDevice.framework" requiredClassNames:@[]];
|
||||
return [FBWeakFramework frameworkWithPath:@"/System/Library/PrivateFrameworks/MobileDevice.framework" requiredClassNames:@[]];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -46,7 +46,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
+ (instancetype)xcodeFrameworkWithRelativePath:(NSString *)relativePath requiredClassNames:(NSArray<NSString *> *)requiredClassNames requiredFrameworks:(NSArray<FBWeakFramework *> *)requiredFrameworks;
|
||||
|
||||
/**
|
||||
Creates and returns FBWeakFramework relative to the 'Apple Configuration' App with the given relativePath, list of checked class names and list of pre-loaded frameworks.
|
||||
Creates and returns FBWeakFramework relative to the 'Apple Configuration' App with the given relativePath, list of checked class names.
|
||||
|
||||
@param relativePath Developer Directory relative path to the framework.
|
||||
@param requiredClassNames list of class names used to determin if framework load was successful
|
||||
|
@ -54,6 +54,16 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
*/
|
||||
+ (instancetype)appleConfigurationFrameworkWithRelativePath:(NSString *)relativePath requiredClassNames:(NSArray<NSString *> *)requiredClassNames;
|
||||
|
||||
/**
|
||||
Creates and returns FBWeakFramework relative to the 'Apple Configuration' App with the given relativePath, list of checked class names and list of pre-loaded frameworks.
|
||||
|
||||
@param relativePath Developer Directory relative path to the framework.
|
||||
@param requiredClassNames list of class names used to determin if framework load was successful
|
||||
@param requiredFrameworks list of frameworks, that should be loaded before this framework loads
|
||||
@return a Weak Framework with given relativePath, list of checked class names and list of pre-loaded frameworks
|
||||
*/
|
||||
+ (instancetype)appleConfigurationFrameworkWithRelativePath:(NSString *)relativePath requiredClassNames:(NSArray<NSString *> *)requiredClassNames requiredFrameworks:(NSArray<FBWeakFramework *> *)requiredFrameworks;
|
||||
|
||||
/**
|
||||
Creates and returns FBWeakFramework with the provided absolute path
|
||||
|
||||
|
|
|
@ -60,13 +60,18 @@
|
|||
}
|
||||
|
||||
+ (instancetype)appleConfigurationFrameworkWithRelativePath:(NSString *)relativePath requiredClassNames:(NSArray<NSString *> *)requiredClassNames
|
||||
{
|
||||
return [self appleConfigurationFrameworkWithRelativePath:relativePath requiredClassNames:requiredClassNames requiredFrameworks:@[]];
|
||||
}
|
||||
|
||||
+ (instancetype)appleConfigurationFrameworkWithRelativePath:(NSString *)relativePath requiredClassNames:(NSArray<NSString *> *)requiredClassNames requiredFrameworks:(NSArray<FBWeakFramework *> *)requiredFrameworks
|
||||
{
|
||||
return [[FBWeakFramework alloc]
|
||||
initWithBasePath:FBControlCoreGlobalConfiguration.appleConfiguratorApplicationPath
|
||||
relativePath:relativePath
|
||||
fallbackDirectories:@[]
|
||||
requiredClassNames:@[]
|
||||
requiredFrameworks:@[]];
|
||||
requiredClassNames:requiredClassNames
|
||||
requiredFrameworks:requiredFrameworks];
|
||||
}
|
||||
|
||||
+ (instancetype)frameworkWithPath:(NSString *)absolutePath requiredClassNames:(NSArray<NSString *> *)requiredClassNames
|
||||
|
@ -91,7 +96,7 @@
|
|||
_fallbackDirectories = fallbackDirectories;
|
||||
_requiredClassNames = requiredClassNames;
|
||||
_requiredFrameworks = requiredFrameworks;
|
||||
_name = relativePath.lastPathComponent.stringByDeletingPathExtension;
|
||||
_name = [basePath stringByAppendingPathComponent:relativePath].lastPathComponent.stringByDeletingPathExtension;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
@ -258,8 +263,9 @@
|
|||
- (NSString *)debugDescription
|
||||
{
|
||||
return [NSString stringWithFormat:
|
||||
@"Name %@ | relativePath %@ | required classes %@ | required frameworks [%@]",
|
||||
@"Name %@ | Base Path %@ | Relative Path %@ | Required Classes %@ | Required Frameworks [%@]",
|
||||
self.name,
|
||||
self.basePath,
|
||||
self.relativePath,
|
||||
self.requiredClassNames,
|
||||
self.requiredFrameworks
|
||||
|
|
Загрузка…
Ссылка в новой задаче