forked from appsquickly/XcodeEditor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathXCFrameworkDefinition.m
More file actions
72 lines (55 loc) · 2.58 KB
/
XCFrameworkDefinition.m
File metadata and controls
72 lines (55 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
////////////////////////////////////////////////////////////////////////////////
//
// JASPER BLUES
// Copyright 2012 Jasper Blues
// All Rights Reserved.
//
// NOTICE: Jasper Blues permits you to use, modify, and distribute this file
// in accordance with the terms of the license agreement accompanying it.
//
////////////////////////////////////////////////////////////////////////////////
#import "XCFrameworkDefinition.h"
#import "XCProject.h"
@implementation XCFrameworkDefinition
@synthesize filePath = _filePath;
@synthesize copyToDestination = _copyToDestination;
@synthesize sourceTree = _sourceTree;
//-------------------------------------------------------------------------------------------
#pragma mark - Class Methods
//-------------------------------------------------------------------------------------------
+ (XCFrameworkDefinition *)frameworkDefinitionWithFilePath:(NSString *)filePath
copyToDestination:(BOOL)copyToDestination
{
return [XCFrameworkDefinition frameworkDefinitionWithFilePath:filePath copyToDestination:copyToDestination sourceTree:SourceTreeGroup];
}
+ (XCFrameworkDefinition *)frameworkDefinitionWithFilePath:(NSString *)filePath
copyToDestination:(BOOL)copyToDestination
sourceTree:(XcodeSourceTreeType)sourceTree
{
return [[XCFrameworkDefinition alloc] initWithFilePath:filePath copyToDestination:copyToDestination sourceTree:sourceTree];
}
//-------------------------------------------------------------------------------------------
#pragma mark - Initialization & Destruction
//-------------------------------------------------------------------------------------------
- (id)initWithFilePath:(NSString *)filePath copyToDestination:(BOOL)copyToDestination
{
return [self initWithFilePath:filePath copyToDestination:copyToDestination sourceTree:SourceTreeGroup];
}
- (id)initWithFilePath:(NSString *)filePath copyToDestination:(BOOL)copyToDestination sourceTree:(XcodeSourceTreeType)sourceTree
{
self = [super init];
if (self) {
_filePath = [filePath copy];
_copyToDestination = copyToDestination;
_sourceTree = sourceTree;
}
return self;
}
//-------------------------------------------------------------------------------------------
#pragma mark - Interface Methods
//-------------------------------------------------------------------------------------------
- (NSString *)fileName
{
return [[_filePath lastPathComponent] stringByReplacingOccurrencesOfString:@"/" withString:@""];
}
@end