Make iOS's InAppPurchaseManager serialization fix backward compatible. #217

Merged
merged 2 commits into from Nov 27, 2011

Conversation

Projects
None yet
2 participants

buddydvd commented Nov 2, 2011

Make InAppPurchaseManager plugin fix backward compatible with older version of PhoneGap.

The newest version of PhoneGap (or Apache Callback) has switched from using SBJson to JSONKit. If JSONKit is available, we use its JSONString implementation, otherwise, use SBJson's JSONRepresentation implementation.

Also, this commit fixes callback arguments for requestProductData and updatedTransactionCallback.

buddydvd added some commits Nov 2, 2011

@buddydvd buddydvd Make InAppPurchaseManager plugin fix backward compatible with older v…
…ersion of PhoneGap.

The newest version of PhoneGap (or Apache Callback) has switched from using SBJson to JSONKit. If JSONKit is available, we its `JSONString` implementation, otherwise, use SBJson's `JSONRepresentation` implementation.

Also, this commit fixes callback arguments for requestProductData and updatedTransactionCallback.
a2cc920
@buddydvd buddydvd Convert nil to NSNull so they can be stored in NSArray and NSDictiona…
…ry for JSON encoding.

Also, `errorCode` must be wrapped in NSNumber so it can be stored in an NSArray.
dc7445a

nice polyfill. @shazron what do you think of this approach/ seems like a nice compromise for backwards compatibility

maxogden merged commit 3a2c352 into phonegap:master Nov 27, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment