URLEmbeddedView
Features
- [x] Simple interface for fetching Open Graph Data
- [x] Be able to display Open Graph Data
- [x] Automatically caching Open Graph Data
- [x] Automatically caching Open Graph Image
- [x] Tap handleable
- [x] Clearable image cache
- [x] Clearable data cache
- [x] Support Swift3.2 (until 0.11.x)
- [x] Supprot Swift4.x (until 0.17.1)
- [x] Support Swift5 (since 0.18.0)
- [x] Support Carthage since 0.11.1
- [x] Support tvOS since 0.16.0
- [x] Custom implementation of OGData cache
Usage
To run the example project, clone the repo, and run carthage update
from the Example directory first.
Layouts
- Default

- No Image

- No response

Customization
Data and Image Cache
You can get Open Graph Data with OGDataProvider
.
You can configure time interval for next updating of OGData.
Default is 10 days.
You can get UIImage with OGImageProvider
.
Custom Data Cache implementation
Default cache feature is using Core Data.
If you want to use other cache features, please implement cache manager with OGDataCacheManagerProtocol
.
For example, URLEmbeddedView has OGDataNoCacheManager
that feature is not using cache.
If you want to use that feature, you can use like this.
You can implement custom cache feature and use it like this.
OpenGraph.Data Properties
OpenGraphDataDownloader
You can only use download feature of OGData with OpenGraphDataDownloader
like this.
If you use OGDataProvider
with OGDataNoCacheManager
, it is almost same process.
Installation
CocoaPods
URLEmbeddedView is available through CocoaPods. To install
it, simply add the following line to your Podfile:
Carthage
If you’re using Carthage, simply add
NoticeObserveKit to your Cartfile
:
Use in Objective-C
Here is Objective-C sample.
Special Thanks
- CryptoSwift is a greate Crypto related functions and helpers for Swift. (Created by @krzyzanowskim)
Requirements
- Xcode 10.2 or greater
- iOS 8.0 or greater
- tvOS 10.0 or greater
- UIKit
- CoreData
- CoreGraphics
Other
- MisterFusion - Swift DSL for AutoLayout
- NoticeObserveKit (type-safe NotificationCenter wrapper) is used in this sample.
- Android version is here. (Created by @kaelaela)
Author
Taiki Suzuki, s1180183@gmail.com
License
URLEmbeddedView is available under the MIT license. See the LICENSE file for more info.