Skip to content

Commit 295b34f

Browse files
committed
Merge branch 'develop'
2 parents 4c47001 + af1aedf commit 295b34f

File tree

6 files changed

+412
-0
lines changed

6 files changed

+412
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.DS_Store
22
xcuserdata
3+
xcshareddata

License

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2014 Mathijs Kadijk
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.
22+

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# TypedImages
2+
_Tool to help you use strong typed images in Swift_
3+
4+
## Why use this?
5+
6+
Normally you access your images from the `Images.xcassets` folder with `UIImage(names: "Something")` this sucks because the compiler won't warn you about unexisting images, which means you will get errors at runtime!
7+
8+
With TypedImages we make sure you can do `Images.Something` to get your image, the `Images` class will be automatically update on build. So it's never outdated and you will get compiler errors if you rename or delete an image.
9+
10+
## Usage
11+
12+
After installing TypedImages into your project you can use the name of the `xcassets` folder followed by the name of the image as you named it in the assets folder. If the file is outdated just press build and TypedImages will correct the missing/changed images for you.
13+
14+
## Installation
15+
16+
1. [Download](https://github.com/mac-cain13/TypedImages/releases) a TypedImage release, unzip it and put it into your source root directory
17+
2. In XCode: Click on your project in the file list, choose your target under `TARGETS`, click the `Build Phases` tab and add a `New Run Script Phase` by clicking the little plus icon in the top left
18+
3. Drag the new `Run Script` phase *above* the `Compile Sources` phase, expand it and paste the following script: `"$SRCROOT/TypedImages" "$SRCROOT"`
19+
4. Build your project, in Finder you will now see `*.generated.swift` files along side the `*.xcassets` folders, drag the `*.generated.swift` file into your project
20+
21+
_Optional:_ Add the `*.generated.swift` to your `.gitignore` file to prevent unnecessary conflicts.
22+
23+
## Contribute
24+
25+
Please post any issues, ideas and compliments in the GitHub issue tracker and feel free to submit pull request with fixes and improvements. Keep in mind; a good pull request is small, well explained and should benifit most of the users.
26+
27+
## License
28+
29+
TypedImage is released under MIT License and created by Mathijs Kadijk.

TypedImages.xcodeproj/project.pbxproj

Lines changed: 241 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,241 @@
1+
// !$*UTF8*$!
2+
{
3+
archiveVersion = 1;
4+
classes = {
5+
};
6+
objectVersion = 46;
7+
objects = {
8+
9+
/* Begin PBXBuildFile section */
10+
D5EF81E81A3A174A00A38927 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5EF81E71A3A174A00A38927 /* main.swift */; };
11+
/* End PBXBuildFile section */
12+
13+
/* Begin PBXCopyFilesBuildPhase section */
14+
D5EF81E21A3A174A00A38927 /* CopyFiles */ = {
15+
isa = PBXCopyFilesBuildPhase;
16+
buildActionMask = 2147483647;
17+
dstPath = /usr/share/man/man1/;
18+
dstSubfolderSpec = 0;
19+
files = (
20+
);
21+
runOnlyForDeploymentPostprocessing = 1;
22+
};
23+
/* End PBXCopyFilesBuildPhase section */
24+
25+
/* Begin PBXFileReference section */
26+
D5EF81E41A3A174A00A38927 /* TypedImages */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = TypedImages; sourceTree = BUILT_PRODUCTS_DIR; };
27+
D5EF81E71A3A174A00A38927 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; };
28+
/* End PBXFileReference section */
29+
30+
/* Begin PBXFrameworksBuildPhase section */
31+
D5EF81E11A3A174A00A38927 /* Frameworks */ = {
32+
isa = PBXFrameworksBuildPhase;
33+
buildActionMask = 2147483647;
34+
files = (
35+
);
36+
runOnlyForDeploymentPostprocessing = 0;
37+
};
38+
/* End PBXFrameworksBuildPhase section */
39+
40+
/* Begin PBXGroup section */
41+
D5EF81DB1A3A174A00A38927 = {
42+
isa = PBXGroup;
43+
children = (
44+
D5EF81E61A3A174A00A38927 /* TypedImages */,
45+
D5EF81E51A3A174A00A38927 /* Products */,
46+
);
47+
sourceTree = "<group>";
48+
};
49+
D5EF81E51A3A174A00A38927 /* Products */ = {
50+
isa = PBXGroup;
51+
children = (
52+
D5EF81E41A3A174A00A38927 /* TypedImages */,
53+
);
54+
name = Products;
55+
sourceTree = "<group>";
56+
};
57+
D5EF81E61A3A174A00A38927 /* TypedImages */ = {
58+
isa = PBXGroup;
59+
children = (
60+
D5EF81E71A3A174A00A38927 /* main.swift */,
61+
);
62+
path = TypedImages;
63+
sourceTree = "<group>";
64+
};
65+
/* End PBXGroup section */
66+
67+
/* Begin PBXNativeTarget section */
68+
D5EF81E31A3A174A00A38927 /* TypedImages */ = {
69+
isa = PBXNativeTarget;
70+
buildConfigurationList = D5EF81EB1A3A174A00A38927 /* Build configuration list for PBXNativeTarget "TypedImages" */;
71+
buildPhases = (
72+
D5EF81E01A3A174A00A38927 /* Sources */,
73+
D5EF81E11A3A174A00A38927 /* Frameworks */,
74+
D5EF81E21A3A174A00A38927 /* CopyFiles */,
75+
);
76+
buildRules = (
77+
);
78+
dependencies = (
79+
);
80+
name = TypedImages;
81+
productName = TypedImages;
82+
productReference = D5EF81E41A3A174A00A38927 /* TypedImages */;
83+
productType = "com.apple.product-type.tool";
84+
};
85+
/* End PBXNativeTarget section */
86+
87+
/* Begin PBXProject section */
88+
D5EF81DC1A3A174A00A38927 /* Project object */ = {
89+
isa = PBXProject;
90+
attributes = {
91+
LastUpgradeCheck = 0610;
92+
ORGANIZATIONNAME = "Mathijs Kadijk";
93+
TargetAttributes = {
94+
D5EF81E31A3A174A00A38927 = {
95+
CreatedOnToolsVersion = 6.1.1;
96+
};
97+
};
98+
};
99+
buildConfigurationList = D5EF81DF1A3A174A00A38927 /* Build configuration list for PBXProject "TypedImages" */;
100+
compatibilityVersion = "Xcode 3.2";
101+
developmentRegion = English;
102+
hasScannedForEncodings = 0;
103+
knownRegions = (
104+
en,
105+
);
106+
mainGroup = D5EF81DB1A3A174A00A38927;
107+
productRefGroup = D5EF81E51A3A174A00A38927 /* Products */;
108+
projectDirPath = "";
109+
projectRoot = "";
110+
targets = (
111+
D5EF81E31A3A174A00A38927 /* TypedImages */,
112+
);
113+
};
114+
/* End PBXProject section */
115+
116+
/* Begin PBXSourcesBuildPhase section */
117+
D5EF81E01A3A174A00A38927 /* Sources */ = {
118+
isa = PBXSourcesBuildPhase;
119+
buildActionMask = 2147483647;
120+
files = (
121+
D5EF81E81A3A174A00A38927 /* main.swift in Sources */,
122+
);
123+
runOnlyForDeploymentPostprocessing = 0;
124+
};
125+
/* End PBXSourcesBuildPhase section */
126+
127+
/* Begin XCBuildConfiguration section */
128+
D5EF81E91A3A174A00A38927 /* Debug */ = {
129+
isa = XCBuildConfiguration;
130+
buildSettings = {
131+
ALWAYS_SEARCH_USER_PATHS = NO;
132+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
133+
CLANG_CXX_LIBRARY = "libc++";
134+
CLANG_ENABLE_MODULES = YES;
135+
CLANG_ENABLE_OBJC_ARC = YES;
136+
CLANG_WARN_BOOL_CONVERSION = YES;
137+
CLANG_WARN_CONSTANT_CONVERSION = YES;
138+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
139+
CLANG_WARN_EMPTY_BODY = YES;
140+
CLANG_WARN_ENUM_CONVERSION = YES;
141+
CLANG_WARN_INT_CONVERSION = YES;
142+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
143+
CLANG_WARN_UNREACHABLE_CODE = YES;
144+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
145+
COPY_PHASE_STRIP = NO;
146+
ENABLE_STRICT_OBJC_MSGSEND = YES;
147+
GCC_C_LANGUAGE_STANDARD = gnu99;
148+
GCC_DYNAMIC_NO_PIC = NO;
149+
GCC_OPTIMIZATION_LEVEL = 0;
150+
GCC_PREPROCESSOR_DEFINITIONS = (
151+
"DEBUG=1",
152+
"$(inherited)",
153+
);
154+
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
155+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
156+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
157+
GCC_WARN_UNDECLARED_SELECTOR = YES;
158+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
159+
GCC_WARN_UNUSED_FUNCTION = YES;
160+
GCC_WARN_UNUSED_VARIABLE = YES;
161+
MACOSX_DEPLOYMENT_TARGET = 10.10;
162+
MTL_ENABLE_DEBUG_INFO = YES;
163+
ONLY_ACTIVE_ARCH = YES;
164+
SDKROOT = macosx;
165+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
166+
};
167+
name = Debug;
168+
};
169+
D5EF81EA1A3A174A00A38927 /* Release */ = {
170+
isa = XCBuildConfiguration;
171+
buildSettings = {
172+
ALWAYS_SEARCH_USER_PATHS = NO;
173+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
174+
CLANG_CXX_LIBRARY = "libc++";
175+
CLANG_ENABLE_MODULES = YES;
176+
CLANG_ENABLE_OBJC_ARC = YES;
177+
CLANG_WARN_BOOL_CONVERSION = YES;
178+
CLANG_WARN_CONSTANT_CONVERSION = YES;
179+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
180+
CLANG_WARN_EMPTY_BODY = YES;
181+
CLANG_WARN_ENUM_CONVERSION = YES;
182+
CLANG_WARN_INT_CONVERSION = YES;
183+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
184+
CLANG_WARN_UNREACHABLE_CODE = YES;
185+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
186+
COPY_PHASE_STRIP = YES;
187+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
188+
ENABLE_NS_ASSERTIONS = NO;
189+
ENABLE_STRICT_OBJC_MSGSEND = YES;
190+
GCC_C_LANGUAGE_STANDARD = gnu99;
191+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
192+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
193+
GCC_WARN_UNDECLARED_SELECTOR = YES;
194+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
195+
GCC_WARN_UNUSED_FUNCTION = YES;
196+
GCC_WARN_UNUSED_VARIABLE = YES;
197+
MACOSX_DEPLOYMENT_TARGET = 10.10;
198+
MTL_ENABLE_DEBUG_INFO = NO;
199+
SDKROOT = macosx;
200+
};
201+
name = Release;
202+
};
203+
D5EF81EC1A3A174A00A38927 /* Debug */ = {
204+
isa = XCBuildConfiguration;
205+
buildSettings = {
206+
PRODUCT_NAME = "$(TARGET_NAME)";
207+
};
208+
name = Debug;
209+
};
210+
D5EF81ED1A3A174A00A38927 /* Release */ = {
211+
isa = XCBuildConfiguration;
212+
buildSettings = {
213+
PRODUCT_NAME = "$(TARGET_NAME)";
214+
};
215+
name = Release;
216+
};
217+
/* End XCBuildConfiguration section */
218+
219+
/* Begin XCConfigurationList section */
220+
D5EF81DF1A3A174A00A38927 /* Build configuration list for PBXProject "TypedImages" */ = {
221+
isa = XCConfigurationList;
222+
buildConfigurations = (
223+
D5EF81E91A3A174A00A38927 /* Debug */,
224+
D5EF81EA1A3A174A00A38927 /* Release */,
225+
);
226+
defaultConfigurationIsVisible = 0;
227+
defaultConfigurationName = Release;
228+
};
229+
D5EF81EB1A3A174A00A38927 /* Build configuration list for PBXNativeTarget "TypedImages" */ = {
230+
isa = XCConfigurationList;
231+
buildConfigurations = (
232+
D5EF81EC1A3A174A00A38927 /* Debug */,
233+
D5EF81ED1A3A174A00A38927 /* Release */,
234+
);
235+
defaultConfigurationIsVisible = 0;
236+
defaultConfigurationName = Release;
237+
};
238+
/* End XCConfigurationList section */
239+
};
240+
rootObject = D5EF81DC1A3A174A00A38927 /* Project object */;
241+
}

TypedImages.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)