Skip to content
This repository was archived by the owner on Jun 13, 2023. It is now read-only.

Callbacks not called due to garbage collection #190

Closed
rostopira opened this issue Jun 5, 2019 · 10 comments
Closed

Callbacks not called due to garbage collection #190

rostopira opened this issue Jun 5, 2019 · 10 comments
Labels

Comments

@rostopira
Copy link
Contributor

rostopira commented Jun 5, 2019

I've installed this via CocoaPods, but build fails with following error:

Header 'BoltsSwift-Swift.h' not found

image

P.S.: I use Xcode 10.2

@rostopira
Copy link
Contributor Author

Solved using

    pod 'ParseLiveQuery'
    pod 'Bolts-Swift', :git => 'https://github.com/bpisano-luna/Bolts-Swift.git'

That's strange

@rostopira
Copy link
Contributor Author

I can clearly see correct messages from and to websocket, but callbacks never called, what the heck

@rostopira
Copy link
Contributor Author

rostopira commented Jun 6, 2019

weak var Should be included in the docs.

@noobs2ninjas
Copy link
Member

@rostopira I am actually started working on getting this project up to speed from many previous unreleased commits. I experienced the same thing you did and it caused me hours of trial and error and I could only get the delegate sorry "Subscription Handling" protocol to work. Where did you find weak var? Thats doesn't makes much sense when you're dealing with asynchronous tasks that passes a closure expression. Nothing during this process has any business being declared weak.

@rostopira
Copy link
Contributor Author

rostopira commented Jul 29, 2019

@rostopira
Copy link
Contributor Author

@noobs2ninjas also, weak could make sense, if it were properly documented and actually cancels subscription, but it's not the case

@noobs2ninjas
Copy link
Member

noobs2ninjas commented Jul 30, 2019

Even with documentation the place where it completely falls apart every time is when accessing the client via singleton as you can simply pass in closures eliminating the need to make a reference to anything.

@rostopira
Copy link
Contributor Author

@noobs2ninjas so, if you agree with me, just remove weak, what's the problem?

@noobs2ninjas
Copy link
Member

I do. Just pointing out that it probably should be removed either way. Would you mind updating this issues title and doing a commit from your branch to resolve this issue? I'm looking to do a release soon and would love to get this in there and give you credit for the fix.

@rostopira
Copy link
Contributor Author

NP, I will do

@rostopira rostopira changed the title BoltsSwift header not found Callbacks not called due to garbage collection Aug 2, 2019
rostopira added a commit to rostopira/ParseLiveQuery-iOS-OSX that referenced this issue Aug 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants