Post

Replies

Boosts

Views

Activity

Reply to Does repurchasing non-consumable items have the same effect as restoration?
If a user purchases a non-consumable item that has already been purchased again It's not possible to re-purchase a non-consumable. What will happen is that they will try to re-purchase it, and at some point quite late in the process iOS will pop up an alert saying "You've already purchased this". At that point, I think your app will get a StoreKit transaction for the purchase. I am thinking of guiding them to purchase again Yes, this is safe advice if they claim that "restore" doesn't work. The danger is that they have mis-remembered what they have previously purchased, or that they are using a new Apple ID. In that case, they will be charged.
Topic: App & System Services SubTopic: StoreKit Tags:
Sep ’22
Reply to What focal length ARKit uses?
You probably need kCGImagePropertyExifFocalLenIn35mmFilm , rather than kCGImagePropertyExifFocalLength, if you want to try to interpret the value that you get back in a way tha is device-independent. (Or, maybe there is now an actual field-of-view angle property? There wasn't last time I looked at CGImages from PHPhotoLibrary.)
Topic: Spatial Computing SubTopic: ARKit Tags:
Sep ’22
Reply to UIFont monospacedDigitSystemFont doesn't work
So presumably that "feature settings attribute" with values 0,6 is the thing that gives it monospaced digits. Question: is that documented somewhere? It turns out that 0 is kMonospacedNumbersSelector and 6 is kNumberSpacing, where are documented here: https://developer-rno.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html#Type6 - not that the developer.apple.com search can find it.
Topic: UI Frameworks SubTopic: UIKit Tags:
Sep ’22
Reply to UIFont monospacedDigitSystemFont doesn't work
When I do this: UIFont* uifont = [UIFont systemFontOfSize: sz weight: UIFontWeightRegular]; NSLog(@"font attributes: %@",uifont.fontDescriptor.fontAttributes); I get: font attributes: {     NSCTFontUIUsageAttribute = CTFontRegularUsage;     NSFontSizeAttribute = 64; } When I change it to monospacedDigitSystemFontOfSize:, I get this: font attributes: {     NSCTFontFeatureSettingsAttribute =     (         {             CTFeatureSelectorIdentifier = 0;             CTFeatureTypeIdentifier = 6;         }     );     NSCTFontUIUsageAttribute = CTFontRegularUsage;     NSFontSizeAttribute = 64; } So presumably that "feature settings attribute" with values 0,6 is the thing that gives it monospaced digits. Question: is that documented somewhere? Now, what I do with that UIFont is: CTFontDescriptorRef descr = (__bridge CTFontDescriptorRef)uifont.fontDescriptor; CTFontRef font = CTFontCreateWithFontDescriptor(descr, sz, nullptr); (I do that, because I never found a way to ask for monospaced-digits at the Core Text level.) Now I look up the advances for the digits: char16_t digits[] = u"0123456789"; CGGlyph glyphs[10]; CTFontGetGlyphsForCharacters(font, (const UniChar*)digits, glyphs, 10); CGSize advances[10]; CTFontGetAdvancesForGlyphs(font, kCTFontOrientationHorizontal, glyphs, advances, 10); for (int i = 0; i < 10; ++i) { NSLog(@"digit = %d, advance = %f",i,advances[i].width); } and I get this: digit = 0, advance = 39.031250 digit = 1, advance = 28.593750 digit = 2, advance = 36.437500 digit = 3, advance = 38.093750 digit = 4, advance = 38.906250 digit = 5, advance = 37.656250 digit = 6, advance = 39.718750 digit = 7, advance = 35.218750 digit = 8, advance = 38.593750 digit = 9, advance = 39.718750 Those clearly aren't equal. What's going on here? Does Core Text support monospaced digits, or is it something that is added at the UIKit level? If Core Text does support it, do I need to do something to my CTFontDescriptor to get it? Or maybe I should be looking at something other than the advances?
Topic: UI Frameworks SubTopic: UIKit Tags:
Sep ’22
Reply to Can you check with @available if your iOS app is running on Mac?
The exact same binary runs on the Mac as on the iOS device when you use the “Designed for iPad” feature, so there is no way to cause your function to not be included. It is possible to do a runtime test. I forget exactly how, is it a property of UIDevice maybe? (edit: it’s the ProcessInfo thing you already know about.) Is there some reason why a runtime test doesn’t work for you?
Topic: App & System Services SubTopic: Hardware Tags:
Sep ’22
Reply to App Store price change on October 5, 2022
if you’d like to retain your current price, you could apply your price change to go into effect on October 5th to minimize price changes. The email says "As early as October 5...", which I interpret as "at some date on or after October 5". Are you saying that you believe it means exactly October 5? The similar announcement in August 2021 was more vague, it just said "in the next few days".
Sep ’22
Reply to How to assure that Apple has sent us payment for the previous month?
Carried Forward They haven't paid you (but they haven't forgotten about the money). Is the amount due very small? There used to be a lower limit for payments; I don't know if that is still the case or what the amount is. On that same screen in App Store Connect, I see details of my bank account (name of bank and last few digits of account number) near the top left. Do you see that?
Sep ’22
Reply to Does repurchasing non-consumable items have the same effect as restoration?
If a user purchases a non-consumable item that has already been purchased again It's not possible to re-purchase a non-consumable. What will happen is that they will try to re-purchase it, and at some point quite late in the process iOS will pop up an alert saying "You've already purchased this". At that point, I think your app will get a StoreKit transaction for the purchase. I am thinking of guiding them to purchase again Yes, this is safe advice if they claim that "restore" doesn't work. The danger is that they have mis-remembered what they have previously purchased, or that they are using a new Apple ID. In that case, they will be charged.
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to What focal length ARKit uses?
You probably need kCGImagePropertyExifFocalLenIn35mmFilm , rather than kCGImagePropertyExifFocalLength, if you want to try to interpret the value that you get back in a way tha is device-independent. (Or, maybe there is now an actual field-of-view angle property? There wasn't last time I looked at CGImages from PHPhotoLibrary.)
Topic: Spatial Computing SubTopic: ARKit Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to UIFont monospacedDigitSystemFont doesn't work
So presumably that "feature settings attribute" with values 0,6 is the thing that gives it monospaced digits. Question: is that documented somewhere? It turns out that 0 is kMonospacedNumbersSelector and 6 is kNumberSpacing, where are documented here: https://developer-rno.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html#Type6 - not that the developer.apple.com search can find it.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to UIFont monospacedDigitSystemFont doesn't work
When I do this: UIFont* uifont = [UIFont systemFontOfSize: sz weight: UIFontWeightRegular]; NSLog(@"font attributes: %@",uifont.fontDescriptor.fontAttributes); I get: font attributes: {     NSCTFontUIUsageAttribute = CTFontRegularUsage;     NSFontSizeAttribute = 64; } When I change it to monospacedDigitSystemFontOfSize:, I get this: font attributes: {     NSCTFontFeatureSettingsAttribute =     (         {             CTFeatureSelectorIdentifier = 0;             CTFeatureTypeIdentifier = 6;         }     );     NSCTFontUIUsageAttribute = CTFontRegularUsage;     NSFontSizeAttribute = 64; } So presumably that "feature settings attribute" with values 0,6 is the thing that gives it monospaced digits. Question: is that documented somewhere? Now, what I do with that UIFont is: CTFontDescriptorRef descr = (__bridge CTFontDescriptorRef)uifont.fontDescriptor; CTFontRef font = CTFontCreateWithFontDescriptor(descr, sz, nullptr); (I do that, because I never found a way to ask for monospaced-digits at the Core Text level.) Now I look up the advances for the digits: char16_t digits[] = u"0123456789"; CGGlyph glyphs[10]; CTFontGetGlyphsForCharacters(font, (const UniChar*)digits, glyphs, 10); CGSize advances[10]; CTFontGetAdvancesForGlyphs(font, kCTFontOrientationHorizontal, glyphs, advances, 10); for (int i = 0; i < 10; ++i) { NSLog(@"digit = %d, advance = %f",i,advances[i].width); } and I get this: digit = 0, advance = 39.031250 digit = 1, advance = 28.593750 digit = 2, advance = 36.437500 digit = 3, advance = 38.093750 digit = 4, advance = 38.906250 digit = 5, advance = 37.656250 digit = 6, advance = 39.718750 digit = 7, advance = 35.218750 digit = 8, advance = 38.593750 digit = 9, advance = 39.718750 Those clearly aren't equal. What's going on here? Does Core Text support monospaced digits, or is it something that is added at the UIKit level? If Core Text does support it, do I need to do something to my CTFontDescriptor to get it? Or maybe I should be looking at something other than the advances?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to Can you check with @available if your iOS app is running on Mac?
The exact same binary runs on the Mac as on the iOS device when you use the “Designed for iPad” feature, so there is no way to cause your function to not be included. It is possible to do a runtime test. I forget exactly how, is it a property of UIDevice maybe? (edit: it’s the ProcessInfo thing you already know about.) Is there some reason why a runtime test doesn’t work for you?
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to App Store price change on October 5, 2022
Dear App Store Commerce Engineer , People who need to bulk-update their IAP prices because of this change may struggle because of this: https://developer.apple.com/forums/thread/714696 Do you have any feedback about that? There is also the question of who at Apple is able to provide assistance with the API: https://developer.apple.com/forums/thread/711608
Replies
Boosts
Views
Activity
Sep ’22
Reply to App Store price change on October 5, 2022
if you’d like to retain your current price, you could apply your price change to go into effect on October 5th to minimize price changes. The email says "As early as October 5...", which I interpret as "at some date on or after October 5". Are you saying that you believe it means exactly October 5? The similar announcement in August 2021 was more vague, it just said "in the next few days".
Replies
Boosts
Views
Activity
Sep ’22
Reply to How to assure that Apple has sent us payment for the previous month?
Carried Forward They haven't paid you (but they haven't forgotten about the money). Is the amount due very small? There used to be a lower limit for payments; I don't know if that is still the case or what the amount is. On that same screen in App Store Connect, I see details of my bank account (name of bank and last few digits of account number) near the top left. Do you see that?
Replies
Boosts
Views
Activity
Sep ’22