Latest 1.1.1
Homepage https://github.com/MKGitHub/MessageBox-Concept
License Apache License, Version 2.0
Platforms osx 10.11, ios 9.0, tvos 9.0, watchos 2.0, requires ARC
Authors

![MadeInSweden](https://img.shields.io/badge/Made In-Stockholm, Sweden-blue.svg)
![Status](https://img.shields.io/badge/Status-Active doing well & alive-blue.svg)

Version
Carthage
SPM
Pod

![Platform](https://img.shields.io/badge/Platforms-macOS + iOS + tvOS + watchOS-blue.svg)
![Swift](https://img.shields.io/badge/Swift Version-3.0.1-blue.svg)

MessageBox Concept

MessageBox is a simple concept for decoupling entities. Think of it as notifications but the opposite.

  • For example entity A can place a message that entity B can read whenever suitable – not at once like notifications.
  • A view controller would like to talk to another view controller, but you don’t want to create a strong or weak relationship.

Image of MessageBox-Concept

Simple Example Usage

let messageBox:MessageBox = MessageBox()

// set
messageBox.setObject("TestObject1", forKey:"TestKey1")

// get
// but don't remove it, keep it stored, so that it can still be retrieved later
let someObject:String = messageBox.getObject(forKey:"TestKey1", removeIfFound:false)

// get
// and remove it
let someObject:String = messageBox.getObject(forKey:"TestKey1", removeIfFound:true)

What’s New?

  • Version 1.1.1 adds documentation.

Requirements

  • Swift Version 3.0.1
  • ARC
  • macOS 10.11 and later
  • iOS 9.0 and later
  • tvOS 9.0 and later

How to Install

There is no framework/library distibution, I recommend that you add the MessageBox-Concept/Sources to your project. As this will allow you to easily find & read the MessageBox API, it will also allow MessageBox to compile using your apps build settings.

  • Git: run git clone https://github.com/MKGitHub/MessageBox-Concept.git then Drag & Drop the MessageBox-Concept/Sources into your Xcode project.
  • Manual: Drag & Drop the MessageBox-Concept/Sources into your Xcode project.
  • Carthage: In your Cartfile add github "MKGitHub/MessageBox-Concept" ~> 1.1.1 then carthage update --no-build then Drag & Drop the MessageBox-Concept/Sources into your Xcode project.
  • Swift Package Manager (still quite meaningless): run swift build or swift package generate-xcodeproj
  • CocoaPods (not recommended!): pod 'MessageBox', '~> 1.1.1'

Documentation

Go to the documentation index page.

Used In Apps

MessageBox is used in production in the following apps/games (known to me), these apps are together used by many millions of users every day. Please let me know if you use MessageBox.

  • McDonald’s Sweden
  • McDonald’s Switzerland

Notes

https://github.com/MKGitHub/MessageBox-Concept

http://www.xybernic.com

http://www.khanofsweden.com

Copyright 2016/2017 Mohsan Khan

Licensed under the Apache License, Version 2.0.

Latest podspec

{
    "name": "MessageBox",
    "version": "1.1.1",
    "summary": "MessageBox is a simple concept for decoupling entities. Think of it as notifications but the opposite.",
    "description": "MessageBox is a simple concept for decoupling entities. Think of it as notifications but lazy. For example entity A can place a message that entity B can read whenever suitable u2013 not at once like notifications.n- For example entity A can place a message that entity B can read whenever suitable u2013 not at once like notifications.n- A view controller would like to talk to another view controller, but you don't want to create a strong or weak relationship.",
    "homepage": "https://github.com/MKGitHub/MessageBox-Concept",
    "screenshots": "https://raw.githubusercontent.com/MKGitHub/MessageBox-Concept/master/MessageBox.png",
    "license": {
        "type": "Apache License, Version 2.0",
        "file": "LICENSE.txt"
    },
    "authors": {
        "Mohsan Khan": "[email protected]"
    },
    "platforms": {
        "osx": "10.11",
        "ios": "9.0",
        "tvos": "9.0",
        "watchos": "2.0"
    },
    "source": {
        "git": "https://github.com/MKGitHub/MessageBox-Concept.git",
        "tag": "1.1.1"
    },
    "source_files": "Sources/MessageBox.swift",
    "requires_arc": true,
    "pushed_with_swift_version": "3.0.1"
}

Pin It on Pinterest

Share This