Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kellyroach/swift4 #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Convert to Swift 4, 'pod update', fix compile issues
kellyroach committed Aug 28, 2018
commit efdcc215d6b2a8465f65948c0b2a22a8837819de
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -2,13 +2,13 @@
# * http://www.objc.io/issue-6/travis-ci.html
# * https://github.com/supermarin/xcpretty#usage

osx_image: xcode7.3
osx_image: xcode9.4
language: objective-c
# cache: cocoapods
# podfile: Example/Podfile
# before_install:
# - gem install cocoapods # Since Travis is not always on latest version
# - pod install --project-directory=Example
script:
- set -o pipefail && xcodebuild test -workspace Example/MLKit.xcworkspace -scheme MLKit-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty
- set -o pipefail && xcodebuild test -workspace Example/MLKit.xcworkspace -scheme MLKit-Example -sdk iphonesimulator11.4 ONLY_ACTIVE_ARCH=NO | xcpretty
- pod lib lint
232 changes: 109 additions & 123 deletions Example/MLKit.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0820"
LastUpgradeVersion = "0940"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
14 changes: 7 additions & 7 deletions Example/MLKit/GameScene.swift
Original file line number Diff line number Diff line change
@@ -310,10 +310,10 @@ class GameScene: SKScene, SKPhysicsContactDelegate {

if bird.fitness >= 9.0 {
print("FOUND RARE BIRD")
print(bird.brain?.layers[0].weights)
print(bird.brain?.layers[1].weights)
print(bird.brain?.layers[0].bias)
print(bird.brain?.layers[1].bias)
print(bird.brain?.layers[0].weights as Any)
print(bird.brain?.layers[1].weights as Any)
print(bird.brain?.layers[0].bias as Any)
print(bird.brain?.layers[1].bias as Any)
}
}

@@ -396,7 +396,7 @@ class GameScene: SKScene, SKPhysicsContactDelegate {
if generation.count > currentFlappy {
currentBird = generation[currentFlappy]
} else {
if let bestBird = maxBird {
if maxBird != nil {
currentBird = maxBird
}
}
@@ -549,7 +549,7 @@ class GameScene: SKScene, SKPhysicsContactDelegate {
moving.speed = 0

bird.physicsBody?.collisionBitMask = worldCategory
bird.run( SKAction.rotate(byAngle: CGFloat(M_PI) * CGFloat(bird.position.y) * 0.01, duration:1), completion: {self.bird.speed = 0 })
bird.run( SKAction.rotate(byAngle: CGFloat.pi * CGFloat(bird.position.y) * 0.01, duration:1), completion: {self.bird.speed = 0 })

// Flash background if contact is detected
self.removeAction(forKey: "flash")
@@ -587,7 +587,7 @@ class GameScene: SKScene, SKPhysicsContactDelegate {
moving.speed = 0

bird.physicsBody?.collisionBitMask = worldCategory
bird.run( SKAction.rotate(byAngle: CGFloat(M_PI) * CGFloat(bird.position.y) * 0.01, duration:1), completion: {self.bird.speed = 0 })
bird.run( SKAction.rotate(byAngle: CGFloat.pi * CGFloat(bird.position.y) * 0.01, duration:1), completion: {self.bird.speed = 0 })

// Flash background if contact is detected
self.removeAction(forKey: "flash")
Original file line number Diff line number Diff line change
@@ -39,6 +39,11 @@
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
2 changes: 1 addition & 1 deletion Example/Podfile
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ target 'MLKit_Example' do
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0'
config.build_settings['SWIFT_VERSION'] = '4.0'
end
end
end
28 changes: 17 additions & 11 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
PODS:
- MachineLearningKit (0.1.7):
- MachineLearningKit (0.1.8):
- Upsurge
- Nimble (6.0.1)
- Quick (1.1.0)
- Upsurge (0.8.0)
- Nimble (7.1.3)
- Quick (1.3.1)
- Upsurge (0.10.2)

DEPENDENCIES:
- MachineLearningKit (from `../`)
- Nimble
- Quick
- Upsurge

SPEC REPOS:
https://github.com/cocoapods/specs.git:
- Nimble
- Quick
- Upsurge

EXTERNAL SOURCES:
MachineLearningKit:
:path: ../
:path: "../"

SPEC CHECKSUMS:
MachineLearningKit: 040457b6d6afce606454c16008b954f3952a0d32
Nimble: 1527fd1bd2b4cf0636251a36bc8ab37e81da8347
Quick: dafc587e21eed9f4cab3249b9f9015b0b7a7f71d
Upsurge: 614412863a3b5470b31636a004654b6ef3a34f47
MachineLearningKit: 24cf37aed754e3fab2b5c0c823e3e82a0063f905
Nimble: 2839b01d1b31f6a6a7777a221f0d91cf52e8e27b
Quick: d17304d58d0d169dd0bd1c6e5c28e3318de32a1a
Upsurge: 5866beadc3da27f91c5df4ac795deb3f3238d678

PODFILE CHECKSUM: 6efa57e13fa4fabb331b61a3a84a43c047bb3113
PODFILE CHECKSUM: 6f086d02cdc4ed10abc56279cba6e00448c35830

COCOAPODS: 1.2.0
COCOAPODS: 1.5.3
33 changes: 0 additions & 33 deletions Example/Pods/Local Podspecs/MLKit.podspec.json

This file was deleted.

4 changes: 2 additions & 2 deletions Example/Pods/Local Podspecs/MachineLearningKit.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 17 additions & 11 deletions Example/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

733 changes: 527 additions & 206 deletions Example/Pods/Nimble/README.md

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

146 changes: 101 additions & 45 deletions Example/Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift
40 changes: 29 additions & 11 deletions Example/Pods/Nimble/Sources/Nimble/DSL+Wait.swift
2 changes: 1 addition & 1 deletion Example/Pods/Nimble/Sources/Nimble/DSL.swift
71 changes: 66 additions & 5 deletions Example/Pods/Nimble/Sources/Nimble/Expectation.swift
262 changes: 262 additions & 0 deletions Example/Pods/Nimble/Sources/Nimble/ExpectationMessage.swift
13 changes: 11 additions & 2 deletions Example/Pods/Nimble/Sources/Nimble/Expression.swift
31 changes: 29 additions & 2 deletions Example/Pods/Nimble/Sources/Nimble/FailureMessage.swift
125 changes: 76 additions & 49 deletions Example/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift
105 changes: 100 additions & 5 deletions Example/Pods/Nimble/Sources/Nimble/Matchers/AsyncMatcherWrapper.swift
64 changes: 42 additions & 22 deletions Example/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift
56 changes: 31 additions & 25 deletions Example/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift
56 changes: 30 additions & 26 deletions Example/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift
72 changes: 38 additions & 34 deletions Example/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift
25 changes: 13 additions & 12 deletions Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift
25 changes: 16 additions & 9 deletions Example/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift
16 changes: 8 additions & 8 deletions Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift
54 changes: 24 additions & 30 deletions Example/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift
11 changes: 5 additions & 6 deletions Example/Pods/Nimble/Sources/Nimble/Matchers/BeNil.swift
7 changes: 3 additions & 4 deletions Example/Pods/Nimble/Sources/Nimble/Matchers/BeVoid.swift
37 changes: 17 additions & 20 deletions Example/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift
37 changes: 19 additions & 18 deletions Example/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift
24 changes: 12 additions & 12 deletions Example/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift
139 changes: 89 additions & 50 deletions Example/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift
16 changes: 9 additions & 7 deletions Example/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift
19 changes: 9 additions & 10 deletions Example/Pods/Nimble/Sources/Nimble/Matchers/Match.swift
50 changes: 41 additions & 9 deletions Example/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift
22 changes: 19 additions & 3 deletions Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherFunc.swift
77 changes: 39 additions & 38 deletions Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift
46 changes: 36 additions & 10 deletions Example/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift
348 changes: 348 additions & 0 deletions Example/Pods/Nimble/Sources/Nimble/Matchers/Predicate.swift
43 changes: 29 additions & 14 deletions Example/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift
101 changes: 101 additions & 0 deletions Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAllOf.swift
107 changes: 77 additions & 30 deletions Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift
Loading