Post

Replies

Boosts

Views

Activity

Introductory offer - Trial + Reduced Price
Hi, I would like to create an introductory offer that includes a 1-week trial period and a reduced price for the initial period. But it seems that with the Introductory offers it is either or. Apple's documentation says that I should be using "Introductory offers to attract new customers" so I don't want to use Promotional offers for that. Also, I'd like to have the benefit of Introductory offers, which allows them to be claimed only once and not be available after that anymore. Any advice how I can implement this? Thanks
1
0
2.7k
Apr ’22
Provisional Notifications - no device token
I have been following the official Apple documentation on how to set up notifications in my app: https://developer.apple.com/documentation/usernotifications/asking_permission_to_use_notifications I noticed there is this option .provisional, which doesn't ask the user for authorization, but instead it is granted right away and then notifications are delivered quietly to the notification center's history. So far so good, but once I am granted authorization for sending .provisional notifications, the callback with the DeviceToken does not fire. I have this method in my AppDelegate:    func application(     _ application: UIApplication,     didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data   ) {     let tokenParts = deviceToken.map { data in String(format: "%02.2hhx", data) }     let token = tokenParts.joined()     ManagementService.sharedInstance().storeDeviceToken(token: token)   } And it fires when authorization for normal notifications is granted, but it doesn't for the provisional notifications. So the question is—how can I deliver the provisional notifications if I don't have the device token? My plan was to do the following: ask for authorization to send provisional notifications on first app launch and send the device token to my server ask for authorization to send normal notifications some time later (let's say after a week or after completing some action in the app) EDIT: Found the problem—I was calling the same method to register for remote notification after being granted authorization for both provisional and normal notifications:    func getNotificationSettings() {    UNUserNotificationCenter.current().getNotificationSettings { settings in      guard settings.authorizationStatus == .authorized else { return }             DispatchQueue.main.async {       UIApplication.shared.registerForRemoteNotifications()      }           }   } In this case settings.authorizationStatus == .authorized is false for provisional notifications (even though they are always authorized...). So I just omitted checking of settings.authorizationStatus for provisional notifications and the device token is there.
2
0
1.5k
Jan ’22
Limit available app languages
I have my app localized for many languages, but I'd like to limit the available app languages to only a subset of those, because the content is not ready for all of them. I don't want to delete localization files, because they contain some useful translations that I will use in the future. The only thing I was able to find and try out is this piece of code: class AppDelegate: NSObject, UIApplicationDelegate {   func application(     _ application: UIApplication,     didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?   ) -> Bool {           UserDefaults.standard.set(["Base", "pl", "de", "ru"], forKey: "AppleLanguages")     UserDefaults.standard.synchronize()           ApplicationDelegate.shared.application(       application,       didFinishLaunchingWithOptions: launchOptions     )     return true   } } but unfortunately it does not work. When I launch Settings of my app, I can still choose from about 20-30 languages that I have already some translations for.
4
0
1.9k
Aug ’21
Automatically add device frames to screenshots
I need to add frames to auto-generated screenshots for multiple devices and multiple languages so that I can display these on my app's landing page. I guess it must be quite a standard task so my question is: Is there anything that can be reused to get this job done? All screenshot file names contain: language device name generation I would prefer not to have to manually add frames to 10 screenshots * number_of_devices * number_of_languages. Right now I actually only need iPhone Pro (not Max) and iPad Pro 12.9 (newest gen), but in the future I might need it for other devices too.
4
0
8.4k
Mar ’23
Where can I get used Offer Codes from?
I would like to programmatically keep track of offer codes that have been used. I just configured a Test Offer Code (Reference name), which contains 500 codes (Offer Codes) to buy a 1-month subscription for 0,49€. I was able to redeem the code and everything works, but I was expecting to receive the used code. Instead I received the Reference name in the payload from the App Store Server Notification in the field offer_code_ref_name="Test Offer Code". (expected was sth like offer_code_ref_name="JFFDS61SBJDBJ5BXJS4BX") I would be able to identify the Reference name by the code, if it was provided, because I have the following table in my app's backend: reference_name | code | url | expires_at | used | reserved Test Offer Code | xadz | zzz | 31-07-2022 | t | f Test Offer Code | asdf | xxx | 31-07-2022 | f | f The used code doesn't seem to be included in the latest receipt. How can I obtain it? Can I somehow call App Store Connect API? Thanks
5
0
2.7k
Apr ’24
Offer Codes cannot be redeemed
I have been using the Offer Codes that can be generated in App Store Connect (up to 25k per quarter). They had worked before, but at some point of time they just stopped working. My production device (iPhone 13 Pro) doesn't even render the redemption screen properly and says the code expired, even if it didn't. (already submitted a bug report, sadly without answer till this day: https://feedbackassistant.apple.com/feedback/12261784) Apart from that, I asked some friends to try to redeem a test offer code for me and surprisingly, the native redemption screen is rendered properly, but the code cannot be redeemed. (Clicking "Redeem" doesn't show the payment sheet) Any idea what the cause can be and how to fix it? To me it looks like it is a problem with StoreKit API, because I followed the documentation on how to use the native iOS offer code redemption sheet and I don't even receive an app store notification. Looks like there is a problem between the device and Apple's API.
5
1
2.1k
Dec ’23
Unable to reach server on WiFi, but always able on cellular
I am slowly distributing my app to Beta testers via TestFlight. A few of them have already reported that the app showed “No Internet connection” while on WiFi. As soon as they switched to cellular everything started to work. But the WiFi worked for them for everything else. One of the testers installed the app today for the first time. Still no Internet connection after switching back to WiFi from cellular. I use Alamofire as a framework to make HTTPRequests and when these requests fail, “No Internet connection” error is displayed. My backend service is hosted on Google Cloud, my domain is registered using AWS Route 53. I use SSL certificates managed by Google. All HTTPRequests are sent to https://api.myapp.com (where myapp.com is hosted on AWS). All of the testers have Automatic DNS resolution set in Settings -> WiFi -> (i) -> DNS So far it occurred on iPhone XR and iPhone 12. iOS versions 14.X Any ideas how I can further investigate this issue? Thanks
9
0
4.1k
Sep ’21