firebase / geofire-objc

GeoFire for Objective-C - Realtime location queries with Firebase
MIT License
436 stars 180 forks source link

Xcode Project sends data through simulator but not iPhone #57

Closed SabresPuck closed 8 years ago

SabresPuck commented 8 years ago

I am using GeoFire on my Xcode project to simply transfer longitude and latitude data from my project to the server. It is able to send info to the server from the simulator but not when I build on the iPhone. I'm not sure if this is due to GeoFire or my phone.

jwngr commented 8 years ago

This is not actionable on our end. You will need to do some more digging on your end. You should try just writing to Firebase through the regular SDK (not using GeoFire) and see if that works. You can enable Firebase logging like this

Objective-C: [FIRDatabase setLoggingEnabled:YES]; Swift: FIRDatabase.setLoggingEnabled(true)

That may help you solve the problem yourself. Otherwise, feel free to post the output here and we can re-open this issue.

SabresPuck commented 8 years ago

Thanks for the response, went into my output on Xcode and got this as a result:

Firebase logging output ``` 2016-07-17 21:30:21.665 TaggLogin[5293:1519885] [FirebaseDatabase] Wasn't connected or writes paused, so added to outstanding puts only. Path: /CustomKey 2016-07-17 21:30:21.760 TaggLogin[5293:1519840] [FirebaseDatabase] ---> Parsed (https://tagglogin-e9443.firebaseio.com/) to: (https://tagglogin-e9443.firebaseio.com,wss://tagglogin-e9443.firebaseio.com/.ws?v=5&ns=tagglogin-e9443); ns=(tagglogin-e9443); path=(/) 2016-07-17 21:30:21.761 TaggLogin[5293:1519840] [FirebaseDatabase] BUILD Version: 3.0.1_20160506_a9314db8a41fbfb74696d83a77b58149ee9f2f88 2016-07-17 21:30:21.762 TaggLogin[5293:1519885] [FirebaseDatabase] Setting: /CustomKey with { ".priority" = dr47txd42w; g = dr47txd42w; l = { 0 = "40.03185632521012"; 1 = "-75.34146809104386"; }; } pri: dr47txd42w 2016-07-17 21:30:21.762 TaggLogin[5293:1519885] [FirebaseDatabase] Wasn't connected or writes paused, so added to outstanding puts only. Path: /CustomKey 2016-07-17 21:30:21.771 TaggLogin[5293:1519840] [FirebaseDatabase] ---> Parsed (https://tagglogin-e9443.firebaseio.com/) to: (https://tagglogin-e9443.firebaseio.com,wss://tagglogin-e9443.firebaseio.com/.ws?v=5&ns=tagglogin-e9443); ns=(tagglogin-e9443); path=(/) 2016-07-17 21:30:21.771 TaggLogin[5293:1519840] [FirebaseDatabase] BUILD Version: 3.0.1_20160506_a9314db8a41fbfb74696d83a77b58149ee9f2f88 2016-07-17 21:30:21.772 TaggLogin[5293:1519885] [FirebaseDatabase] Setting: /CustomKey with { ".priority" = dr47txd42r; g = dr47txd42r; l = { 0 = "40.03185952423455"; 1 = "-75.34147649244629"; }; } pri: dr47txd42r ```
jwngr commented 8 years ago

Hrmm, that's odd. Can you give us the full output from when the initial Firebase connection was made? Try enabling logging before you first initialize the SDK.

SabresPuck commented 8 years ago

Here is the full output from the beginning until when it starts repeating:

Firebase logging output ``` 2016-07-18 14:21:37.813: FIRInstanceID AppDelegate proxy enabled, will swizzle app delegate remote notification handlers. To disable add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO 2016-07-18 14:21:37.924 TaggLogin[5530:] Firebase Analytics v.3200000 started 2016-07-18 14:21:37.926 TaggLogin[5530:] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/Y0Yjwu) 2016-07-18 14:21:38.055 TaggLogin[5530:] Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist 2016-07-18 14:21:38.455 TaggLogin[5530:] Firebase Analytics enabled 2016-07-18 14:21:50.926 TaggLogin[5530:1618527] [FirebaseDatabase] BUILD Version: 3.0.1_20160506_a9314db8a41fbfb74696d83a77b58149ee9f2f88 2016-07-18 14:21:50.927 TaggLogin[5530:1618527] [FirebaseDatabase] ---> Parsed (https://tagglogin-e9443.firebaseio.com) to: (https://tagglogin-e9443.firebaseio.com,wss://tagglogin-e9443.firebaseio.com/.ws?v=5&ns=tagglogin-e9443); ns=(tagglogin-e9443); path=(/) 2016-07-18 14:21:50.930 TaggLogin[5530:1618527] [FirebaseDatabase] Connection interrupted for: waiting_for_open 2016-07-18 14:21:50.930 TaggLogin[5530:1618527] [FirebaseDatabase] No existing retry attempt to cancel 2016-07-18 14:21:50.931 TaggLogin[5530:1618527] [FirebaseDatabase] ---> Parsed (https://tagglogin-e9443.firebaseio.com/) to: (https://tagglogin-e9443.firebaseio.com,wss://tagglogin-e9443.firebaseio.com/.ws?v=5&ns=tagglogin-e9443); ns=(tagglogin-e9443); path=(/) 2016-07-18 14:21:50.932 TaggLogin[5530:1618796] [FirebaseDatabase] Connection no longer interrupted for: waiting_for_open 2016-07-18 14:21:50.932 TaggLogin[5530:1618796] [FirebaseDatabase] Scheduling connection attempt 2016-07-18 14:21:50.942 TaggLogin[5530:1618527] [FirebaseDatabase] BUILD Version: 3.0.1_20160506_a9314db8a41fbfb74696d83a77b58149ee9f2f88 2016-07-18 14:21:50.952 TaggLogin[5530:1618527] [FirebaseDatabase] ---> Parsed (https://tagglogin-e9443.firebaseio.com/) to: (https://tagglogin-e9443.firebaseio.com,wss://tagglogin-e9443.firebaseio.com/.ws?v=5&ns=tagglogin-e9443); ns=(tagglogin-e9443); path=(/) 2016-07-18 14:21:50.954 TaggLogin[5530:1618796] [FirebaseDatabase] Registering for background notification. 2016-07-18 14:21:50.954 TaggLogin[5530:1618796] [FirebaseDatabase] Setting: /CustomKey with { ".priority" = dr47v2n4yr; g = dr47v2n4yr; l = { 0 = "40.03469358752569"; 1 = "-75.34670645182052"; }; } pri: dr47v2n4yr 2016-07-18 14:21:50.955 TaggLogin[5530:1618796] [FirebaseDatabase] Wasn't connected or writes paused, so added to outstanding puts only. Path: /CustomKey 2016-07-18 14:21:50.955 TaggLogin[5530:1618796] [FirebaseDatabase] Trying to fetch auth token 2016-07-18 14:21:50.957 TaggLogin[5530:1618796] [FirebaseDatabase] Setting: /CustomKey with { ".priority" = dr47v2n4yr; g = dr47v2n4yr; l = { 0 = "40.03469358752569"; 1 = "-75.34670645182052"; }; ```
SabresPuck commented 8 years ago

I was able to fix the issue, the problem was that there was no account linked to my iPhone, although for some reason that wasn't needed on the simulator.

jwngr commented 8 years ago

What exactly do you mean by account? An iCloud account? How exactly did you resolve the problem?