Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
DEVELOPER_DIR: /Applications/Xcode_26.0.1.app/Contents/Developer
strategy:
matrix:
mode: [tests, framework, life-without-cocoapods, carthage, examples-pt1, examples-pt2, examples-pt3, examples-pt4]
mode: [tests, framework, life-without-cocoapods, carthage, spm-smoke-tests, examples-pt1, examples-pt2, examples-pt3, examples-pt4]
include:
- mode: tests
name: Build and run tests
Expand All @@ -18,6 +18,8 @@ jobs:
name: Build Texture as a static library
- mode: carthage
name: Verify that Carthage works
- mode: spm-smoke-tests
name: Verify that SPM smoke tests compile
- mode: examples-pt1
name: Build examples (examples-pt1)
- mode: examples-pt2
Expand Down
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,12 @@ playground.xcworkspace
# Carthage
Carthage/Checkouts
Carthage/Build

# Swift Package Manager
.swiftpm/
.build/
Package.resolved

# Examples
examples/**/Podfile.lock
examples_extra/**/Podfile.lock
3,420 changes: 1,705 additions & 1,715 deletions AsyncDisplayKit.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

66 changes: 66 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// swift-tools-version: 6.1
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "Texture",
defaultLocalization: "en",
platforms: [
.iOS(.v14),
.tvOS(.v14),
],
products: [
.library(
name: "AsyncDisplayKit",
type: .static,
targets: [
"AsyncDisplayKit"
]
),
],
traits: [
Trait(name: "IGListKit", description: "Include IGListKit support"),
Trait(name: "Yoga", description: "Include Yoga support"),
],
dependencies: [
.package(url: "https://github.com/Instagram/IGListKit.git", from: "5.0.0"),
.package(url: "https://github.com/facebook/yoga.git", from: "3.1.0"),
.package(url: "https://github.com/pinterest/PINRemoteImage.git", from: "3.0.4"),
],
targets: [
.target(
name: "AsyncDisplayKit",
dependencies: [
.product(name: "PINRemoteImage", package: "PINRemoteImage"),
.product(name: "IGListKit", package: "IGListKit", condition: .when(traits: ["IGListKit"])),
.product(name: "IGListDiffKit", package: "IGListKit", condition: .when(traits: ["IGListKit"])),
.product(name: "yoga", package: "yoga", condition: .when(traits: ["Yoga"])),
],
path: "Source/Texture",
publicHeadersPath: "include",
cSettings: [
.headerSearchPath("Private"),
.headerSearchPath("Private/Layout"),
.define("AS_ENABLE_TEXTNODE", to: "1"),
.define("AS_USE_VIDEO", to: "1"),
.define("AS_USE_MAPKIT", to: "1"),
.define("AS_USE_PHOTOS", to: "1"),
.define("AS_USE_ASSETS_LIBRARY", to: "1"),
.define("YOGA", to: "1", .when(traits: ["Yoga"])),
.define("AS_IG_LIST_KIT", to: "1", .when(traits: ["IGListKit"])),
.define("AS_IG_LIST_DIFF_KIT", to: "1", .when(traits: ["IGListKit"])),
],
linkerSettings: [
.linkedFramework("AVFoundation"),
.linkedFramework("CoreMedia"),
.linkedFramework("CoreLocation"),
.linkedFramework("MapKit"),
.linkedFramework("Photos"),
.linkedFramework("AssetsLibrary"),
]
),
],
cLanguageStandard: .c11,
cxxLanguageStandard: .cxx11
)
43 changes: 42 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,52 @@

[![Version](https://img.shields.io/cocoapods/v/Texture.svg)](http://cocoapods.org/pods/Texture)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-59C939.svg?style=flat)](https://github.com/Carthage/Carthage)
[![Swift Package Manager](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://swift.org/package-manager/)
[![License](https://img.shields.io/cocoapods/l/Texture.svg)](https://github.com/texturegroup/texture/blob/master/LICENSE)

## Installation

Texture is available via CocoaPods or Carthage. See our [Installation](http://texturegroup.org/docs/installation.html) guide for instructions.
Texture is available via CocoaPods, Carthage, or Swift Package Manager. See our [Installation](http://texturegroup.org/docs/installation.html) guide for instructions.

### Swift Package Manager

Add Texture to your `Package.swift`:

```swift
dependencies: [
.package(url: "https://github.com/texturegroup/texture.git", from: "3.0.0")
]
```

Then add `AsyncDisplayKit` as a dependency of your target:

```swift
.target(
name: "MyApp",
dependencies: [
.product(name: "AsyncDisplayKit", package: "texture")
]
)
```

#### Optional traits

Texture supports SPM traits to opt into optional integrations:

| Trait | Description |
|-------|-------------|
| `IGListKit` | Enables [IGListKit](https://github.com/Instagram/IGListKit) integration (`AS_IG_LIST_KIT`) |
| `Yoga` | Enables [Yoga](https://github.com/facebook/yoga) layout engine support |

Enable traits in your dependency declaration:

```swift
.package(
url: "https://github.com/texturegroup/texture.git",
from: "3.0.0",
traits: ["IGListKit", "Yoga"]
)
```

## Performance Gains

Expand Down
130 changes: 0 additions & 130 deletions Source/AsyncDisplayKit.h

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
// Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0
//

#import <AsyncDisplayKit/ASAvailability.h>
#import "ASAvailability.h"
#import "ASButtonNode+Yoga.h"
#import <AsyncDisplayKit/ASButtonNode+Private.h>
#import <AsyncDisplayKit/ASDisplayNodeInternal.h>
#import <AsyncDisplayKit/ASStackLayoutSpecUtilities.h>
#import "ASButtonNode+Private.h"
#import "ASDisplayNodeInternal.h"
#import "ASStackLayoutSpecUtilities.h"

#if YOGA
static void ASButtonNodeResolveHorizontalAlignmentForStyle(ASLayoutElementStyle *style, ASStackLayoutDirection _direction, ASHorizontalAlignment _horizontalAlignment, ASStackLayoutJustifyContent _justifyContent, ASStackLayoutAlignItems _alignItems) {
Expand Down
14 changes: 7 additions & 7 deletions Source/ASButtonNode.mm → Source/Texture/ASButtonNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
// Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0
//

#import <AsyncDisplayKit/ASButtonNode+Private.h>
#import <AsyncDisplayKit/ASButtonNode+Yoga.h>
#import <AsyncDisplayKit/ASStackLayoutSpec.h>
#import <AsyncDisplayKit/ASThread.h>
#import <AsyncDisplayKit/ASDisplayNode+Subclasses.h>
#import <AsyncDisplayKit/ASBackgroundLayoutSpec.h>
#import <AsyncDisplayKit/ASInsetLayoutSpec.h>
#import "ASButtonNode+Private.h"
#import "ASButtonNode+Yoga.h"
#import "ASStackLayoutSpec.h"
#import "ASThread.h"
#import "ASDisplayNode+Subclasses.h"
#import "ASBackgroundLayoutSpec.h"
#import "ASInsetLayoutSpec.h"

@implementation ASButtonNode

Expand Down
32 changes: 16 additions & 16 deletions Source/ASCellNode.mm → Source/Texture/ASCellNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@
// Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0
//

#import <AsyncDisplayKit/ASCellNode+Internal.h>

#import <AsyncDisplayKit/ASEqualityHelpers.h>
#import <AsyncDisplayKit/ASInternalHelpers.h>
#import <AsyncDisplayKit/ASDisplayNode+FrameworkPrivate.h>
#import <AsyncDisplayKit/ASCollectionView+Undeprecated.h>
#import <AsyncDisplayKit/ASCollectionElement.h>
#import <AsyncDisplayKit/ASTableView+Undeprecated.h>
#import <AsyncDisplayKit/_ASDisplayView.h>
#import <AsyncDisplayKit/ASDisplayNode+Subclasses.h>
#import <AsyncDisplayKit/ASTextNode.h>
#import <AsyncDisplayKit/ASCollectionNode.h>

#import <AsyncDisplayKit/ASDKViewController.h>
#import <AsyncDisplayKit/ASInsetLayoutSpec.h>
#import <AsyncDisplayKit/ASDisplayNodeInternal.h>
#import "ASCellNode+Internal.h"

#import "ASEqualityHelpers.h"
#import "ASInternalHelpers.h"
#import "ASDisplayNode+FrameworkPrivate.h"
#import "ASCollectionView+Undeprecated.h"
#import "ASCollectionElement.h"
#import "ASTableView+Undeprecated.h"
#import "_ASDisplayView.h"
#import "ASDisplayNode+Subclasses.h"
#import "ASTextNode.h"
#import "ASCollectionNode.h"

#import "ASDKViewController.h"
#import "ASInsetLayoutSpec.h"
#import "ASDisplayNodeInternal.h"

#pragma mark -
#pragma mark ASCellNode
Expand Down
Loading