Posts

Post not yet marked as solved
4 Replies
1.9k Views
Hi guys.Apple is asking me that if a Non-Consumable product has been purchased by a user and the user decides to delete and reinstall the App, then I must present a "Restore" instead than "Buy" button.To check if a product has been purchased I am using NSUserDefaults, like this: public init(productIds: Set<ProductIdentifier>) { self.productIdentifiers = productIds for productIdentifier in productIds { let purchased = NSUserDefaults.standardUserDefaults().boolForKey(productIdentifier) if purchased { purchasedProductIdentifiers.insert(productIdentifier) print("Previously purchased: \(productIdentifier)") } else { print("Not purchased: \(productIdentifier)") } } super.init() SKPaymentQueue.defaultQueue().addTransactionObserver(self) }But, if the user deletes the App, this information is lost.So, Is there anyway to ask to SKPayment if a product has been purchase? I guess there is because they are asking me that. But I didnt find it.
Posted
by iostony.
Last updated
.
Post not yet marked as solved
1 Replies
2.9k Views
I have the next code: var imageArray = [UIImage]() for photo in self.selectedPhotos { imageArray.append(photo.thumbnail!) } let shareScreen = UIActivityViewController(activityItems: imageArray, applicationActivities: nil) let navigationItemElement:UIBarButtonItem = (self.navigationItem.rightBarButtonItems?.first)! let popover = UIPopoverController(contentViewController: shareScreen) popover.presentPopoverFromBarButtonItem(navigationItemElement, permittedArrowDirections: UIPopoverArrowDirection.Any, animated: true)And I have the next warning:'UIPopoverController' was deprecated in iOS 9.0: UIPopoverController is deprecated. Popovers are now implementd as UIViewController presentations. Use a modal presentation style of UIModalPresentationPopover and UIPopoverPresentationController.Anyone has an example?
Posted
by iostony.
Last updated
.