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
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
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
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
In-App Purchase
StoreKit
Subscriptions
App Store Receipts
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.
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
In-App Purchase
StoreKit
Subscriptions
App Store Server Notifications
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.
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.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
App Store Connect
App Store
Xcode
Photos and Imaging
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.
Hi,
I am setting up auto-renewable subscriptions for my app.
I have set up 4 subscriptions for 1,3,6, and 12 months with a one week free trial.
Works like a charm, everything is displayed properly on device, etc.
But now I need to take into account multiple cases and one of them is when the user has already consumed the free trial, cancelled the subscription, and then is about to subscribe again.
I don't want to present "1 Week Free Trial" on the payment screen and certainly I don't want the user, who has already used the trial, to be eligible to use it again.
So the question is if I need 2 sets of subscriptions in total?
With Trial:
my_app_1_month_trial
my_app_3_months_trial
my_app_6_months_trial
my_app_12_months_trial
And without trial:
my_app_1_month
my_app_3_months
my_app_6_months
my_app_12_months
And then when user has already used the free trial (this piece of information will be either fetched from my server or an apple receipt), I add use the SKProducts from the "without trial" set and the user is charged immediately.
I followed the advice from one of the latest WWDC videos on how to handle localization and in my app I launch Settings of my app when the user wants to change the app language (not system language).
The user can then select one of the available languages that my app is localized for.
The localization part works well, but sometimes it happens that when I click the < My app button in the leading, top corner or just navigate back to my app, I encounter a frozen screen and then the app just quits and restarts after 2-3 seconds.
I don't need to preserve any state when the user changes the language, but I would certainly like to prevent this freeze from happening. The desired behaviour would be that the app restarts once the use changes the app language.
I use SwiftUI as the UI framework.
I use the following code to open the Settings of my app for the user:
UIApplication.shared.open(URL(string: UIApplication.openSettingsURLString)!)
How can I achieve that?
I am following "What's New in StoreKit" from WWDC17 to set up payment for subscriptions in my app and the author of the talk recommends to set applicationUsername to an opaque user ID.
When I tried to set it, it turned out it is readonly. (iOS 15)
Is this still a recommended practice, to set that property on SKPayment?
Thanks
After running automated UI tests it turned out that my app looks quite different on iPad simulator than on real iPad.
I have my iPad Pro 12,9" right next to me and the app looks completely fine, but on Simulator (same device model on Simulator) the geometry is simply wrong.
I use SwiftUI's GeometryReader to properly place elements, add horizontal padding if the screen width is wide and in landscape orientation.
It is not the worst case, because on real device everything looks fine, but I wanted to use screenshots generated by these tests and the ones taken on iPad Simulators are simply useless. iPhone Simulator is totally fine.
Am I doing something wrong? Has anybody encountered this?
I run the tests in the following way:
projectName="./MyProject.xcodeproj"
schemeName="MyProject"
simulators=(
...
"iPhone 12 Pro Max"
...
"iPad Pro (12.9-inch) (5th generation)"
...
)
languages=(
"en"
...
)
appearances=(
"light"
"dark"
)
xcrun simctl boot "$simulator"
xcrun simctl ui "$simulator" appearance $appearance
xcodebuild -testLanguage $language -scheme $schemeName -project $projectName -derivedDataPath '/tmp/MyProjectDerivedData/' -destination "platform=iOS
Let's say I want to create an introductory offer starting from the 1st of November till the end of the year. (it should begin at 01-11-2021 00:00:00 and expire at 31-12-2021 23:59:59)
Which of the options below is correct in that case?
Option 1
Start date: 1 November
End Date: 31 December
Option 2
Start date: 1 November
End Date: 1st of January
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
App Store Connect
StoreKit
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
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
App Store Connect
Subscriptions
StoreKit
My app offers login via Apple and Facebook and I would like the logos of both buttons to be aligned.
By default apple's logo is centrally aligned on the leading side of the text and facebook's logo is aligned to the leading edge.
It makes it look as follows:
[__________X_Continue with Apple___________]
[_Y__________Continue with Facebook________]
(where X is the apple logo, Y is the Facebook logo and _ is whitespace).
The closest hint I found on how to do that is this:
Inset the logo if necessary. If you need to horizontally align the Apple logo with other authentication logos, you can adjust the space between the logo and the button’s leading edge.
(source: https://developer.apple.com/design/human-interface-guidelines/sign-in-with-apple/overview/buttons/#:~:text=If%20you%20need%20to%20horizontally,8%25%20of%20the%20button's%20width.)
But how do I do that? I use SwiftUI and I wrap the login with Apple button with a UIViewRepresentable. The ASAuthorizationAppleIDButton class doesn't offer logo alignment property (only ButtonType and ButtonStyle).
Any advice on how to do it would be appreciated.
Hi,
I am preparing to launch an app that will use subscription model. I am a solo developer and I have recently discovered the price tiers, which sound great to me, because I will be able to pick one price tier and have Apple adjust the price and currency for different regions.
My problem is, once I pick a price tier, how do I know which price and currency to display in the app.
It would be ideal if I could set up the pricing in App Store Connect and then use a built-in API to fetch the pricing in the app and it would magically already display the price and currency matching the user's region.
Any hints?
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
App Store Connect
Subscriptions
I have two tabs in my app that contain a view with a list of items. When user taps an item, the navigation to detail view is triggered. On iPhone the list view takes the whole screen and it works just fine.
However, on iPad those views are rendered in SplitView with the list of items on the left and the detail view on the right and the navigation works only for the first tap. After that, tapping any item doesn't change the detail view at all. I can see the following message in the console:
Unable to present. Please file a bug.
One of the views has an option to switch between SplitView and StackedView and the navigation works just fine in the StackedView on iPad. So clearly there is a problem with navigation in the SplitView.
I just updated my iPad OS to 14.7 and still doesn't work, but it worked just fine on iPad OS 13 and 14...
40% of my app on iPad has become useless, because user simply cannot navigate to the simplest detail view :/
Has anyone else encountered this?