Skip to content

Swift 5.0 #29

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

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
150 changes: 150 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@

# Created by https://www.gitignore.io/api/swift
# Edit at https://www.gitignore.io/?templates=swift

### Swift ###
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated
build/
DerivedData/

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/

## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint

## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM

## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
# Package.resolved
.build/

# CocoaPods
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
# Pods/
# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace

# Carthage
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build

# fastlane
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output

# Code Injection
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/

# End of https://www.gitignore.io/api/swift

# Created by https://www.gitignore.io/api/xcode
# Edit at https://www.gitignore.io/?templates=xcode

### Xcode ###
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## User settings
xcuserdata/

## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
*.xcscmblueprint
*.xccheckout

## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
build/
DerivedData/
*.moved-aside
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3

### Xcode Patch ###
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcworkspace/contents.xcworkspacedata
/*.gcno
**/xcshareddata/WorkspaceSettings.xcsettings

# End of https://www.gitignore.io/api/xcode

# Created by https://www.gitignore.io/api/macos
# Edit at https://www.gitignore.io/?templates=macos

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# End of https://www.gitignore.io/api/macos
HCKalmanFilter Sample/Pods
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1
5.0
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
Expand Down Expand Up @@ -211,16 +212,18 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-HCKalmanFilter Sample/Pods-HCKalmanFilter Sample-frameworks.sh",
"${PODS_ROOT}/Target Support Files/Pods-HCKalmanFilter Sample/Pods-HCKalmanFilter Sample-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/ActionSheetPicker-3.0/ActionSheetPicker_3_0.framework",
"${BUILT_PRODUCTS_DIR}/Surge/Surge.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ActionSheetPicker_3_0.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Surge.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-HCKalmanFilter Sample/Pods-HCKalmanFilter Sample-frameworks.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HCKalmanFilter Sample/Pods-HCKalmanFilter Sample-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
4F293BF92006311E4FFE64EE /* [CP] Copy Pods Resources */ = {
Expand All @@ -229,18 +232,20 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-HCKalmanFilter Sample/Pods-HCKalmanFilter Sample-resources.sh",
"${PODS_ROOT}/Target Support Files/Pods-HCKalmanFilter Sample/Pods-HCKalmanFilter Sample-resources.sh",
"${PODS_ROOT}/GoogleMaps/Maps/Frameworks/GoogleMaps.framework/Resources/GoogleMaps.bundle",
"${PODS_ROOT}/GooglePlacePicker/Frameworks/GooglePlacePicker.framework/Resources/GooglePlacePicker.bundle",
"${PODS_ROOT}/GooglePlaces/Frameworks/GooglePlaces.framework/Resources/GooglePlaces.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleMaps.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GooglePlacePicker.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GooglePlaces.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-HCKalmanFilter Sample/Pods-HCKalmanFilter Sample-resources.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HCKalmanFilter Sample/Pods-HCKalmanFilter Sample-resources.sh\"\n";
showEnvVarsInLog = 0;
};
8BC4D75B45633897231A5A76 /* [CP] Check Pods Manifest.lock */ = {
Expand Down Expand Up @@ -346,6 +351,7 @@
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand Down Expand Up @@ -389,6 +395,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
Expand All @@ -405,7 +412,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.hypercubesoft.HCKalmanFilter;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -420,7 +427,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.hypercubesoft.HCKalmanFilter;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
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>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
uuid = "081C7A87-2951-4D4C-9348-A3A7053965D9"
type = "0"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "CBF9210A-9132-40DC-9933-BFFC77A7ADCA"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "HCKalmanFilter Sample/AppDelegate.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "21"
endingLineNumber = "21"
landmarkName = "application(_:didFinishLaunchingWithOptions:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ class MapService: NSObject, CLLocationManagerDelegate
var timePassed: TimeInterval = 0
if myMapService.startTimes.count > 1 {
for i in 0...myMapService.startTimes.count - 2 {
timePassed.add(myMapService.endTimes[i].timeIntervalSince(myMapService.startTimes[i]))
timePassed += myMapService.endTimes[i].timeIntervalSince(myMapService.startTimes[i])
}
}
timePassed.add(Date().timeIntervalSince(myMapService.startTimes.last!))
timePassed += Date().timeIntervalSince(myMapService.startTimes.last!)
return timePassed
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
GMSServices.provideAPIKey("AIzaSyArgh2kxfwFSrCImWYCnCq34NeO2LwFn-8")
GMSPlacesClient.provideAPIKey("AIzaSyArgh2kxfwFSrCImWYCnCq34NeO2LwFn-8")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class ViewController: UIViewController {
AppNotify.removeObserver(self)
}

func locationUpdated()
@objc func locationUpdated()
{
isLocationSet = true

Expand Down
4 changes: 2 additions & 2 deletions HCKalmanFilter Sample/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ target 'HCKalmanFilter Sample' do
pod 'GooglePlaces'
pod 'GooglePlacePicker'

pod 'ActionSheetPicker-3.0', '~> 2.2.0'
pod 'ActionSheetPicker-3.0', '~> 2.5.0'

pod 'Surge', '~> 2.0.0'
pod 'Surge', '~> 2.3'

source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
Expand Down
39 changes: 39 additions & 0 deletions HCKalmanFilter Sample/Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
PODS:
- ActionSheetPicker-3.0 (2.5.0)
- GoogleMaps (3.1.0):
- GoogleMaps/Maps (= 3.1.0)
- GoogleMaps/Base (3.1.0)
- GoogleMaps/Maps (3.1.0):
- GoogleMaps/Base
- GooglePlacePicker (3.1.0):
- GoogleMaps (= 3.1.0)
- GooglePlaces (= 3.1.0)
- GooglePlaces (3.1.0):
- GoogleMaps/Base (= 3.1.0)
- Surge (2.3.0)

DEPENDENCIES:
- ActionSheetPicker-3.0 (~> 2.5.0)
- GoogleMaps
- GooglePlacePicker
- GooglePlaces
- Surge (~> 2.3)

SPEC REPOS:
https://github.com/CocoaPods/Specs.git:
- ActionSheetPicker-3.0
- GoogleMaps
- GooglePlacePicker
- GooglePlaces
- Surge

SPEC CHECKSUMS:
ActionSheetPicker-3.0: 6d79f6f3b98e2b21d218dd65a39f634ff37a27e5
GoogleMaps: 5c13302e6fe6bb6e686b267196586b91cd594225
GooglePlacePicker: fa975116ac202ac29822c0a79758ea1c4db5a95f
GooglePlaces: e874db179f2675c4f3eeda0b686b540273a578b0
Surge: 13979cd9593e943f9ce1202439da2999ea57e46d

PODFILE CHECKSUM: c30d8b3f435689a477bdecd1c94c22181f91534c

COCOAPODS: 1.8.4
4 changes: 2 additions & 2 deletions HCKalmanFilter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ s.source = { :git => "https://github.com/Hypercubesoft/HCKalmanFilter.
s.ios.deployment_target = "9.0"
s.source_files = "HCKalmanFilter/*"

s.dependency 'Surge', '~> 2.0.0'
s.dependency 'Surge', '~> 2.3'

end
end
4 changes: 2 additions & 2 deletions HCKalmanFilter/HCMatrixObject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class HCMatrixObject
{
let result = HCMatrixObject(rows: left.rows, columns: left.columns)

result.matrix = Surge.add(left.matrix, y: right.matrix)
result.matrix = Surge.add(left.matrix, right.matrix)

return result
}
Expand Down Expand Up @@ -214,7 +214,7 @@ class HCMatrixObject
/// - returns: result HCMatrixObject object of multiplication operation
static func *(left:HCMatrixObject, right:HCMatrixObject) -> HCMatrixObject?
{
let resultMatrix = Surge.mul(left.matrix, y: right.matrix)
let resultMatrix = Surge.mul(left.matrix, right.matrix)

let result = HCMatrixObject(rows: resultMatrix.rows,columns: resultMatrix.columns)
result.matrix = resultMatrix
Expand Down