Skip to content

Commit

Permalink
Merge pull request #249 from atlassian-forks/spm
Browse files Browse the repository at this point in the history
Updated Swift Package Manager support to fix unknown header issue
  • Loading branch information
raphaelschaad authored Apr 8, 2021
2 parents 77a6f81 + 6de292e commit 6cce290
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
3 changes: 1 addition & 2 deletions FLAnimatedImage/include/FLAnimatedImage.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
#import <UIKit/UIKit.h>

// Allow user classes conveniently just importing one header.
#import <FLAnimatedImage/FLAnimatedImageView.h>

#import "FLAnimatedImageView.h"

#ifndef NS_DESIGNATED_INITIALIZER
#if __has_attribute(objc_designated_initializer)
Expand Down
11 changes: 10 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ let package = Package(
.library(name: "FLAnimatedImage", targets: ["FLAnimatedImage"]),
],
targets: [
.target(name: "FLAnimatedImage", path: "FLAnimatedImage")
.target(
name: "FLAnimatedImage",
path: "FLAnimatedImage",
exclude: [ "Info.plist" ],
sources: [ "FLAnimatedImageView.m", "FLAnimatedImage.m" ],
publicHeadersPath: "include",
cSettings: [
.headerSearchPath("include")
]
)
]
)
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@ If using [Carthage](https://github.com/Carthage/Carthage), add the following lin
github "Flipboard/FLAnimatedImage"
```

If using [Swift Package Manager](https://github.com/apple/swift-package-manager), add the following to your `Package.swift` or add via XCode:

```swift
dependencies: [
.package(url: "https://github.com/Flipboard/FLAnimatedImage.git", .upToNextMajor(from: "1.0.16"))
],
targets: [
.target(name: "TestProject", dependencies: ["FLAnimatedImage""])
]
```
In your code, `#import "FLAnimatedImage.h"`, create an image from an animated GIF, and setup the image view to display it:
```objective-c
Expand Down

0 comments on commit 6cce290

Please sign in to comment.