All Projects → abdullahselek → Swiftymessenger

abdullahselek / Swiftymessenger

Licence: mit
Swift toolkit for passing messages between iOS apps and extensions.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Swiftymessenger

Bfkit Swift
BFKit-Swift is a collection of useful classes, structs and extensions to develop Apps faster.
Stars: ✭ 963 (+1906.25%)
Mutual labels:  xcode, cocoapods, carthage
Quiver
Validation, searching and filtering made easy for swift.
Stars: ✭ 27 (-43.75%)
Mutual labels:  xcode, cocoapods, carthage
Maplebacon
🍁🥓 Lightweight and fast Swift library for image downloading, caching and transformations
Stars: ✭ 322 (+570.83%)
Mutual labels:  xcode, cocoapods, carthage
Anyformatkit
Simple text formatting in Swift
Stars: ✭ 296 (+516.67%)
Mutual labels:  xcode, cocoapods, carthage
Swiftinstagram
Instagram API client written in Swift
Stars: ✭ 570 (+1087.5%)
Mutual labels:  xcode, cocoapods, carthage
Stevia
🍃 Concise Autolayout code
Stars: ✭ 3,182 (+6529.17%)
Mutual labels:  xcode, cocoapods, carthage
Restofire
Restofire is a protocol oriented networking client for Alamofire
Stars: ✭ 377 (+685.42%)
Mutual labels:  xcode, cocoapods, carthage
Audioindicatorbars
AIB indicates for your app users which audio is playing. Just like the Podcasts app.
Stars: ✭ 279 (+481.25%)
Mutual labels:  xcode, cocoapods, carthage
Uitextfield Navigation
🏄‍♂️ UITextField-Navigation makes it easier to navigate between UITextFields and UITextViews
Stars: ✭ 436 (+808.33%)
Mutual labels:  xcode, cocoapods, carthage
Gradientcircularprogress
Customizable progress indicator library in Swift
Stars: ✭ 407 (+747.92%)
Mutual labels:  xcode, cocoapods, carthage
Swiftlyext
SwiftlyExt is a collection of useful extensions for Swift 3 standard classes and types 🚀
Stars: ✭ 31 (-35.42%)
Mutual labels:  xcode, cocoapods, carthage
Bfkit
BFKit is a collection of useful classes and categories to develop Apps faster.
Stars: ✭ 811 (+1589.58%)
Mutual labels:  xcode, cocoapods, carthage
Netfox
A lightweight, one line setup, iOS / OSX network debugging library! 🦊
Stars: ✭ 3,188 (+6541.67%)
Mutual labels:  xcode, cocoapods, carthage
Microfeatures Guidelines
📦📝 uFeatures guidelines
Stars: ✭ 315 (+556.25%)
Mutual labels:  xcode, cocoapods, carthage
Imageloaderswift
A lightweight and fast image loader for iOS written in Swift.
Stars: ✭ 290 (+504.17%)
Mutual labels:  xcode, cocoapods, carthage
Tbuiautotest
Generating UI test label automatically for iOS.
Stars: ✭ 333 (+593.75%)
Mutual labels:  xcode, cocoapods, carthage
Colorizeswift
Terminal string styling for Swift.
Stars: ✭ 253 (+427.08%)
Mutual labels:  xcode, cocoapods, carthage
Xcode One Dark
Atom One Dark theme for Xcode
Stars: ✭ 273 (+468.75%)
Mutual labels:  xcode, cocoapods, carthage
Stepslider
StepSlider its custom implementation of slider such as UISlider for preset integer values.
Stars: ✭ 391 (+714.58%)
Mutual labels:  xcode, cocoapods, carthage
Sidemenu
Simple side/slide menu control for iOS, no code necessary! Lots of customization. Add it to your project in 5 minutes or less.
Stars: ✭ 5,267 (+10872.92%)
Mutual labels:  xcode, cocoapods, carthage

SwiftyMessenger CI CocoaPods Compatible Carthage Compatible Platform License

    _________ ___          ___  _   _____  _________ ___    ___
   /        / \  \        /  / |_| ( ___ \ \__   __/ \  \  /  /
  /   _____/   \  \  /\  /  /  | | | (  \/    ) (     \  \/  /
  \_____  \     \  \/  \/  /   | | | (_       | |      \    /
  /        \     \  ____  /    | | |  _)      | |       )  (
 /_______ /       \/    \/     |_| | (        | |       |  |
        \/                         | )        )_(       |__|
                                   |/
      _____        ______    ________  ________  ______   __      __     _____      ______  _________
     /     \      (  ____\  /       / /       / (  ____\ |  \    |  |   /     \    (  ____\ \______  \
    /       \     | (      /   ____/ /   ____/  | (      |  |\   |  |  /   ____\   | (       |        \
   /  /\ /\  \    | (__    \_____ \  \_____ \   | (__    |  | \  |  | /   /__/  |  | (__     |    |____\
  /  /  Y  \  \   |  __)   /       \ /       \  |  __)   |  |  \ |  | \______   /  |  __)    |     \\
 /  /       \  \  | (     /_______/ /_______/   | (      |  |   \|  |  _____/  /   | (       |    | \\
 |_/         |__| | (___/\      \/        \/    | (___/\ |__|    |__| |_______/    | (___/\  |____| |_|
                  (______/                      (______/                           (______/

SwiftyMessenger

Swift toolkit for passing messages between iOS apps and extensions. It creates a bridge between container app and iOS extensions. SwiftyMessenger archives messages in files which are written to the application's shared App Group. SwiftyMessenger resembles interprocess communication between the app and the extension without a interprocess communication.

It also supports CFNotificationCenter Darwin Notifications in an effort to support realtime change notifications. When a message passed, interested parties can listen and can be notified (almost instant) of these changes on both side.

Sample App

Requirements

SwiftyMessenger Version Minimum iOS Target Minimum watchOS Target Swift Version
0.4.0 iOS 10 watchOS 3.0 Swift 5.x
0.2 iOS 9 watchOS 2.0 Swift 4.2
0.1 iOS 9 watchOS 2.0 Swift 4.1

NOTE

SwiftyMessenger can only work with App Group identifiers and Entitlements.

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate SwiftyMessenger into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

target '<Your Target Name>' do
	pod 'SwiftyMessenger', '~>0.4.0'
end

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

brew update
brew install carthage

To integrate SwiftyMessenger into your Xcode project using Carthage, specify it in your Cartfile:

github "abdullahselek/SwiftyMessenger" ~> 0.4.0

Swift Package Manager

Modify your Package.swift file to include the following dependency:

.package(url: "https://github.com/abdullahselek/SwiftyMessenger.git", from: "0.4.0")

XCFramework

XCFrameworks require Xcode 11 or later and integration is very similar to integration of .framework format. Please use script scripts/build-framework.sh to generate binary SwiftyMessenger.xcframework archive that you can use as a dependency in Xcode.

SwiftyMessenger.xcframework is a Release (Optimized) binary that offer best available Swift code performance.

Usage

Initialization

messenger = Messenger(withApplicationGroupIdentifier: "group.com.abdullahselek.swiftymessenger", directory: "messenger")

Passing message

messenger.passMessage(message: ["selectedCell": title], identifier: "selection")

Reading message

if let message = messenger.messageForIdentifier(identifier: "button") as? [String: Any] {
	let buttonTitle = message["buttonTitle"] as? String
}

Listen message changes with identifier

messenger.listenForMessage(withIdentifier: "button") { message in
    guard let message = message as? [String: Any] else {
        return
    }
    let buttonTitle = message["buttonTitle"] as? String
}

Support for WatchConnectivity

SwiftyMessenger suports WatchConnectivity provided by Apple on watchOS extensions.

Here are two little notes you need to know if you want to use WatchConnectivity support in your app:

  • MessengerSession is a singleton subclass that supports listening for WatchConnectivity messages. It can be used to listen Messenger messages you expect to receive from the WatchConnectivity framework. Be sure to activate the session once your listeners are set so that you can begin receiving message notifications.

  • You can use MessengerSessionContextTransiting when creating your messenger, but it can easily overload the pipeline by sending too many messages at once.

Transiting Types

You can find 5 available types under TransitingType.

  • file (Message transiting by archiving and unarchiving messages that are written and read to files)
  • coordinatedFile (Uses FileCoordinator)
  • sessionContext (Support for the WatchConnectivity framework's Application Context)
  • sessionMessage (Support for the WatchConnectivity framework's real time message passing ability)
  • sessionFile (Support for the WatchConnectivity framework's file transfer ability)

License

SwiftyMessenger is released under the MIT license. See LICENSE for details.

Credits

Inspired by MutualMobile. Improved and all coded in new programming language Swift.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].