Estimote / iOS-Indoor-SDK

Estimote Indoor SDK for iOS
MIT License
484 stars 136 forks source link

Setting the delegate of ESTIndoorLocationManager isn't working #5

Closed sattler closed 9 years ago

sattler commented 9 years ago

The image below describes the problem: screen shot 2014-12-09 at 18 58 28 I set the delegate and afterwards it isn't set in the object but I can't imagine why. The location afterwards is set in the manager object. The Object which is set as delegate implements the ESTIndoorLocationManagerDelegate (obviously).

wiktor commented 9 years ago

Can you remove first if statement and see what happens? Also does examples work for you?

On Tue, Dec 9, 2014 at 7:48 PM, sattler notifications@github.com wrote:

The image below describes the problem: screen shot 2014-12-09 at 18 58 28 I set the delegate and afterwards it isn't set in the object but I can't imagine why. The location afterwards is set in the manager object.

The Object which is set as delegate implements the ESTIndoorLocationManagerDelegate (obviously).

Reply to this email directly or view it on GitHub: https://github.com/Estimote/iOS-Indoor-SDK/issues/5

sattler commented 9 years ago

screen shot 2014-12-09 at 19 55 30 without if now the same and the examples work for me also with my own location.json

wiktor commented 9 years ago

Can you check following with code from examples?

On Tue, Dec 9, 2014 at 7:56 PM, sattler notifications@github.com wrote:

screen shot 2014-12-09 at 19 55 30 without if now the same

and the examples work for me also with my own location.json

Reply to this email directly or view it on GitHub: https://github.com/Estimote/iOS-Indoor-SDK/issues/5#issuecomment-66336451

sattler commented 9 years ago

screen shot 2014-12-10 at 00 42 56

This one is your Swift code Example with my json file without optional and it works

screen shot 2014-12-10 at 00 44 13

and this one with optionals works too but I can't find any difference between the example code an my implementation specially that the delegate doesn't get set seems wired to me

wiktor commented 9 years ago

I cannot either, please strip down examples to suit you. In this manner everything will go well.

On Wed, Dec 10, 2014 at 12:49 AM, sattler notifications@github.com wrote:

screen shot 2014-12-10 at 00 42 56 This one is your Swift code Example with my json file without optional and it works screen shot 2014-12-10 at 00 44 13 and this one with optionals works too but I can't find any difference between the example code an my implementation

specially that the delegate doesn't get set seems wired to me

Reply to this email directly or view it on GitHub: https://github.com/Estimote/iOS-Indoor-SDK/issues/5#issuecomment-66380933

josiasmontag commented 9 years ago

We just found the problem. The delegate needs to be subclass of NSObject, otherwise setting the delegate is ignored. Why?

wiktor commented 9 years ago

It might be swift and obj c interoperability thing. On 10 Dec 2014 10:27, "Josias Montag" notifications@github.com wrote:

We just found the problem. The delegate needs to be subclass of NSObject, otherwise setting the delegate is ignored. Why?

— Reply to this email directly or view it on GitHub https://github.com/Estimote/iOS-Indoor-SDK/issues/5#issuecomment-66424556 .