Skip to content
Merged
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
4 changes: 2 additions & 2 deletions Examples/Examples.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
5D7A73D3A88005D39142AA01 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
5EE16AC7E6A5C62C32868DDE /* App.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App.swift; sourceTree = "<group>"; };
65ED06BAB6A47DBDBE4B7D43 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
6A4277642C7FCF9F14B33FDC /* SwiftUI-Hooks */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "SwiftUI-Hooks"; path = ..; sourceTree = SOURCE_ROOT; };
68BC43055108D13B0F54B8D4 /* swiftui-hooks */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "swiftui-hooks"; path = ..; sourceTree = SOURCE_ROOT; };
6CD5F67CEEAFE74811B93864 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
803EE7E5F67D8627C8A11060 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
86069121E82E72BAE07609D9 /* BasicUsage.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = BasicUsage.app; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -194,7 +194,7 @@
7E899D0C531F0E3FE49D97BB /* Packages */ = {
isa = PBXGroup;
children = (
6A4277642C7FCF9F14B33FDC /* SwiftUI-Hooks */,
68BC43055108D13B0F54B8D4 /* swiftui-hooks */,
);
name = Packages;
sourceTree = SOURCE_ROOT;
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ test: test-library build-examples
.PHONY: test-library
test-library:
for platform in "$(TEST_PLATFORM_IOS)" "$(TEST_PLATFORM_MACOS)" "$(TEST_PLATFORM_TVOS)" "$(TEST_PLATFORM_WATCHOS)"; do \
xcodebuild test -scheme SwiftUI-Hooks -destination platform="$$platform"; \
xcodebuild test -scheme swiftui-hooks -destination platform="$$platform"; \
done
cd Examples \
&& xcodebuild test -scheme Todo-UITests -destination platform="$(TEST_PLATFORM_IOS)" \
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Foundation
import PackageDescription

let package = Package(
name: "SwiftUI-Hooks",
name: "swiftui-hooks",
platforms: [
.iOS(.v13),
.macOS(.v10_15),
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<h1 align="center">SwiftUI Hooks</h1>
<p align="center">A SwiftUI implementation of <a href="https://reactjs.org/docs/hooks-intro.html">React Hooks</a>.</p>
<p align="center">Enhances reusability of stateful logic and gives state and lifecycle to function view.</p>
<p align="center"><a href="https://ra1028.github.io/SwiftUI-Hooks/documentation/hooks">📔 API Reference</a></p>
<p align="center"><a href="https://ra1028.github.io/swiftui-hooks/documentation/hooks">📔 API Reference</a></p>
<p align="center">
<a href="https://github.com/ra1028/SwiftUI-Hooks/actions"><img alt="test" src="https://github.com/ra1028/SwiftUI-Hooks/workflows/test/badge.svg"></a>
<a href="https://github.com/ra1028/SwiftUI-Hooks/releases/latest"><img alt="release" src="https://img.shields.io/github/v/release/ra1028/SwiftUI-Hooks.svg"/></a>
<a href="https://github.com/ra1028/swiftui-hooks/actions"><img alt="test" src="https://github.com/ra1028/swiftui-hooks/workflows/test/badge.svg"></a>
<a href="https://github.com/ra1028/swiftui-hooks/releases/latest"><img alt="release" src="https://img.shields.io/github/v/release/ra1028/swiftui-hooks.svg"/></a>
<a href="https://developer.apple.com/swift"><img alt="Swift5" src="https://img.shields.io/badge/language-Swift5-orange.svg"></a>
<a href="https://developer.apple.com"><img alt="Platform" src="https://img.shields.io/badge/platform-iOS%20%7C%20macOS%20%7C%20tvOS%20%7C%20watchOS%20%7C-green.svg"></a>
<a href="LICENSE"><img alt="license" src="https://img.shields.io/badge/license-MIT-black.svg"></a>
Expand Down Expand Up @@ -82,28 +82,28 @@ import Hooks
From Xcode menu: `File` > `Swift Packages` > `Add Package Dependency`

```text
https://github.com/ra1028/SwiftUI-Hooks
https://github.com/ra1028/swiftui-hooks
```

#### [Swift Package Manager](https://www.swift.org/package-manager)

In your `Package.swift` file, first add the following to the package `dependencies`:

```swift
.package(url: "https://github.com/ra1028/SwiftUI-Hooks"),
.package(url: "https://github.com/ra1028/swiftui-hooks"),
```

And then, include "Hooks" as a dependency for your target:

```swift
.target(name: "<target>", dependencies: [
.product(name: "Hooks", package: "SwiftUI-Hooks"),
.product(name: "Hooks", package: "swiftui-hooks"),
]),
```

### Documentation

- [API Reference](https://ra1028.github.io/SwiftUI-Hooks/documentation/hooks)
- [API Reference](https://ra1028.github.io/swiftui-hooks/documentation/hooks)
- [Example apps](Examples)

---
Expand Down
2 changes: 1 addition & 1 deletion Sources/Hooks/Hooks.docc/Hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Furthermore, hooks such as useEffect also solve the problem of lack of lifecycle

## Source Code

<https://github.com/ra1028/SwiftUI-Hooks>
<https://github.com/ra1028/swiftui-hooks>

## Topics

Expand Down
2 changes: 1 addition & 1 deletion Tools/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PackageDescription
let package = Package(
name: "Tools",
dependencies: [
.package(name: "SwiftUI-Hooks", path: ".."),
.package(name: "swiftui-hooks", path: ".."),
.package(url: "https://github.com/apple/swift-docc-plugin", exact: "1.0.0"),
.package(url: "https://github.com/apple/swift-format.git", exact: "0.50600.0"),
.package(url: "https://github.com/yonaskolb/XcodeGen.git", exact: "2.28.0"),
Expand Down