Pushwoosh / pushwoosh-phonegap-plugin

Pushwoosh PhoneGap Build Plugin
Other
110 stars 139 forks source link

Too much debugging coming out in Xcode - Any way to stop it? #148

Closed rwillett closed 8 years ago

rwillett commented 8 years ago

Hi,

We are getting so much debugging information coming out from PushWoosh on iOS/Xcode, its making it difficult to find our own debugging. e.g.

x
|    Pushwoosh request:
| Url:      https://cp.pushwoosh.com/json/1.3/setBadge
| Payload:  {"request":{"device_type":1,"badge":1,"application":"XXXXXXXXX,"userId":"YYYYYY-6E7C-45E1-B4DD-B26FA952EA99","v":"3.0.13.443","hwid":"YYYYYY-6E7C-45E1-B4DD-B26FA952EA99"}}
| Status:   "200 no error"
| Response: {"status_code":200,"status_message":"OK","response":null}
x
2016-01-11 08:53:57.013 Jambuster[3672:518040] [PW] [I] -[PWRequestManager] 
x
|    Pushwoosh request:
| Url:      https://cp.pushwoosh.com/json/1.3/setBadge
| Payload:  {"request":{"device_type":1,"badge":0,"application":"XXXXXXXXX","userId":"YYYYYY-6E7C-45E1-B4DD-B26FA952EA99","v":"3.0.13.443","hwid":"YYYYYY-6E7C-45E1-B4DD-B26FA952EA99"}}
| Status:   "200 no error"
| Response: {"status_code":200,"status_message":"OK","response":null}
x
2016-01-11 08:53:57.020 Jambuster[3672:518038] [PW] [D] -[PushNotificationManager] setBadges completed
2016-01-11 08:53:57.024 Jambuster[3672:518039] [PW] [I] -[PWRequestManager] 
x```

and this is repeated 4-5 times in the space of a few seconds. We are constantly scrolling back and forth in Xcode to try and get to our information.

We cannot see any obvious way to turn debugging off, is there anyway to do this from a function call or compile option or some secret magic trick?

Thanks

Rob
DimanAM commented 8 years ago

Log level can be configured using Pushwoosh_LOG_LEVEL key in Info.plist https://github.com/Pushwoosh/pushwoosh-ios-sdk/blob/master/Documentation/InfoPlist.md

rwillett commented 8 years ago

@DimanAM

Thanks for the quick reply.

Isn't that for IOS SDK and not for Cordova Plugin? We're already searched through the plugins directory for anything but couldn't see anything obvious. We didn't see any info.plist there (or anything similar) or in the Xcode files.

Apologies if we are being dense but nothing jumps out at us (still).

Best wishes,

Rob

DimanAM commented 8 years ago

Info.plist is located in platforms/ios/$PojectDir I suppose the best solution is to modify it using hooks if you want to build application using Cordova CLI

rwillett commented 8 years ago

@DimanAM

We can see a .plist file for our project, Jambuster-Info.plist in platforms/ios/Jambuster. We had seen this before but hadn't understood how PushWoosh could interact with it. This is an ASCII editable file (which is nice).

Just to test the concept, we have to edit platforms/ios/Jambuster/Jambuster-Info.plist file to add in the PushWoosh LOG LEVEL key in the right format to this file

e.g.

<key>Pushwoosh_LOG_LEVEL</key>
<string>NONE</string>

Does it have to be in particular section or anywhere in the high level dictionary. We can play with the hooks to move from debug to production and add and remove the keys, we're happy with doing that sort of coding, its just making sure we understand the concept of what key in which format to add to which file.

Rob

DimanAM commented 8 years ago

Just to test the concept, we have to edit platforms/ios/Jambuster/Jambuster-Info.plist file to add in the PushWoosh LOG LEVEL key in the right format to this file

That's correct.

Does it have to be in particular section or anywhere in the high level dictionary

This key can be anywhere in the high level dictionary.

rwillett commented 8 years ago

@DimanAM

Thanks very much.

Rob.

rwillett commented 8 years ago

Tested and works.

Thanks again for quick help,

Have a good new year,

Rob