Comments (9)
@epeleg Thanks for tracking this down, I'm experiencing the same issue. Do you happen to have a fix? =)
from pushplugin.
Hm, I took a quick look and I'm thinking it would make sense to let NSJSONSerialization
do the heavy JSON lifting instead of the custom parseDictionary
method.
from pushplugin.
I have a fix for this, putting together a pull request...
from pushplugin.
I've included a fix for this in my Cordova 3.0 pull request.
from pushplugin.
please see my comment on the pull request - using NSJSONSerialization - although is solves the escaping issue changes the returned result compared to the previous parseDictionary. so would cause apps to break as they will not find the expected data at "root level" of the object.
from pushplugin.
I'd be curious to know how much that affects people. My teams data is flat to start with (under the"APS" key). Flattening data like that could result in key conflicts anyways. However, if this is a problem for some people it shouldn't be to hard to flatten the NSDictionary before converting the JSON.
That said, I haven't seen anyone maintaining the repo, so I'm not confident right now that this will get pulled.
from pushplugin.
I am not sure, but i believe it would be a good Idea to maintain backwards compatibility.
maybe you (and anyone else reading this) can also comment here:
http://community.phonegap.com/nitobi/topics/syntaxerror_expected_token_where_getting_a_push_message_on_ios_using_com_adobe_plugins_pushplugin
from pushplugin.
I'd like to hear from one of the maintainers before I go do any work to flatten responses. Maybe @bobeast or someone can chime in?
I don't think it's worth it for the following reasons:
- Flattening seems arbitrary and unnecessary, adds complication.
- I'd be surprised if this broke many projects. I think most notification messages are flat anyways.
- If a team created nested data, they probably want nested data.
- My fork is for Cordova 3.0, and Cordova 3.0 has bigger breaking changes already.
- JavaScript changes would be easy/minimal, and the changes can be documented in the readme.
- I'm planning at least one other bigger breaking change in my fork.
from pushplugin.
Does the fact that #39 and #43 are closed mean this issue can be closed?
Flattening sounds like a silly thing to do to me. PushPlugin shouldn't be mangling data like that.
from pushplugin.
Related Issues (20)
- Get notifications in the status bar when the app is running HOT 2
- Can i turn off push notfications for a specific type/module based upon the payload data? HOT 2
- Push Plugin register failed - Confirmation popup is shown HOT 1
- App design issue HOT 1
- no valid aps-environment entitlement string found for application HOT 8
- build phonegap on cli-6.3.0 HOT 2
- v. 2.5.0 does not compile in Phonegap Build (iOS)
- Is local notification plugin a mandatory for status bar display?
- Push Notification gets fired even though i have disabled push notification for that app in device settings HOT 1
- No notification when app is killed or never lunched HOT 1
- Get Push token outside ready
- IOS PushNotification var in another page
- Don't work on VS2017 cordova project
- notification reciedve on android but error in ios
- Crashes App play service problem??
- Handling click event on notification in iOS
- Build Error
- IOS Builidng issue
- Issues with the latest phonegap-plugin-push on PhoneGap Build(PGB)
- Push register not working in andoid pie?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pushplugin.