目录
目录README.md

Logo Clear Fashion


Clear Fashion widgets for iOS and macOS


Display your Clear Fashion widgets on your native iOS and macOS app.

Swift Version Platform SwiftPM Compatible CocoaPods GitHub license


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…

Capture d’écran 2023-02-06 à 15 52 45

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-tools-version:5.5

import 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. Add the dependency to your Podfile (choose the release version you prefer):

target 'MyApp' do
    pod 'ClearFashionWidget', '~> 1.0'
end

and then run pod install (or pod update).

Sample Project


Clear Fashion Widget GIF

ClearFashionWidget is compatible with the following platforms:

  • iOS
  • MacOS

This 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.

import SwiftUI
import ClearFashionWidget

struct 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



Logo Clear Fashion

关于
555.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号