Posts

Post not yet marked as solved
0 Replies
620 Views
How can I get the number of steps per day from HealthKit at the end of the day if the app is not active, and then send a local push notification with a value? I tried this example - https://github.com/nderkach/HealthKitTelegram/blob/master/HealthKitTelegram/HealthKitManager%2BBackground.swift, but it didn’t work for me
Posted
by RezuanB.
Last updated
.
Post not yet marked as solved
0 Replies
429 Views
The application has renewable subscriptions and includes third-party analytics services such as AppMetrica and others When making a purchase, I send a Revenue report using the code provided by the service SDK. For example, a report is sent to AppMetrica like this. let revenueInfo = YMMMutableRevenueInfo(priceDecimal: price, currency: product.product.priceLocale.currencyCode ?? "USD") revenueInfo.productID = productID revenueInfo.quantity = 1 revenueInfo.payload = ["source": "AppStore"] if let url = Bundle.main.appStoreReceiptURL, let data = try? Data(contentsOf: url), let transactionID = product.transaction.transactionIdentifier { revenueInfo.transactionID = transactionID revenueInfo.receiptData = data } let reporter = YMMYandexMetrica.reporter(forApiKey: "API_KEY") reporter?.reportRevenue(revenueInfo, onFailure: { (error) in print("REPORT ERROR: \(error.localizedDescription)") }) This section of the code is called immediately after a successful purchase and the result is displayed almost instantly How can I send a report on revenue if the subscription renewal happened automatically? After all, if the application has not been launched, therefore, this code cannot be called. In this case, the "Revenue" section will display income that is actually lower than the real one. Can a report be sent when a user has opened an application some time after making a purchase? If so, how? Also, what options are there if the user uninstalled the app and did not deactivate the subscription? Do I understand correctly that in these cases, analytics services will not know about the real revenue and, accordingly, all charts and data will be lower than the real ones?
Posted
by RezuanB.
Last updated
.
Post not yet marked as solved
1 Replies
2.5k Views
I had a TestViewController.swift and a TestViewController.xib presenting the layout of TestViewController. To load this view controller I had this method: let vc = TestViewController(nibName: "TestViewController", bundle: nil) self.navigationController?.pushViewController(vc, animated: true) Everything works well, but if I call empty initializer: let vc = TestViewController() self.navigationController?.pushViewController(vc, animated: true) Or with nil nibname let vc = TestViewController(nibName: nil, bundle: nil) self.navigationController?.pushViewController(vc, animated: true) The application also continues to work without changes. What's the point in explicitly specifying the name of the xib file? What is the difference between three calls in this case?
Posted
by RezuanB.
Last updated
.
Post not yet marked as solved
1 Replies
1.5k Views
I created a browser based on WKWebView. I need to add the ability to download videos, photos, music, etc. in the AppStore there are many applications, such as DManager, where you open any link, and if it contains a media file it immediately determines that the site contains a media file and offers to download. To download by URL I need to extract url. For example to extract youtube video link i found this solution https://github.com/devandsev/YoutubeDirectLinkExtractor
Posted
by RezuanB.
Last updated
.
Post not yet marked as solved
3 Replies
767 Views
I created a browser based on WKWebView. I need to add the ability to download videos, photos, music, etc. in the AppStore there are many applications, such as DManager, where you open any link, and if it contains a video ( youtube, rutube...), music (zaycev.net), it immediately determines that the site contains a media file and offers to download. Searched all Google, but even the approximate decision did not find.
Posted
by RezuanB.
Last updated
.
Post not yet marked as solved
1 Replies
575 Views
Creating an app for walking. I will explain the essence of the application. There is a training program for walking from sequential exercises, for example:Warm-up 5 min.Walking 15 minRunning 5 minThe main purpose is that the user turns on the music (or not), puts this application in the background and starts training. It is necessary that at the end of each timer, i.e. first 5 minutes, then 15 minutes, etc. the application notifies about it. (As an example of an application where everything works as it should: walking by BetterMe) to play a sound notification, I use AVSpeechSynthesizer (may not be the best choice), i.e. when the timer trigger is triggered, the application explicitly says “ " warm-Up is complete, go to walking”. In the foreground everything works perfectly, and how to set up work in the background is unclear. All the necessary Capabilities are connected. Is there a way to play AVSpeechSynthesizer through local notifications of UNUserNotificationCenter ? The main thing is to play the speech after the timer expires.
Posted
by RezuanB.
Last updated
.