Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
# Conflicts:
#	Example/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json
  • Loading branch information
rhummelmose committed May 12, 2016
2 parents 199c807 + b986cc6 commit 1b6f22c
Show file tree
Hide file tree
Showing 133 changed files with 5,706 additions and 2,123 deletions.
7 changes: 7 additions & 0 deletions BluetoothKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,11 @@ Pod::Spec.new do |s|
s.requires_arc = true
s.osx.deployment_target = '10.10'
s.ios.deployment_target = '8.0'
s.tvos.deployment_target = '9.0'
s.tvos.exclude_files = 'Source/BKCBPeripheralManagerDelegateProxy.swift',
'Source/BKPeripheral.swift',
'Source/BKPeripheralConfiguration.swift',
'Source/BKPeripheralStateMachine.swift',
'Source/BKRemoteCentral.swift',
'Source/BKSendDataTask.swift'
end
142 changes: 132 additions & 10 deletions BluetoothKit.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0710"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C64CDDF21BE4C46A00F72549"
BuildableName = "BluetoothKit.framework"
BlueprintName = "BluetoothKit tvOS"
ReferencedContainer = "container:BluetoothKit.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C64CDDF21BE4C46A00F72549"
BuildableName = "BluetoothKit.framework"
BlueprintName = "BluetoothKit tvOS"
ReferencedContainer = "container:BluetoothKit.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C64CDDF21BE4C46A00F72549"
BuildableName = "BluetoothKit.framework"
BlueprintName = "BluetoothKit tvOS"
ReferencedContainer = "container:BluetoothKit.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "2x"
}
],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions Example/Source/View Controllers/CentralViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ internal class CentralViewController: UIViewController, UITableViewDataSource, U
}

internal override func viewWillDisappear(animated: Bool) {
central.interrupScan()
central.interruptScan()
}

deinit {
Expand Down Expand Up @@ -158,7 +158,7 @@ internal class CentralViewController: UIViewController, UITableViewDataSource, U
if availability == .Available {
scan()
} else {
central.interrupScan()
central.interruptScan()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ internal class PeripheralViewController: UIViewController, AvailabilityViewContr

private let peripheral = BKPeripheral()
private let logTextView = UITextView()
private lazy var sendDataBarButtonItem: UIBarButtonItem! = { UIBarButtonItem(title: "Send Data", style: UIBarButtonItemStyle.Plain, target: self, action: "sendData") }()
private lazy var sendDataBarButtonItem: UIBarButtonItem! = { UIBarButtonItem(title: "Send Data", style: UIBarButtonItemStyle.Plain, target: self, action: #selector(PeripheralViewController.sendData)) }()

// MARK: UIViewController Life Cycle

Expand Down Expand Up @@ -87,7 +87,7 @@ internal class PeripheralViewController: UIViewController, AvailabilityViewContr
@objc private func sendData() {
let numberOfBytesToSend: Int = Int(arc4random_uniform(950) + 50)
let data = NSData.dataWithNumberOfBytes(numberOfBytesToSend)
Logger.log("Prepared \(numberOfBytesToSend) bytes with MD5 hash: \(data.md5()!.hexString)")
Logger.log("Prepared \(numberOfBytesToSend) bytes with MD5 hash: \(data.md5().toHexString())")
for remoteCentral in peripheral.connectedRemoteCentrals {
Logger.log("Sending to \(remoteCentral)")
peripheral.sendData(data, toRemoteCentral: remoteCentral) { data, remoteCentral, error in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ internal class RemotePeripheralViewController: UIViewController, BKRemotePeriphe
}

internal func remotePeripheral(remotePeripheral: BKRemotePeripheral, didSendArbitraryData data: NSData) {
Logger.log("Received data of length: \(data.length) with hash: \(data.md5()!.hexString)")
Logger.log("Received data of length: \(data.length) with hash: \(data.md5().toHexString())")
}

// MARK: LoggerDelegate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ internal class RoleSelectionViewController: UIViewController {
for button in buttons {
button.setBackgroundImage(UIImage.imageWithColor(buttonColor), forState: UIControlState.Normal)
button.titleLabel?.font = UIFont.boldSystemFontOfSize(30)
button.addTarget(self, action: "buttonTapped:", forControlEvents: UIControlEvents.TouchUpInside)
button.addTarget(self, action: #selector(RoleSelectionViewController.buttonTapped(_:)), forControlEvents: UIControlEvents.TouchUpInside)
view.addSubview(button)
}
}
Expand Down
1 change: 1 addition & 0 deletions Example/Vendor/CryptoSwift/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
### Xcode ###
.build/
build/
*.pbxuser
!default.pbxuser
Expand Down
11 changes: 11 additions & 0 deletions Example/Vendor/CryptoSwift/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
os:
- linux
- osx
language: generic
sudo: required
dist: trusty
osx_image: xcode7.3
install:
- eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/02090c7ede5a637b76e6df1710e83cd0bbe7dcdf/swiftenv-install.sh)"
script:
- bash <(curl -s https://raw.githubusercontent.com/PlanTeam/Tools/master/CI.sh)
76 changes: 76 additions & 0 deletions Example/Vendor/CryptoSwift/CHANGELOG
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
0.4.1
- fix NoPadding()

0.4
- Padding setup is now part of cipher constructor
- Added PBKDF2 http://tools.ietf.org/html/rfc2898#section-5.2
- Add BlockCipher protocol
- Rename Cipher -> CipherProtocol
- Remove build-frameworks.sh script
- Keep sensitive data in memory with SecureBytes
- Allows direct use of HMAC and Poly1305
- README update
- Fix missing Foundation import on Linux

0.3.1
- replace deprecated Bit with new enum.

0.3
- Swift 2.2 support
- use generators for cipher block modes should reduce memory overload.
- add OFB block mode
- add PCBC block mode
- String.decryptBase64ToString to decrypt Base64 encoded strings
- broke up complicated expressions which were taking ages to compile

0.2.3
- enable bitcode setting for Debug on an Apple TV
- faster compilation times
- improve padding functions

0.2.2
- Fix ChaCha20 cipher
- Replace for(;;) with for-in
- Workaround for "NSString are not yet implicitly convertible to String" on Linux

0.2.1
- Fix linux build
- re-add umbrella header

0.2
- Rabbit cipher (RFC4503)
- Linux Swift support
- Swift Package Manager support
- tvOS support
- Add optional seed to CRC
- Add umbrella header (CryptoSwift.h)
- Fix AES in CTR mode
- Fix no padding support for CTR and CFB block modes
- Fix access to AES.Error and ChaCha20.Error

0.1.1
- Fix Cococapods package (missing Foundation integration)

0.1.0
- Major performance improvements.
- Transition from Optionals to throw error.
- Replace enum Cipher with protocol for ciphers.
- Added CRC16
- Fixed AES CFB decryption
- Drop internal "Foundation" dependency, nonetheless it is supported as usual.

0.0.16
- Critical fix for private "md5" selector issue (#135)

0.0.15
- Fix 32-bit CTR block mode
- Carthage support update
- Mark as App-Extension-Safe API

0.0.14
- hexString -> toHextString() #105
- CTR (Counter mode)
- Hex string is lowercase now
- Carthage support
- Tests update
- Swift 2.0 support - overall update
16 changes: 10 additions & 6 deletions Example/Vendor/CryptoSwift/CryptoSwift.podspec
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
Pod::Spec.new do |s|
s.name = "CryptoSwift"
s.version = "0.0.12"
s.summary = "Cryptography in Swift. SHA, MD5, CRC, Poly1305, HMAC, ChaCha20, AES."
s.description = "Cryptography functions and helpers for Swift implemented in Swift. SHA, MD5, CRC, Poly1305, HMAC, ChaCha20, AES."
s.version = "0.4.1"
s.summary = "Cryptography in Swift. SHA, MD5, CRC, Poly1305, HMAC, ChaCha20, Rabbit, AES."
s.description = "Cryptography functions and helpers for Swift implemented in Swift. SHA, MD5, PBKDF2, CRC, Poly1305, HMAC, ChaCha20, Rabbit, AES."
s.homepage = "https://github.com/krzyzanowskim/CryptoSwift"
s.license = {:type => "Attribution License", :file => "LICENSE"}
s.source = { :git => "https://github.com/krzyzanowskim/CryptoSwift.git", :tag => "#{s.version}" }
s.authors = {'Marcin Krzyżanowski' => 'marcin.krzyzanowski@hakore.com'}
s.authors = {'Marcin Krzyżanowski' => 'marcin@krzyzanowskim.com'}
s.social_media_url = "https://twitter.com/krzyzanowskim"
s.ios.platform = :ios, '8.0'
s.ios.deployment_target = "8.0"
s.osx.platform = :osx, '10.9'
s.osx.deployment_target = "10.9"
s.source_files = "CryptoSwift/*.swift"
s.watchos.platform = :watchos, '2.0'
s.watchos.deployment_target = "2.0"
s.tvos.platform = :tvos, '9.0'
s.tvos.deployment_target = "9.0"
s.source_files = "Sources/CryptoSwift/**/*.swift"
s.requires_arc = true
end
end
Loading

0 comments on commit 1b6f22c

Please sign in to comment.