Skip to content

Swift package for adding version tag on bottom of the screen.

Notifications You must be signed in to change notification settings

mobven/MBVersion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MBVersion

MBVersion adds customizable tag to your application about the app version.

SwiftPM compatible codebeat badge

MBVersion MBVersion

Requirements

  • iOS 10.0+
  • Xcode 11+
  • Swift 5.3+

Installation

MBVersion is distributed with Swift Package Manager which is the only official distribution tool by Apple. You can add MBVersion to your project from Xcode's File > Swift Packages > Add Package Dependency menu with its github URL:

https://github.com/mobven/MBVersion.git

Usage

MBVersion can be initialized and customized by accessing MBVersion.shared.

import UIKit
import MBVersion

struct VersionConfig {
    
    static func show() {
        // We're using Xcode configuration files to decide to show app label.
        // Implementation is up to app's logic.
        guard Bundle.main.boolForKey("VERSION_LABEL_ENABLED") else { return }
        MBVersion.shared.show()
    }
    
}

Customization

You can easly customize the MBVersion with editing MBVersionConfig properties.

Property Type Description
textFont UIFont The font used for the version text.
textColor UIColor The color of the version text.
bacgroundColor UIColor The background color of the version label.
Example

You can customize properties like this,

  MBVersion.shared.config.textColor = .gray
  MBVersion.shared.config.bacgroundColor = .red

or you can create your own Config

    let mbVersionConfig = MBVersionConfig(
        textFont: .system,
        textColor: .black,
        bacgroundColor: .gray
    )
    MBVersion.shared.config = mbVersionConfig
    MBVersion.shared.show()

What's Next

  • Add documentation & screenshots for DEBUG screens
  • Swizzle or use URL protocols to show network logs in DEBUG screens.

Developed with 🖤 at Mobven

About

Swift package for adding version tag on bottom of the screen.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages