GithubHelp home page GithubHelp logo

dagostini / bbportal Goto Github PK

View Code? Open in Web Editor NEW
35.0 35.0 7.0 1.21 MB

A library that will enable you to pass data between your extensions and applications.

License: MIT License

Ruby 27.35% Swift 72.65%

bbportal's People

Contributors

dagostini 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

Watchers

 avatar  avatar  avatar

bbportal's Issues

portalqueue add operation is not executing

I am trying to pass some data between my apps. So I added BBPortal as mentioned in the tutorial and this README.md. First it was not working then I added a breakpoint at

public func send(data: Any, onCompleted: ((NSError?) -> ())? = nil) {

It seems like the method inside it

portalQueue!.addOperation {
                [weak self] in
                var error: NSError?
                self?.coordinator?.coordinate(writingItemAt: url, options: .forReplacing, error: &error, byAccessor: { (url) in
                    
                    let dictToSave: [String: Any?] = [DictKey.sender.rawValue: self?.objectID,
                                                      DictKey.payload.rawValue: data]
                    
                    let dictData = NSKeyedArchiver.archivedData(withRootObject: dictToSave)
                    try? dictData.write(to: url)
                    
                    onCompleted?(nil)
                })
                
                if let error = error {
                    onCompleted?(error)
                }
            }

is never getting executed. What is wrong in this?

deprecations

When I installed BBPortal from local on macOS, I got these warnings

.../Pods/BBPortal/BBPortal/Classes/BBPortal.swift:68:52: 'archivedData(withRootObject:)' was deprecated in macOS 10.14: Use +archivedDataWithRootObject:requiringSecureCoding:error: instead

.../Pods/BBPortal/BBPortal/Classes/BBPortal.swift:90:42: 'unarchiveObject(withFile:)' was deprecated in macOS 10.14: Use +unarchivedObjectOfClass:fromData:error: instead

macOS?

Is this working with macOS?

Cocoapods tells me that it won't install. I'm not entirely sure how to convince it otherwise (first time I'm actually using cocoapods :D)

Swift Compiler Error (Swift 4.2)

"Overlapping accesses to 'error', but modification requires exclusive access; consider copying to a local variable"

Seems related to passing error to onCompleted when error might not be initialized yet? Seems related to these compiler changes:

                var error: NSError?
                self?.coordinator?.coordinate(writingItemAt: url, options: .forReplacing, error: &error, byAccessor: { (url) in
                    
                    let dictToSave: [String: Any?] = [DictKey.sender.rawValue: self?.objectID,
                                                      DictKey.payload.rawValue: data]
                    
                    let dictData = NSKeyedArchiver.archivedData(withRootObject: dictToSave)
                    try? dictData.write(to: url)
                    
                    onCompleted?(error)
                })

(Super interesting and cool library btw!)

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.