I am looking at StoreKit Views, new in iOS 17.
In a SubscriptionStoreView, is it possible to show the user their current subscription's renewal/expiry date, or to present a cancel button?
According to https://developer.apple.com/documentation/storekit/storebuttonkind/4203108-cancellation , storeButton for: .cancellation is "A type of button for canceling a subscription.", but actually it just shows a (X) button at the top right to dismiss the view - and this is what the WWDC video presenter (2023 session 10013) seems to believe it should do (around 28:30, "The cancellation button shows a platform-appropriate button to dismiss the view"). Is that a documentation bug?
It seems that I can show renewal/expiry dates and a cancellation button if I use AppStore.showManageSubscriptions(...). But this is rather disjointed. Shouldn't I be able to show all of this in one place? Does my UI need two separate buttons for these overlapping features? Or am I missing something?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Dear Experts,
In "limited access" photos mode, I present a PHPickerViewController. It shows the entire photo library, with a note at the top saying that the app can only access the items that I select. I select a photo.
In the delegate method, I get a PHPickerResult containing a plausible-looking string for the assetIdentifier. It's the same string that I get for that photo in "full access" mode.
Should this photo now be accessible, or do I need to do something else at this point?
When I call fetchAssetsWithLocalIdentifiers using this assetIdentifier, I get no results. When I call cloudIdentifierMappingsForLocalIdentifiers, I get error PHPhotosErrorIdentifierNotFound. In "full access" mode, both work OK.
What am I missing?
Thanks.
Dear All,
I've recently released a new app with a subscription. It has a 3-day free trial and a 1-year subscription, and I've enabled a grace period of 16 days, but the grace period is enabled only for paid-to-paid renewals.
As it's a new app, no-one has reached the end of their subscription yet; there will not have been any paid-to-paid renewals. Yet I see a small number of "enter grace period" and "renewal from grace period" events reported in App Store Connect.
Can anyone explain why this could be?
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
App Store Connect
Subscriptions
Dear Experts,
I have been looking at thr SimpleWatchConnectivity sample code:
https://developer.apple.com/documentation/watchconnectivity/transferring-data-with-watch-connectivity
There are a couple of things in there that look out of date. Firstly, it uses a WKApplicationDelegate to receive the background tasks. I believe this can probably be entirely removed, and replaced with .backgroundTask(.watchConnectivity) { ... } on the App. Is that true? What do I need something inside the { ... } there?
Secondly, it is using NSNotificationCenter to send received data from the WCSessionDelegate to the SwiftUI view hierarchy. Is there a better way to do that? I have spent a while trying to work out how a WCSessionDelegate class can connect to a binding to a SwiftUI @State property, and cause the UI to update in response to received data, but I haven't made it work.
Are there any newer examples of how to do this? I'm currently only trying to send some simple applicationContext state from the phone to the watch and have some views update to show the latest values.
Thanks, Phil.
I would like to be able to write something like:
struct FooView: View
{
let foo: Foo;
var body: some View {
assert(foo.valid);
......
}
};
but of course I can't, because "Type () cannot conform to View".
What's the best way to achieve this?
I'm struggling to implement a flash animation in SwiftUI.
Generally animations animate from one value to another. I'd like to animate from normal to the flashed state and then back to normal, each time the data shown by the view changes. The "flashed state" could be transparent, or a white background, or it could be a scale change for a pulse effect, or something.
Example:
struct MyView: View
{
let value: String;
var body: some View {
ZStack {
Capsule() .fill(Color.green);
Text(value);
}
};
};
Each time value changes, I'd like the colour of the capsule to quickly animate from green to white and back to green.
I feel this should be easy - am I missing something?
For bonus points:
I'd like the Text to change to its new value at the midpoint of the animation, i.e. when the white text is invisible on the white background.
I'd like to get the flash effect whenever I have a new value even if the new value is equal to the old value, if you see what I mean.
Pseudo-code:
PhaseAnimator([false,true], trigger: foo) { flash in
ZStack {
Capsule()
.foregroundStyle(flash ? .red : .green)
Canvas { context, size in
context.draw(image: Image(name: "foo"), toFitRect: some_rectangle);
context.draw(text: Text("foo"), toFitRect: another_rectangle);
}
.foregroundStyle(flash ? .black : .white)
}
} animation: { flash in
return .linear(duration: 0.5);
}
The Capsule's colour animates, but the Canvas's doesn't. The Canvas drawing code is only ever called with flash==false.
What do I have to do to the Canvas so that it redraws with the intermediate colours during the animation?
Anyone else seeing this? I'm sometimes getting "too many redirects" errors from Safari when trying to view this forum:
It goes away after a while, randomly.
Also: this is hard to debug; the Network tab in the Safari Javascript Console only shows the final load of the error page, not the failure. Is there a way to see the actual redirect loop URLs?
Topic:
Developer Tools & Services
SubTopic:
Developer Forums
Tags:
Forums Feedback
Safari Developer Tools
I'm fed up with this. I write a detailed message and press Submit, and I get that. I press back, and my composition is gone.
I think it happens most often when I've logged in only recently, i.e. I've read a few posts, decide to reply to one and log in. At that point, if I close everything and start again and find the thread I want to reply to then it works. But if I don't do that then I run the risk of being told I'm "unauthorized" and losing whatever I've written.
This isn't rocket science! Why do we put up with it?
I have an App Attest server implementation which is generally functioning well.
From time to time, however, I get receipts which do not refresh when I send them to Apple's server; I get a 404 response. The docs (https://developer.apple.com/documentation/devicecheck/assessing_fraud_risk?language=objc - "Understanding HTTP Response Codes") say this means "No data available for the supplied receipt".
Once a receipt is in this state it seems "stuck" i.e. it will never return a new receipt.
I have seen this for both the development and production environments.
Does anyone know what this means, and what I should do?
Dear Experts,
I have been looking at the documentation for system colours at
https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/color/
https://developer.apple.com/documentation/uikit/uicolor/standard_colors/
https://developer.apple.com/documentation/uikit/uicolor/ui_element_colors
It's all reasonably clear... until I actually look at some UIKit screens and try to work out which colour is being used where.
For example, what colour is the background of a navigation bar? It does not seem to be one of the standard colours. Attached is a screenshot from "UIKit Lab", which is a free UIKit catalogue/demo app. Scrolling through its list of standard colours, none of them seems to match the background of the navigation bar. It lies somewhere between systemBackground and secondarySystemBackground.
Is this perhaps because the base colour has been modified by a material effect, or something?
Thanks, Phil.
Dear Experts,
If a user with an older device tries to download an app, and the current version of the app requires an iOS version which their device does not support, the App Store will offer them an older most-recent-compatible version instead.
I've just had an enquiry from a user of my app for whom this has not worked. Specifically he has an iPad 2. He foolishly deleted my app from the device, and now the App Store will not let him re-install it.
Does anyone know why this may be? Is it simply that this App Store feature does not work for devices as old as the iPad 2?
Thanks.
Today I've received an email from Apple telling me that the App Store XML API is going away in November. (See e.g. https://help.apple.com/asc/appsspec/en.lproj/static.html).
I have been using this API for some years to upload screenshots andIAP details (I have an app with a large number of IAPs).
I'd like to thank Apple for giving me three months to implement an alternative. That's much better than the one month warning that they gave me for the last feature that they removed, IAP hosted content.
Still, it's frustrating that I need to do a load of work to replace something that has been working fine for years. Having been an iOS developer since 2008 I've got a lot of accumulated "stuff". These days, I seem to spend more time adapting to things that Apple have deprecated than working on new features. And I constantly worry about what is next for the chop.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
App Store Connect
App Store Connect API
Dear Experts,
Does monospacedDigitSystemFont work for others? It is supposed to be a font where digits are monospaced, but other characters aren't. This is especially useful for things like counter widgets, where you don't want the total length of the string to fluctuate as it updates.
When I try to use it I get the same results as for the regular system font, i.e. digit 1 is narrower than the others.
[UIFont monospacedSystemFont...] does work correctly.
I'm considering sending some suggestions for additional symbols, but I can't find a suitable category in Feedback Assistant. Am I missing something? What category would you use? Should I first file a bug against Feedback Assistant asking for a new category??