Skip to content

Commit 9f22e06

Browse files
author
Kazuho Okui
committed
Update Carthage scripts
Support Swift4
1 parent 8a0d964 commit 9f22e06

File tree

7 files changed

+46
-50
lines changed

7 files changed

+46
-50
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "CarthageScripts"]
2+
path = CarthageScripts
3+
url = https://github.com/flinto/CarthageScripts.git

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ before_install:
1111
script: xcodebuild test -scheme RK4Spring_iOS -sdk iphonesimulator -destination 'platform=iOS
1212
Simulator,name=iPhone 7,OS=11.0'
1313
before_deploy:
14-
- ./script/build.sh --no-skip-current
14+
- ./CarthageScripts/build-static-framework.sh
1515
- carthage archive $FRAMEWORK_NAME
1616
deploy:
1717
provider: releases

CarthageScripts

Submodule CarthageScripts added at 5eddecb

RK4SpringDemo.xcodeproj/project.pbxproj

+37-3
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@
199199
6E3BBB531F1E757800894AF1 /* Frameworks */,
200200
6E3BBB541F1E757800894AF1 /* Headers */,
201201
6E3BBB551F1E757800894AF1 /* Resources */,
202+
6EDE4D551F1EA742007374E1 /* Copy framework to Carthage folder */,
202203
);
203204
buildRules = (
204205
);
@@ -217,6 +218,7 @@
217218
6E3BBB651F1E759800894AF1 /* Frameworks */,
218219
6E3BBB661F1E759800894AF1 /* Headers */,
219220
6E3BBB671F1E759800894AF1 /* Resources */,
221+
6EE360371F1EB3E80055A1DB /* Copy framework to Carthage folder */,
220222
);
221223
buildRules = (
222224
);
@@ -276,6 +278,7 @@
276278
TargetAttributes = {
277279
6E3BBB561F1E757800894AF1 = {
278280
CreatedOnToolsVersion = 9.0;
281+
LastSwiftMigration = 0900;
279282
};
280283
6E3BBB681F1E759800894AF1 = {
281284
CreatedOnToolsVersion = 9.0;
@@ -287,7 +290,7 @@
287290
};
288291
6E3C28B51C20A02200CAD137 = {
289292
CreatedOnToolsVersion = 7.2;
290-
LastSwiftMigration = 0800;
293+
LastSwiftMigration = 0900;
291294
};
292295
};
293296
};
@@ -345,6 +348,37 @@
345348
};
346349
/* End PBXResourcesBuildPhase section */
347350

351+
/* Begin PBXShellScriptBuildPhase section */
352+
6EDE4D551F1EA742007374E1 /* Copy framework to Carthage folder */ = {
353+
isa = PBXShellScriptBuildPhase;
354+
buildActionMask = 2147483647;
355+
files = (
356+
);
357+
inputPaths = (
358+
);
359+
name = "Copy framework to Carthage folder";
360+
outputPaths = (
361+
);
362+
runOnlyForDeploymentPostprocessing = 0;
363+
shellPath = /bin/sh;
364+
shellScript = "$SRCROOT/CarthageScripts/copy_framework.sh\n ";
365+
};
366+
6EE360371F1EB3E80055A1DB /* Copy framework to Carthage folder */ = {
367+
isa = PBXShellScriptBuildPhase;
368+
buildActionMask = 2147483647;
369+
files = (
370+
);
371+
inputPaths = (
372+
);
373+
name = "Copy framework to Carthage folder";
374+
outputPaths = (
375+
);
376+
runOnlyForDeploymentPostprocessing = 0;
377+
shellPath = /bin/sh;
378+
shellScript = "$SRCROOT/CarthageScripts/copy_framework.sh\n";
379+
};
380+
/* End PBXShellScriptBuildPhase section */
381+
348382
/* Begin PBXSourcesBuildPhase section */
349383
6E3BBB521F1E757800894AF1 /* Sources */ = {
350384
isa = PBXSourcesBuildPhase;
@@ -728,7 +762,7 @@
728762
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
729763
PRODUCT_BUNDLE_IDENTIFIER = com.flinto.RK4SpringDemo;
730764
PRODUCT_NAME = "$(TARGET_NAME)";
731-
SWIFT_VERSION = 3.0;
765+
SWIFT_VERSION = 4.0;
732766
};
733767
name = Debug;
734768
};
@@ -742,7 +776,7 @@
742776
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
743777
PRODUCT_BUNDLE_IDENTIFIER = com.flinto.RK4SpringDemo;
744778
PRODUCT_NAME = "$(TARGET_NAME)";
745-
SWIFT_VERSION = 3.0;
779+
SWIFT_VERSION = 4.0;
746780
};
747781
name = Release;
748782
};

RK4SpringDemo/ViewController.swift

+4-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//
88

99
import Cocoa
10+
import RK4Spring
1011

1112
class CustomView : NSView {
1213

@@ -16,9 +17,9 @@ class CustomView : NSView {
1617

1718
class ViewController: NSViewController {
1819

19-
dynamic var tension:Double = 950
20-
dynamic var friction:Double = 60
21-
dynamic var velocity:Double = 0
20+
@objc dynamic var tension:Double = 950
21+
@objc dynamic var friction:Double = 60
22+
@objc dynamic var velocity:Double = 0
2223

2324
@IBOutlet weak var customView:CustomView!
2425
var shape:CAShapeLayer!

script/build.sh

-11
This file was deleted.

script/ld.py

-32
This file was deleted.

0 commit comments

Comments
 (0)