Does anyone know the relationship, if any, between Xcode's static analyzer and clang-tidy?
I.e. is Xcode's Analyze feature actually invoking a built-in clang-tidy?
If not, does anyone have any experience using upstream clang-tidy (homebrew?) with a mostly-Xcode development flow?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Created
I recently received an auto-email from Apple:
We noticed that there's no billing information associated with your Apple ID, so your Apple Developer Program membership cannot be automatically renewed. To renew your membership, update your Apple ID with a valid credit/debit card any time before your membership is scheduled to renew.
Update now > https://appleid.apple.com/
(This was not entirely unexpected; I changed bank account a few months ago.)
But when I visited appleid.apple.com, I found that I did have a card registered there. So I contacted support and they told me that I should actually add my card details at www dot apple dot com/shop/account/home (or my national variant of that) (*) - and indeed that website has its own section for registering payment cards, which was empty.
So I have filed a bug saying that the auto email has the wrong link in it (FB11823024). I also asked support why there were two different places where card details are recorded, and got this reply:
Apple Store payment information is used to pay what you are buying on
the App Store.
Apple ID payment is associate with your Apple Connect payment method
information.
Which is not very clear to me. What is "Apple Connect"?
Anyway.... everyone beware. If you get that email, and you think that you have definitely registered a payment card, and you follow the link and it confirms that you have registered a payment card .... don't stop worrying, your renewal may still fail!
(*) Yeah, this forum won't let me mention Apple's own websites without obfuscation.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
App Store Connect
Developer Program
The forum's "Last Updated" screen is all wrong - it shows lots of threads where the most recent post was months or years ago as "last updated 1 hour ago".
Is this perhaps because the thread was updated recently to remove spam? Or is there something else going wrong?
Dear Experts,
It is necessary to remove NSFilePresenters when an app goes to the background and re-add them when it returns to the foreground - if you don't do so, the app will be terminated.
But what about an app that has the location background mode enabled?
Specifically, I have an app that records your location, in the foreground or background, and writes this data to a file. It does writes to the file inside a coordinated write block, and monitors for writes from other processes. This works fine in the foreground. I'd really like to also get notifications of concurrent changes to the file while the app is in the background, but this doesn't seem to be possible.
(It's actually more likely that a file will be modified by another app while I'm in the background - consider switching to the Files app, and then back again.)
Any suggestions?
Topic:
App & System Services
SubTopic:
General
Tags:
Files and Storage
Core Location
Background Tasks
Foundation
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??
Has anyone had any luck using Inkscape to edit custom SF Symbols?
It seems to work OK except that it doesn't understand the required layer structure. The layers are SVG group elements, which Inkscape doesn't seem to treat as layers. I think it must need some additional attributes to distinguish layers from other groups, or something.
Edited to add: specifically it seems to need the attribute inkscape:groupmode="layer" on the element. I'm going to try adding this manually to the template and see what happens!
Dear Experts,
I create a UIImage for an SFSymbol using [UIImage systemImageNamed], get its CGImage, and look at the sizes of each:
UIImageConfiguration* config =
[UIImageSymbolConfiguration configurationWithPointSize: 64
weight: UIImageSymbolWeightLight
scale: UIImageScaleMedium];
UIImage* img = [UIImage systemImageNamed: @"chevron.compact.down"
withConfiguration: config];
CGImageRef c = [img CGImage];
printf("UIImage size %f x %f, CGImage size %f x %f\n",
img.size.width, img.size.height,
CGImageGetWidth(c), CGImageGetHeight(c));
(Consider that pseudo-code, it's not an exact copy-paste.)
Results:
UIImage is 70.3333 x 25.6667 and CGImage is 163 x 43.
So the aspect ratios (W/H) are 2.74 and 3.79 respectively. That can't be right!
I don't expect the UIImage and the CGImage dimensions to be the same, because of the UIImage's scale (which is 3 in this case). But that should be the same for both dimensions.
The effect is most pronounced with symbols that have an aspect ratio far from 1, e.g. recordingtape, ellipsis, and this chevron.compact.down.
I believe that the CGImage aspect ratios are the correct ones.
What is going on here?
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.
Dear Experts,
Xcode 14 is giving me a new deprecation warning about sprintf.
I understand why this is here (*) but I need to suppress it in some cases. I don't want to disable it everywhere (or lose other deprecation warnings).
Specifically, I #include some Boost headers which use it in inline functions. I know that I can use #pragma to disable it, but I don't want to modify the Boost headers. Adding #pragma everywhere that I #include a Boost header is also unappealing.
What other options do I have?
(*) I'm not enthusiastic about the suggesting in the warning to use snprintf instead; snprintf leaves the destination unterminated on overflow, which can be just as bad as the sprintf behaviour.
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
Is there a way to determine whether the current device has a physical home button or not?
I am building part of a UI which is very much like the Files app - it has buttons for "iCloud Documents" and "Documents on this device". For the latter, it will use a suitable symbol from SF Symbols i.e. "iphone" or "ipad" (or something for Macs). Just like the Files app.
But I notice that the Files app uses the ".homebutton" symbol variants on older devices that have a physical home button. What is the easiest way to replicate that?
I was considering looking at the "iPhoneNN,M" string and comparing it with the model number of the first devices without a physical button, but that is complicated by e.g. the current iPhone SE, which is "iPhone14,6". I don't want to have to maintain a table.
Is there some easy way to do this?
Thanks.
I believe that if I rename a file, I'm supposed to do that inside a coordinated write on the parent directory - right?
So say I have a file /path/to/folder/f1 and I want to rename it (in the same directory) as /path/to/folder/f2.
I do a coordinated write (with the forMoving option) on the directory /path/to/folder. That passes me a possibly different path to the directory, right? Say I get /path/to/different.
Question: what rename should I actually do? Do I need to construct from and to paths based on the different path that is passed to the accessor? I.e. do I
rename from /path/to/folder/f1 to /path/to/folder/f2
or rename from /path/to/different/f1 to /path/to/different/f2
or some other combination?
Do NSFileManager's renaming methods do anything special in this regard? Can I use e.g. std::filesystem::rename()?
I am interested in both local documents that are visible e.g. in the Files app, and iCloud Drive documents, if that makes any difference.
Thanks!
Dear Experts,
Is there a way to limit an NSMetadataQuery to one iCloud container, in an app with more than one?
It seems to me that setting the scope to NSMetadataQueryUbiquitousDocumentsScope will probably return either the contents of the first (default) container, or all containers
Is there something I can put in the predicate? Maybe I have to try to match URLs that start-with the container's own URL?
Dear Experts,
NSCoordinatedFile's coordinatedRead and coordinatedWrite methods supply a possibly-modified path to the accessor block. (I think it is only modified if there are concurrent accesses, so none of this is easy to test.)
If I enumerate the contents of a directory inside a coordinatedRead on the directory, the paths that I get for the directory entries will include this possibly-modified parent path. (Unless maybe NSFileManager's enumeration methods have some magic to avoid that.)
Is it OK for me to keep these "special" pathnames beyond the end of the coordinatedRead?
If not, perhaps I need to get only the leafname from the directory enumeration and append that to the original directory path.
Thoughts anyone?
Dear All,
Does anyone have any suggestions for an iPad text editor app that is well-behaved with respect to NSFileCoordinator / NSFilePresenter / UIDocument etc.?
Specifically, I'd like something that I can run in iPad split screen mode alongside my test app. I'd like to be able to make changes to files using the text editor and see my test app pick them up, and vice-versa.
I am currently trying an app called "Quick Text" which mostly works but it doesn't seem to pick up changes that I make in my test app unless I close and re-open the file at its end. I'm also soon going to reach its limit of "10 edits per week"!
I have a couple of others to try, but maybe someone here has a suggestion?