Skip to content

Commit b667c24

Browse files
committed
Migrated to Xcode 7 and Swift 2.0
1 parent b244544 commit b667c24

File tree

7 files changed

+49
-26
lines changed

7 files changed

+49
-26
lines changed

.travis.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
11
language: objective-c
2-
xcode_project: Geometry.xcodeproj
3-
xcode_scheme: Geometry
4-
osx_image: xcode6.4
5-
xcode_sdk: iphonesimulator8.4
2+
osx_image: xcode7
3+
env:
4+
global:
5+
- LC_CTYPE=en_US.UTF-8
6+
- LANG=en_US.UTF-8
7+
matrix:
8+
- DESTINATION="OS=8.1,name=iPhone 4S" SCHEME="Geometry" SDK=iphonesimulator9.0
9+
- DESTINATION="OS=8.2,name=iPhone 5" SCHEME="Geometry" SDK=iphonesimulator9.0
10+
- DESTINATION="OS=8.3,name=iPhone 5S" SCHEME="Geometry" SDK=iphonesimulator9.0
11+
- DESTINATION="OS=8.4,name=iPhone 6" SCHEME="Geometry" SDK=iphonesimulator9.0
12+
- DESTINATION="OS=9.0,name=iPhone 6 Plus" SCHEME="Geometry" SDK=iphonesimulator9.0
13+
script:
14+
- set -o pipefail
15+
- xcodebuild -version
16+
- xcodebuild -project Geometry.xcodeproj -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION"
17+
-configuration Debug ONLY_ACTIVE_ARCH=NO test | xcpretty -c
618
notifications:
719
email: false
820

21+

Geometry.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'Geometry'
3-
s.version = '1.0.0'
3+
s.version = '2.0.0'
44
s.license = 'MIT'
55
s.summary = 'Geometry is a UIView and CGRect extension that lets you work with view and rect geometry easier.'
66
s.homepage = 'https://github.com/artman/Geometry'

Geometry.xcodeproj/project.pbxproj

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
/* End PBXBuildFile section */
1717

1818
/* Begin PBXFileReference section */
19+
7207F69D1BC076E20018256C /* Geometry.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = Geometry.podspec; sourceTree = "<group>"; };
1920
72879CB819BD1F3B0015F977 /* Geometry.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Geometry.framework; sourceTree = BUILT_PRODUCTS_DIR; };
2021
72879CBC19BD1F3B0015F977 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
2122
72879CBD19BD1F3B0015F977 /* Geometry.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Geometry.h; sourceTree = "<group>"; };
@@ -47,13 +48,22 @@
4748
/* End PBXFrameworksBuildPhase section */
4849

4950
/* Begin PBXGroup section */
50-
72879CAE19BD1F3A0015F977 = {
51+
7207F69C1BC076D40018256C /* Frameworks */ = {
5152
isa = PBXGroup;
5253
children = (
5354
72A3F8181B818B02003A946C /* UIKit.framework */,
5455
72A3F8161B818AFD003A946C /* Foundation.framework */,
56+
);
57+
name = Frameworks;
58+
sourceTree = "<group>";
59+
};
60+
72879CAE19BD1F3A0015F977 = {
61+
isa = PBXGroup;
62+
children = (
63+
7207F69D1BC076E20018256C /* Geometry.podspec */,
5564
72879CBA19BD1F3B0015F977 /* Geometry */,
5665
72879CC419BD1F3B0015F977 /* GeometryTests */,
66+
7207F69C1BC076D40018256C /* Frameworks */,
5767
72879CB919BD1F3B0015F977 /* Products */,
5868
);
5969
sourceTree = "<group>";
@@ -157,7 +167,7 @@
157167
72879CAF19BD1F3A0015F977 /* Project object */ = {
158168
isa = PBXProject;
159169
attributes = {
160-
LastUpgradeCheck = 0600;
170+
LastUpgradeCheck = 0700;
161171
ORGANIZATIONNAME = "Tuomas Artman";
162172
TargetAttributes = {
163173
72879CB719BD1F3A0015F977 = {
@@ -245,6 +255,7 @@
245255
COPY_PHASE_STRIP = NO;
246256
CURRENT_PROJECT_VERSION = 1;
247257
ENABLE_STRICT_OBJC_MSGSEND = YES;
258+
ENABLE_TESTABILITY = YES;
248259
GCC_C_LANGUAGE_STANDARD = gnu99;
249260
GCC_DYNAMIC_NO_PIC = NO;
250261
GCC_OPTIMIZATION_LEVEL = 0;
@@ -320,6 +331,7 @@
320331
INFOPLIST_FILE = Geometry/Info.plist;
321332
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
322333
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
334+
PRODUCT_BUNDLE_IDENTIFIER = "artman.fi.$(PRODUCT_NAME:rfc1034identifier)";
323335
PRODUCT_NAME = "$(TARGET_NAME)";
324336
SKIP_INSTALL = YES;
325337
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -337,6 +349,7 @@
337349
INFOPLIST_FILE = Geometry/Info.plist;
338350
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
339351
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
352+
PRODUCT_BUNDLE_IDENTIFIER = "artman.fi.$(PRODUCT_NAME:rfc1034identifier)";
340353
PRODUCT_NAME = "$(TARGET_NAME)";
341354
SKIP_INSTALL = YES;
342355
};
@@ -345,29 +358,23 @@
345358
72879CCF19BD1F3B0015F977 /* Debug */ = {
346359
isa = XCBuildConfiguration;
347360
buildSettings = {
348-
FRAMEWORK_SEARCH_PATHS = (
349-
"$(SDKROOT)/Developer/Library/Frameworks",
350-
"$(inherited)",
351-
);
352361
GCC_PREPROCESSOR_DEFINITIONS = (
353362
"DEBUG=1",
354363
"$(inherited)",
355364
);
356365
INFOPLIST_FILE = GeometryTests/Info.plist;
357366
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
367+
PRODUCT_BUNDLE_IDENTIFIER = "artman.fi.$(PRODUCT_NAME:rfc1034identifier)";
358368
PRODUCT_NAME = "$(TARGET_NAME)";
359369
};
360370
name = Debug;
361371
};
362372
72879CD019BD1F3B0015F977 /* Release */ = {
363373
isa = XCBuildConfiguration;
364374
buildSettings = {
365-
FRAMEWORK_SEARCH_PATHS = (
366-
"$(SDKROOT)/Developer/Library/Frameworks",
367-
"$(inherited)",
368-
);
369375
INFOPLIST_FILE = GeometryTests/Info.plist;
370376
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
377+
PRODUCT_BUNDLE_IDENTIFIER = "artman.fi.$(PRODUCT_NAME:rfc1034identifier)";
371378
PRODUCT_NAME = "$(TARGET_NAME)";
372379
};
373380
name = Release;

Geometry.xcodeproj/xcshareddata/xcschemes/Geometry.xcscheme

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0600"
3+
LastUpgradeVersion = "0700"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -23,10 +23,10 @@
2323
</BuildActionEntries>
2424
</BuildAction>
2525
<TestAction
26+
buildConfiguration = "Debug"
2627
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2728
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
28-
shouldUseLaunchSchemeArgsEnv = "YES"
29-
buildConfiguration = "Debug">
29+
shouldUseLaunchSchemeArgsEnv = "YES">
3030
<Testables>
3131
<TestableReference
3232
skipped = "NO">
@@ -48,15 +48,18 @@
4848
ReferencedContainer = "container:Geometry.xcodeproj">
4949
</BuildableReference>
5050
</MacroExpansion>
51+
<AdditionalOptions>
52+
</AdditionalOptions>
5153
</TestAction>
5254
<LaunchAction
55+
buildConfiguration = "Debug"
5356
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5457
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
5558
launchStyle = "0"
5659
useCustomWorkingDirectory = "NO"
57-
buildConfiguration = "Debug"
5860
ignoresPersistentStateOnLaunch = "NO"
5961
debugDocumentVersioning = "YES"
62+
debugServiceExtension = "internal"
6063
allowLocationSimulation = "YES">
6164
<MacroExpansion>
6265
<BuildableReference
@@ -71,10 +74,10 @@
7174
</AdditionalOptions>
7275
</LaunchAction>
7376
<ProfileAction
77+
buildConfiguration = "Release"
7478
shouldUseLaunchSchemeArgsEnv = "YES"
7579
savedToolIdentifier = ""
7680
useCustomWorkingDirectory = "NO"
77-
buildConfiguration = "Release"
7881
debugDocumentVersioning = "YES">
7982
<MacroExpansion>
8083
<BuildableReference

Geometry/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<key>CFBundleExecutable</key>
88
<string>$(EXECUTABLE_NAME)</string>
99
<key>CFBundleIdentifier</key>
10-
<string>artman.fi.$(PRODUCT_NAME:rfc1034identifier)</string>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
1111
<key>CFBundleInfoDictionaryVersion</key>
1212
<string>6.0</string>
1313
<key>CFBundleName</key>

GeometryTests/GeometryTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class GeometryTests: XCTestCase {
4747
}
4848

4949
func testUIView() {
50-
var view = UIView(frame: "10, 10, 20, 20")
50+
let view = UIView(frame: "10, 10, 20, 20")
5151

5252
view.top += 5
5353
XCTAssertEqual(view.frame, CGRect(x: 10, y: 15, width: 20, height: 20), "Should modified rect correctly")
@@ -87,14 +87,14 @@ class GeometryTests: XCTestCase {
8787
XCTAssertEqual(rect, CGRect(x: 10, y: 20, width: 50, height: 60), "Should have create from string")
8888

8989
let view = UIView(frame: "{{10, 20}, {50, 60}}")
90-
XCTAssertEqual(rect, CGRect(x: 10, y: 20, width: 50, height: 60), "Should have create from string")
90+
XCTAssertEqual(view.frame, CGRect(x: 10, y: 20, width: 50, height: 60), "Should have create from string")
9191
}
9292

9393
func testPointStringConversion() {
94-
var point: CGPoint = "10, 20"
94+
let point: CGPoint = "10, 20"
9595
XCTAssertEqual(point, CGPoint(x: 10, y: 20), "Should have create from string")
9696

97-
var view = UIView(frame: "0, 0, 10, 10");
97+
let view = UIView(frame: "0, 0, 10, 10");
9898
view.center = "10, 10"
9999
XCTAssertEqual(view.frame, CGRect(x: 5, y: 5, width: 10, height: 10), "Should have create from string")
100100
}

GeometryTests/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<key>CFBundleExecutable</key>
88
<string>$(EXECUTABLE_NAME)</string>
99
<key>CFBundleIdentifier</key>
10-
<string>artman.fi.$(PRODUCT_NAME:rfc1034identifier)</string>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
1111
<key>CFBundleInfoDictionaryVersion</key>
1212
<string>6.0</string>
1313
<key>CFBundleName</key>

0 commit comments

Comments
 (0)