https://github.com/clothparency/ios-widgets
Clear Fashion native iOS SDK for the widgets
https://github.com/clothparency/ios-widgets
cocapods ios sdk swift swift-package-manager swiftui widgets
Last synced: about 1 month ago
JSON representation
Clear Fashion native iOS SDK for the widgets
- Host: GitHub
- URL: https://github.com/clothparency/ios-widgets
- Owner: Clothparency
- License: mit
- Created: 2023-01-24T14:31:02.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-10T12:16:55.000Z (over 2 years ago)
- Last Synced: 2025-03-13T00:17:39.399Z (2 months ago)
- Topics: cocapods, ios, sdk, swift, swift-package-manager, swiftui, widgets
- Language: Swift
- Homepage: https://open.clear-fashion.com
- Size: 416 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
![]()
Clear Fashion widgets for iOS and macOS
### Display your Clear Fashion widgets on your native iOS and macOS app.
[](https://swiftpackageindex.com/Clothparency/ios-widgets)
[](https://swiftpackageindex.com/Clothparency/ios-widgets)
[](https://swift.org/package-manager/)
[](https://cocoapods.org/pods/ClearFashionWidget)
[](https://raw.githubusercontent.com/Clothparency/ios-widgets/main/LICENSE.md)---
Check the latest release here:
https://github.com/Clothparency/ios-widgets/releases/latest
### Installation
There are two ways to install ClearFashionWidget in your project:
- Swift Package Manager
- cocoapods**Swift Package Manager**
If you are working with Xcode, you can search for ios-widgets package
File > Add Packages…

ClearFashionWidget is also available as a Swift Package for the Swift Package Manager. Add it to your dependecies in your `Package.swift` file.
After that you can build your project with the command `swift build`, and eventually run you project (if it is an executable target) with the command `swift run`.
If you want you can also run tests using `swift test`.```swift
// swift-tools-version:5.5import PackageDescription
let package = Package(
name: "MyApp",
dependencies: [
.package(url: "https://github.com/Clothparency/ios-widgets.git", from: "1.0.0")
],
targets: [
.target(
name: "MyApp",
dependencies: ["ClearFashionWidget"]
)
]
)
```**CocoaPods**
ClearFashionWidget is also available as a pod on [CocoaPods](https://cocoapods.org/pods/ClearFashionWidget "ClearFashionWidget cocoapods").
Add the dependency to your Podfile (choose the release version you prefer):```ruby
target 'MyApp' do
pod 'ClearFashionWidget', '~> 1.0'
end
```and then run pod install (or pod update).
## Sample Project
ClearFashionWidget is compatible with the following platforms:
- iOS
- MacOSThis package exposes a class `ClearFashionWidget` returning a `View` object.
You can easily use it in your application, once you added the package `ios-widgets` to your dependencies.
```swift
import SwiftUI
import ClearFashionWidgetstruct ContentView: View {
var body: some View {
ClearFashionWidget(
brandId: "The id of your brand as given by Clear Fashion",
productId: "The identifier of your product as given by Clear Fashion",
lang: "fr" // Must be either "fr" or "en"
)
}
}struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
```## Monitoring
In case of trouble, you can always check server's status at https://status.clear-fashion.com
![]()