Skip to content

Commit

Permalink
Port to Swift 5
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Usbergo committed May 1, 2019
1 parent 1ef51a5 commit 80e953d
Show file tree
Hide file tree
Showing 17 changed files with 528 additions and 388 deletions.
14 changes: 10 additions & 4 deletions Buffer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@
BF_617388784096 /* TableViewDiffAdapter.swift in Sources */ = {isa = PBXBuildFile; fileRef = FR_697572410803 /* TableViewDiffAdapter.swift */; };
BF_673047461746 /* PrototypeCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = FR_761261387751 /* PrototypeCell.swift */; };
BF_752354068978 /* Buffer.h in Headers */ = {isa = PBXBuildFile; fileRef = FR_759165212399 /* Buffer.h */; settings = {ATTRIBUTES = (Public, ); }; };
BF_760707255053 = {isa = PBXBuildFile; fileRef = FR_629006773661 /* Buffer.framework */; };
BF_774605561720 /* TableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FR_447204625897 /* TableView.swift */; };
BF_831725708981 /* AnyListItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = FR_629117886697 /* AnyListItem.swift */; };
BF_841461687791 = {isa = PBXBuildFile; fileRef = FR_461906688041 /* Buffer.framework */; };
BF_864605773899 /* PrototypeCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = FR_761261387751 /* PrototypeCell.swift */; };
BF_964449486626 /* Buffer.h in Headers */ = {isa = PBXBuildFile; fileRef = FR_759165212399 /* Buffer.h */; settings = {ATTRIBUTES = (Public, ); }; };
/* End PBXBuildFile section */
Expand Down Expand Up @@ -144,11 +142,19 @@
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0930;
TargetAttributes = {
NT_461906688041 = {
LastSwiftMigration = 1020;
};
};
};
buildConfigurationList = CL_479533117965 /* Build configuration list for PBXProject "Buffer" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = G_8448771205358;
projectDirPath = "";
projectRoot = "";
Expand Down Expand Up @@ -247,7 +253,7 @@
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
};
Expand Down Expand Up @@ -336,7 +342,7 @@
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
};
Expand Down
31 changes: 24 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,33 @@

# Buffer [![Swift](https://img.shields.io/badge/swift-4.2-orange.svg?style=flat)](#) [![Platform](https://img.shields.io/badge/platform-iOS|macOS-lightgrey.svg?style=flat)](#) [![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://opensource.org/licenses/MIT)
# Buffer [![Swift](https://img.shields.io/badge/swift-5-orange.svg?style=flat)](#) [![Platform](https://img.shields.io/badge/platform-iOS|macOS-lightgrey.svg?style=flat)](#) [![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://opensource.org/licenses/MIT)

<img src="https://raw.githubusercontent.com/alexdrone/Buffer/master/docs/logo_small.png" width=150 alt="Buffer" align=right />

Swift μ-framework for efficient array diffs, collection observation and data source implementation.

[Swift 2.3 branch here](https://github.com/alexdrone/Buffer/tree/swift_2_3)

[C++11 port here](https://github.com/alexdrone/libbuffer)

### Installion

```bash
cd {PROJECT_ROOT_DIRECTORY}
curl "https://raw.githubusercontent.com/alexdrone/Buffer/master/bin/dist.zip" > dist.zip && unzip dist.zip && rm dist.zip;
```

Drag `Buffer.framework` in your project and add it as an embedded binary.

If you use [xcodegen](https://github.com/yonaskolb/XcodeGen) add the framework to your *project.yml* like so:

```yaml
targets:
YOUR_APP_TARGET:
...
dependencies:
- framework: PATH/TO/YOUR/DEPS/Buffer.framework
```
## Installation with CocoaPods/Carthage (deprecated)
## Installation
If you are using **CocoaPods**:
Expand Down Expand Up @@ -88,10 +105,10 @@ class MyClass: BufferDelegate {

public func buffer(didChangeElementAtIndex buffer: BufferType, index: UInt) {
}

public func buffer(didMoveElement buffer: BufferType, from: UInt, to: UInt) {
}

public func buffer(didChangeAllContent buffer: BufferType) {
}
}
Expand Down Expand Up @@ -139,7 +156,7 @@ class MyClass: UITableViewController {
return cell
}
}

}


Expand Down
Binary file modified bin/dist.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ targets:
INFOPLIST_FILE: src/Info.plist
PRODUCT_BUNDLE_IDENTIFIER: io.alexdrone.buffer
PLATFORM: platform $platform
SWIFT_VERSION: 4.2
SWIFT_VERSION: 5
SWIFT_OPTIMIZATION_LEVEL: -Owholemodule
PLATFORM: platform $platform
GCC_GENERATE_DEBUGGING_SYMBOLS: YES
Expand Down

This file was deleted.

Loading

0 comments on commit 80e953d

Please sign in to comment.