Code Monkey home page Code Monkey logo

mistica-ios's Introduction

Mistica for iOS Mistica for iOS

Swift Version Xcode Version Platform iOS Version Languages Swift Package Manager compatible Carthage compatible Cocoapods compatible

Mistica is a framework that contains reusable UI components and utilities for the Telefonica Design System (Mistica)

Packages

This repo has contains three different packages:

  • Mistica: It contains all the components of Mistica for UIKit.
  • MisticaSwiftUI: It contains all the components of Mistica for SwiftUI.
  • MisticaCommon: It contains all the common elements for both UIKit and SwiftUI implementation, including assets, colors and fonts. It is internal, so you won't need to import it in any case.

Installation

Swift Package Manager

You can add Mistica to an Xcode project by adding it as a package dependency.

  1. From the File menu, select Swift Package > Add Package Dependency.
  2. Enter "https://github.com/Telefonica/mistica-ios" into the package repository URL text field.
  3. From the Add Package to App window, select MisticaCommon and Mistica or MisticaSwiftUI library.

You also can integrate Mitica to Swift Package, add the following as a dependency to your Package.swift:

.package(name: "Mistica", url: "https://github.com/Telefonica/mistica-ios.git", .from("2.0.0"))

and then specify "Mistica" or "MisticaSwiftUI" as dependencies of the target in which you wish to use Mistica.

Carthage

Add Mistica to your Cartfile:

github "Telefonica/mistica-ios"

And then run:

carthage update --platform iOS --use-ssh --use-xcframeworks

More information about Carthage integration here

Cocoapods

Add Mistica to your Podfile:

pod 'MisticaSwiftUI', :git => '[email protected]:Telefonica/mistica-ios.git'

or

pod 'Mistica', :git => '[email protected]:Telefonica/mistica-ios.git'

And then run:

pod install

Configuration

By default the framework components are created with the Movistar's brand style, to select a different one, configure the brand style:

MisticaConfig.brandStyle = .o2

Remember to initialize Mistica with you desired brand style before the initialize the UI of your app.

In applications before iOS 13, the initialziation should be done in the UIApplicationDelegate,

func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    // Set up Mistica
    MisticaConfig.brandStyle = .vivo

    return true
}

For applications in iOS 13 and above, the initialization should be done in the SceneDelegate

func scene(_ scene: UIScene, willConnectTo _: UISceneSession, options _: UIScene.ConnectionOptions) {
    guard let windowScene = (scene as? UIWindowScene) else { return }

    // Configure brand style before initializing the UI
    MisticaConfig.brandStyle = .movistar
}

Every component in mistica supports dark mode. In order to configure dark mode in you app, you can follow Apple guidelines.

Fonts

By default mistica uses the system font, but if you need to use a custom font (Telefonica font, On-Air, etc) you can follow these instructions.

Components

UIKit

SwiftUI

Demo app

Included in this repository there's a demo app showcasing all implemented components. With each new release, a new version of the mistica catalog app is created. It can be installed with this link or by using the following QR:

Mística Catalog for iOS

Contributing

See CONTRIBUTING.md

mistica-ios's People

Contributors

alejandroruizponce avatar alexanegon avatar amegias avatar cbarcom avatar crisrojas avatar davidmarincalleja avatar dependabot[bot] avatar dhidalgofadrique avatar franciscojrp avatar gomay88 avatar gonzalezreal avatar idenjoe avatar ieduardogf avatar jaranaz avatar jmbrocal avatar jmpg93 avatar josetorronteras avatar juanpe avatar l-trujillo26 avatar manuartero avatar oscarsj avatar pbartolome avatar pladaria avatar salavert avatar semantic-release-bot avatar tuentisre avatar victorpimentel avatar wanaldinotelefonica avatar yceballost avatar yermanaco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.