Skip to content

Instantly share code, notes, and snippets.

@swl367
swl367 / IAPResponse.java
Last active August 27, 2018 17:37
Apple In App Purchase Subscription - Server Notification Object
class IAPResponse {
// https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Subscriptions.html#//apple_ref/doc/uid/TP40008267-CH7-SW15
private ReceiptInfo latest_receipt_info;
private ReceiptInfo latest_expired_receipt_info;
private ReceiptInfo pending_renewal_info;
private String latest_receipt;
private String environment;
private String auto_renew_status;
private String auto_renew_product_id;
@swl367
swl367 / query.js
Created August 29, 2017 16:08
Cosmos DB - queryIterator + request unit charge
var queryIterator = client.queryDocuments(collection._self, querySpec);
queryIterator.executeNext(function (err, results, headers) {
if (err) {
// deal with error...
} else {
// deal with payload...
var ruConsumed = headers['x-ms-request-charge'];
}
})
return queryIterator.toArray( (e, r) => {
@swl367
swl367 / find_provisioning_identity
Created August 25, 2014 18:28
find the team identifier and team name for a given distribution provisioning profile
#!/bin/sh
# find the team identifier and team name for a given distribution provisioning profile
function provisioning_identity() {
ORIGINAL_PROVISION="$1"
security cms -D -i $ORIGINAL_PROVISION > "tmp.plist"
TMP_FILE="tmp.plist"
local result=()