Skip to content

Commit

Permalink
Merge pull request #22 from gumob:release/v3.0.0
Browse files Browse the repository at this point in the history
Release/v3.0.0
  • Loading branch information
gumob authored Aug 26, 2024
2 parents 0f35208 + b78de14 commit 93b56cd
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 68 deletions.
42 changes: 0 additions & 42 deletions Metadata/domain-diagram.svg

This file was deleted.

Binary file added Metadata/domain-diagram.webp
Binary file not shown.
101 changes: 75 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg)](https://github.com/gumob/TLDExtractSwift)
[![Version](http://img.shields.io/cocoapods/v/TLDExtract.svg)](http://cocoadocs.org/docsets/TLDExtract)
[![Platform](http://img.shields.io/cocoapods/p/TLDExtract.svg)](http://cocoadocs.org/docsets/TLDExtract)
[![Build Status](https://travis-ci.com/gumob/TLDExtractSwift.svg?branch=master)](https://travis-ci.com/gumob/TLDExtractSwift)
[![Swift Package Manager compatible](https://img.shields.io/badge/Swift_Package_Manager-compatible-orange)](https://github.com/gumob/TLDExtractSwift)
[![Cocoapods Version](http://img.shields.io/cocoapods/v/TLDExtractSwift.svg)](http://cocoadocs.org/docsets/TLDExtract)
[![Cocoapods Platform](http://img.shields.io/cocoapods/p/TLDExtractSwift.svg)](http://cocoadocs.org/docsets/TLDExtract)
[![Build](https://github.com/gumob/TLDExtractSwift/actions/workflows/main.yml/badge.svg)](https://github.com/gumob/TLDExtractSwift/actions/workflows/main.yml)
[![codecov](https://codecov.io/gh/gumob/TLDExtractSwift/branch/master/graph/badge.svg)](https://codecov.io/gh/gumob/TLDExtractSwift)
![Language](https://img.shields.io/badge/Language-Swift%204.2-orange.svg)
![Language](https://img.shields.io/badge/Language-Swift%205.0-orange.svg)
![Packagist](https://img.shields.io/packagist/l/doctrine/orm.svg)

# TLDExtract
Expand All @@ -13,7 +13,26 @@

Domain names are the unique, human-readable Internet addresses of websites. They are made up of three parts: a top-level domain (a.k.a. TLD), a second-level domain name, and an optional subdomain.

<img src="Metadata/domain-diagram.svg" alt="drawing" width="480" style="width:100%; max-width: 480px;"/>
<img src="Metadata/domain-diagram.webp" alt="drawing" width="100%" style="width:100%; max-width: 100%;"/>

## Changes in 3.0.0

### Breaking changes

- ‼️ Library name changed from ~~`TLDExtract`~~ to **`TLDExtractSwift`** to resolve namespace conflicts. For more details, please check the issue ([apple/swift#56573](https://github.com/apple/swift/issues/56573)).

Please don't forget to update your source code.

```diff
- import TLDExtract
+ import TLDExtractSwift
```

### Other changes
- Dropped support for Swift 4.
- Added watchOS and visionOS to supported platforms.
- Changed supported versions for macOS, iOS, and tvOS to match Xcode 15.4.


## Feature

Expand All @@ -24,23 +43,49 @@ Domain names are the unique, human-readable Internet addresses of websites. They

## Requirements

- iOS 9.3 or later
- macOS 10.12 or later
- tvOS 10.2 or later
- Swift 4.2 or later
- Python 2.7 or Python 3
- macOS 10.13 or later
- iOS 12.0 or later
- tvOS 12.0 or later
- watchOS 4.0 or later
- visionOS 1.0 or later
- Swift 5.0 or later

## Installation

### Swift Package Manager

Add the following to your `Package.swift` file.

- macOS, iOS, tvOS, watchOS, visionOS, and Swift 5
```swift
dependencies: [
.package(url: "https://github.com/gumob/TLDExtractSwift.git", .upToNextMajor(from: "3.0.0"))
]
```

- macOS, iOS, tvOS, and Swift 5
```swift
dependencies: [
.package(url: "https://github.com/gumob/TLDExtractSwift.git", .upToNextMajor(from: "2.1.1"))
]
```

### Carthage

Add the following to your `Cartfile` and follow [these instructions](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application).

```
github "gumob/TLDExtractSwift" # Latest (Swift 5.0)
github "gumob/TLDExtractSwift" ~> 2.0 # Swift 5.0
github "gumob/TLDExtractSwift" ~> 1.0 # Swift 4.2
```
- macOS, iOS, tvOS, watchOS, visionOS, and Swift 5
```
github "gumob/TLDExtractSwift" ~> 3.0
```
- macOS, iOS, tvOS, and Swift 5
```
github "gumob/TLDExtractSwift" ~> 2.0
```
- macOS, iOS, tvOS, and Swift 4
```
github "gumob/TLDExtractSwift" ~> 1.0
```

Do not forget to include Punycode.framework. Otherwise it will fail to build the application.<br/>

Expand All @@ -50,29 +95,33 @@ Do not forget to include Punycode.framework. Otherwise it will fail to build the

To integrate TLDExtract into your project, add the following to your `Podfile`.

```ruby
platform :ios, '9.3'
use_frameworks!

pod 'TLDExtract' # Latest (Swift 5.0)
pod 'TLDExtract', '~> 2.0' # Swift 5.0
pod 'TLDExtract', '~> 1.0' # Swift 4.2
```
- macOS, iOS, tvOS, watchOS, visionOS, and Swift 5.0
```ruby
pod 'TLDExtractSwift', '~> 3.0'
```
- macOS, iOS, tvOS, and Swift 5.0
```ruby
pod 'TLDExtract', '~> 2.0'
```
- macOS, iOS, tvOS, and Swift 4.2
```ruby
pod 'TLDExtract', '~> 1.0'
```

## Usage

### Initialization

Basic initialization code. Exceptions will not be raised unless [the Public Suffix List on the server](https://publicsuffix.org/list/public_suffix_list.dat) is broken.
```swift
import TLDExtract
import TLDExtractSwift

let extractor = try! TLDExtract()
```

A safer initialization code to avoid errors by using the frozen Public Suffix List:<br/>
```swift
import TLDExtract
import TLDExtractSwift

let extractor = try! TLDExtract(useFrozenData: true)
```
Expand Down

0 comments on commit 93b56cd

Please sign in to comment.