iOS StoreKit2 - Is there anyway to find which payments are still pending - storekit

I have started using the new StoreKit2 APIs. I wanted to know if there is a way to see if a product is still pending after the app is relaunched.
In the new APIs, a purchase is executed by calling purchase() on a Product"
let result = try await product.purchase()
In the result one gets a set of values through which one can see if the item was paid for, or payment is still pending.
When restarting, one can call Transaction.currentEntitlements which checks if the product was purchased. However, I want to be able to show the user if the transaction has not as yet been completed for them to see that it is still pending.
Is there anyway to get that information for a product?
Thanks
Reza

Related

How to programmatically add, remove, or block people on Steam through a button

There are many sites such as www.tf2outpost.com and www.bazaar.tf where users can add other steam users through the click of a button. How exactly do you accomplish this? There's nothing in the web API that shows you how to add friends.
EDIT: I have found this code: steam://friends/add/some_steam_id Can you modify this code to block/remove people if you have their steam id?
All that URL does is ask your locally installed Steam client to add a fried of the id matching the number after /add/. So if you have another users steam id you can add them by putting their id in that URL like this: steam://friends/add/your_new_friends_id
you can try this yourself by just pasting the url in most any internet browser and steam will popup with a message saying "Your New Friend has been added to your friends list"
Currently the friends command accepts the following subcommands:
add/<id>
Adds user with specified id number
friends/<id>
Shows list of users with whom you recently played
joinchat/<id>
Joins a chat with a specified id number
message/<id>
Send a message
players
Shows table of recent players you've played with
settings/hideoffline
Toggle offline friends from friends list
settings/showavatars
Toggle avatars in friends list
settings/sortbyname
Sorts friends list by name
status/away
Sets status as away
status/busy
Sets status as busy
status/trade
Sets status as looking to trade
status/play
Sets status as looking to play
status/offline
Sets status as offline
status/online
Sets status as online
It appears there currently is no command (at least not public) for blocking/removing people. Such a command would be fairly useless, and would allow for... mischief. You should just manually remove/block people you no longer wish to be friends with; there would be no convenience added from being able to do this from a browser. What exactly are you trying to accomplish?
See the Steam Browser API documentation for complete details about the friends command and other commands.
P.S. its probably a good idea to avoid posting other peoples steam user ids here.

Cancelled recurring event instance not in events list with singleEvents & showDeleted True

I have been caching Google calendar event data locally in a local database using the python api for v3.
I have this ID cached locally 16...hk_20140530T010000Z. The event has been deleted by a user using Google Calendar on the web, and was not deleted by any scripting. The user reported the event was still appearing in her reports from our local cache.
I investigated, assuming there had been a problem at some point in time and the scripts had simply missed canceling this event (I use updatedMin so I thought maybe something could have theoretically been missed.) However, even when I ran a full query of all data for this calendar this instance of the recurrence was nowhere to be seen. There were plenty of others in the recurrence that appeared, but this instance did not exist in the results from Google, cancelled or otherwise.
I pull these IDs directly from the results from google when I save them in the database, and the fact it exists tells me it had to have existed at some point. The fact it is no longer listed has me puzzled, as it should be there with a status of canceled from my understanding.
Does anyone have any suggestion on why this may be the case? We have 200+ calendars I sync and deleting and re-importing on a regular basis would be a very time consuming process.
Thanks.
Event deletions can disappear after a while. Make sure to correctly handle the 410 response code when using old sync tokens / modified since values (http://developers.google.com/google-apps/calendar/v3/sync).

new server/website appears to be caching but cache is turned off

I recently setup a home server running windows 7 pro and IIS 7.5. I have an ASP page that reads/writes to a database. One scenario I have is a newsletter with a list of subscribers. I manually check a box next to a user's name and they get added to a table that associates that userid with a messageid.
When the page loads initially, let's say I've previously added a user to the newsletter. I have a variable that displays that says "1 subscriber". If I add a user (by checking a box next to their name, hitting submit and submitting a form to the same page but with an action=submit added) the user entry will be added to the DB, the script file then redirects to the same page without the action=submit and Session("msg") will show as "updated successfully" but the subscriber count will equal 1 still. If I hit F5, the number updates.
Everything I've read along with what knowledge I have of programming points to it being a caching issue. However, I've taken all the steps I can find online to disable all caching.
Is there something I might be missing or might it not be a caching issue at all but rather something else? I've used this style of programming for years on other servers without any issues which is why I feel like it points to a setting somewhere.
This is the first server, I've been the admin for so I'm kinda bumbling my way through these things as they come up.
subscribers.asp?cid=5
polls DB to pull count of number of subscribers (audience)
[subscribers show 1]
polls DB to pull all email addresses in DB (subscribers)
list available email address within form
I check appropriate checkboxes next to name(s) and submit form
form submits to subscribers.asp?cid=5 with hidden input type name=action value=submit
Script runs (if action=submit then)
insert subscriber ids into audience table
set RS and Conn = Nothing
response.redirect(subscribers.asp?cid=5)
GOTO TOP
subscribers still show as 1. Hit F5, now it shows incremented appropriately.
Any help is greatly appreciated!

Sync mailchimp campaign click and open with some other database

I am working on mailchimp integration.
I need to pull campaign stats (opens and clicks) and put it in my local database.
Using mailchimp api i am getting the list of all the users with their action taken.
But my issue is how to keep data sync at all time.
Is there any way to skip that data from mailchimp api that i had synced already.
The problem is the entire data set can change between calls and there is no 'since' parameter... The only way to get an updated picture is to query all records and update....
Keeping stat "data synced at all times" really would just depend on your solution (have it query for updates when you/your users access that section...)
You could expidite the update process by keeping track of previous calls/updates with the timestamp (keep track of the timestamp and only update/add records that are newer than the last sync... )
As I said, there is currently no "since" command for the campaignEmailStatsAIMAll method (and no direct equivelent in the export API...)
A 'since' parameter would actually be a good feature... So if coding your own solution to track updates via the timestamp is undesirable, you may want to ask the question in the google group or post a feature request in the google code project:
http://code.google.com/p/mailchimp-api/
EDIT: I just opened the feature request as it may solve a similar issue for an upcomming project:
http://code.google.com/p/mailchimp-api/issues/detail?id=60

TFS 2010 Email Alerts

I found this post, which seems to be an exact duplicate, but I can't figure out how to get the answer to work for me so I'm posting again...
TFS2010: Set up an alert that will email a member in the team when a work item is assigned to them
I want anyone (not everyone) using TFS to receive an email when they are assigned an item or when an item assigned to them changes. So, when the alert happens, the person who is currently assigned the item will receive an email.
I know I can set up this on a per-person basis with Alerts Explorer, but I can't figure out how to do this for everyone at once.
I looked at https://tfsalerts.codeplex.com/, but it looks like it's used to send alerts to groups of people...I only want to send the alert to a single relevant person (the equivalent of #Me). If this tool can do that, I'm not sure how to make it do so.
what you want to do is write a TFS Server Plugin. This plugin will fire whenever a certain event occurs. In your case, you will want to catch the WorkItemChangedEvent. In the notification, you will find old and new values of each field. By checking whether the assigned to field changed, you will know whether the WI has been reassigned.
Once you determined that the WI has been reassigned, you can take the New Value, and go to Active Directory (assuming you're using it), and get the email address. Finally, send a message.
For a code example of writing a robust server plugin (that happens to target the WorkItemChangedEvent, check out this blog post: How to Write a Robust TFS Server Plugin

Resources