Giter Site home page Giter Site logo

swifteventbus's People

Contributors

cesarferreira avatar cp-satish-v avatar ikorich avatar jaimeagudo avatar mathieurobidoux avatar migore avatar nunogoncalves avatar satishvekariya avatar vi-d avatar ykn-mst avatar

Stargazers

 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  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  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  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar

swifteventbus's Issues

Update podspec to 5.1.0

Can you please update the podspec to 5.1.0?
Since I am using a podspec myself I can only reference a version, not a tag.

Thanks

onMainThread not fired

Hi

I use "SwiftEventBus.post" when user clicks on the notification and open the app.
but in another side "onMainThread" not fired.

is there an issue or I miss up some thing.

can you help me?

Thanks

compiler warning

The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99.

Could you add the SWIFT_VERSION attribute in at least one of the targets?

Hi there!

I'm using this pod in a KMM (Kotlin Multiplarform) project, of course for the iOS version of the app.

The problem is that I'm not able to add the snippet ENV['SWIFT_VERSION'] = '5' to the generated podfile, and because of that, I'm getting the following error:

pod install Analyzing dependencies Pre-downloading: SwiftEventBusfromhttps://github.com/cesarferreira/SwiftEventBus.git`, tag 5.1.0
Downloading dependencies
Installing SwiftEventBus (5.0.0)
[!] Unable to determine Swift version for the following pods:

  • SwiftEventBus does not specify a Swift version and none of the targets (ios) integrating it have the SWIFT_VERSION attribute set. Please contact the author or set the SWIFT_VERSION attribute in at least one of the targets that integrate this pod.
    `

It will not be possible to add custom code to the podfile until Kmm reaches the version 1.9.0 (currently 1.7), I suppose it will take more than a year.

Would it be possible to include the workaround mentioned in the error message?
Thanks in advance!

Swift 1.2 Support

Seeing build errors when compiling with XCode 6.3 beta 3 / Swift 1.2:

/Users/ragrait/ios/Rdio/Pods/SwiftEventBus/SwiftEventBus/SwiftEventBus.swift:48:43: Invalid use of '()' to call a value of non-function type 'UInt'

This is happening in 3 different places, but they're all variants on this:

let id = ObjectIdentifier(target).uintValue()

Looks like the trailing parens cause a syntax error in Swift 1.2

Conflicting overloading functions

These two functions conflicting

open class func post(_ name: String, sender: AnyObject?)
open class func post(_ name: String, sender: NSObject?)

Swift 4.2 by calling

SwiftEventBus.post("notification", sender: 1) // not working
SwiftEventBus.post("notification", sender: 1 as AnyObject) // working

issue with updating UI with a SwiftEventBus.post fired on a background thread

I'm having an issue with updating UI with a SwiftEventBus.post fired on a background thread.
The issue happens when i'm making a network request for authenticating a user.

We have an event for when the user is authenticated. When the user is authenticated, we fire off a SwiftEventBus event(which looks to be done on a background thread).

The completion handler for the subscriber to the authentication event also publishes an event to notify the UI to update, but the event never gets caught by it's subscriber. The view controller that subscribes to the "navigate" event set's the subscription handler's "onMainThread" to true, but method never seems to get called.

Am I supposed to ensure that events relate to updating UI need to be fired on the main thread, or is this a known issue?

How to create an new instance

Hi,

I would like to create a new instance of the event bus class. How would I do that? As far as I can see there are no open initializers.

Thanks.

Module compiled with Swift 5.3.2 cannot be imported by the Swift 5.4.2 compiler

I have installed SwiftEventBus in my project using Carthage and it shows me this error while running my project.
I used Xcode 12.5.1 and 13 beta.

  • Xcode 12.5.1: Module compiled with Swift 5.3.2 cannot be imported by the Swift 5.4.2 compiler
  • Xcode 13 beta: Module compiled with Swift 5.3.2 cannot be imported by the Swift 5.5 compiler

Can someone please help how I can resolve this?

OSX support

'pod install' fails for a macOS project with this message:

Pre-downloading: 'SwiftEventBus' from 'https://github.com/cesarferreira/SwiftEventBus.git', tag '2.1.2'
[!] The platform of the target '[...]' (OS X 10.12) is not compatible with 'SwiftEventBus (2.1.0)', which does not support 'osx'.

Sometime event seems to be sent multiple times.

Even if I only send it once, my registered closure is called multiple times.
So today i have to unregister when receiving the event for the first time.

Note that I'm certain that the posting of the event happens only once, I added a breakpoint and it only stopped once.

Sending:
SwiftEventBus.post(BUS_EVENT_1_DETECTED, sender: myData)

Event listener in my view controller viewDidLoad() function :

    SwiftEventBus.onBackgroundThread(self, name:BUS_EVENT_1_DETECTED) { result in
        //listen only once as this event may be casted multiple times.
        SwiftEventBus.unregister(self, name:BUS_EVENT_1_DETECTED)
        let data:MyData = result.object as! MyData
        // then do stuff here with my data.
    } 

Any ideas ?
Thanks.

Publish 3.0.1 to Cocoapods

Hello,

:git tag is not available for dependencies defined in Podspec, and I am unable to use 3.0.1 version in my framework.

Can you please publish it to Cocoapods as well?

event only triggered once

I post the event in UITabBarController, and subscribe in HomeViewController. There relation is
UITabBarController -> UINavigationController(rootViewController: HomeViewController). All the operations are in the main thread but the event can only be triggered once.

Cocoapods downloads 5.0.0 instead of the latest

Hi.

I'm on Xcode 12 + Swift 5
Adding this line to my Podfile

pod 'SwiftEventBus', :tag => '5.1.0', :git => 'https://github.com/cesarferreira/SwiftEventBus.git'

downloads 5.0.0 instead of 5.1.0.

Update all pods
Updating local specs repositories
Analyzing dependencies
Pre-downloading: `SwiftEventBus` from `https://github.com/cesarferreira/SwiftEventBus.git`, tag `5.1.0`
Downloading dependencies
Installing SwiftEventBus 5.0.0

I see the Podspec is set to 5.0.0.
Would that be the reason it pulls 5.0.0?
Sorry I'm new to iOS development.

Test

Hi,

How this lib can be testable ?

Unable to build Xcode 6.2

Unable to build my project after installing using pods

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: unknown option character `X' in: -Xlinker

My pod file is below:

# Uncomment this line to define a global platform for your project
# platform :ios, '6.0'

target 'OmnicoinWallet' do
pod 'SwiftEventBus', :git => 'https://github.com/cesarferreira/SwiftEventBus.git'

end

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.