Post

Replies

Boosts

Views

Activity

Reply to Need to know how to stop indentation
Here is what Apple said in reply to my bug report in June. Please know that there is a setting that controls this (which should be off by default). In Xcode > Settings > Text Editing > Editing, it’s called “Automatically reformat when completing code”. I don't know what "controls this" means. Does "on" mean add unwanted indentation and "off" mean do not add unwanted indentation? But regardless, I filed another report regarding this setting having no effect. Apple's reply: It only reformats code that’s wider than the specified column, and only if the code is made up of nested expressions (function calls, etc), that can be wrapped to new lines. In any case, my code never extends to the "Reformat code at column" location, as shown in my screen recordings. Every line jumps around. Mine go in the opposite direction from yours. But it's never where I want it. Obviously I don't understand the logic that Apple's using for these indentations. But it seems clear that there is only one coding style that Apple now allows - this one: - (void) applicationDidFinishLaunching: (NSNotification *) aNotification { int value = 1; } The key is having that opening brace on the previous line. Nothing else is allowed. I still don't understand why your indentation is going backwards from mine. But thanks for posting your settings screenshots. I'll try to reproduce this later on Sequoia. I'm still using Ventura for production work. 😄
Jan ’25
Reply to Sdk access to filemanager documents directory
I get that sdk code is our responsibility, but the fact is, people dont know that the app shares the same sandbox as the sdk and so they might not know to consider that before adopting an sdk. or consider that when they make new files in the filesystem. I think you're greatly over-estimating the amount of research that the average developer does before incorporating 3rd party frameworks. That's why Apple added the requirement for Privacy Manifests when using certain frameworks. You're certainly correct that this could be an issue if the developer didn't understand. But there's no coding or knowledge test required before being allowed to distribute apps.
Topic: App & System Services SubTopic: General Tags:
Jan ’25
Reply to Need to know how to stop indentation
Putting { on the same line as the method declaration doesn't change the behavior at all. It does for me. But my indentation is going the other way. I haven't been able to reproduce your unwanted indentation direction yet. The thing that bothers me is that there are something like 30 million registered developers, and some unknown number of download-only Xcode users. I have seen two people report unwarned right indentation and two people report unwanted left indentation. What are the other millions of people doing? Are our preferences just corrupted or something? And yet, people seem to be super excited about the new EditorConfig option. I had hoped it would allow users to control indentation settings. But no, it does virtually nothing. Instead of choosing spaces or tabs in Xcode settings, we can create a new file, add it to an Xcode project, and that will specify whether we want to use spaces or tabs. Hallelujah! That's literally all it does. In my case, I've turned off all indentation options. But this is the one indentation that I can't disable. Since you are going the other way, try turning off your indentation settings.
Jan ’25
Reply to Need to know how to stop indentation
I think I'm making some progress. Here is what I've learned. Indentation cannot be disabled. End of story. So there's that. The most important setting is "Indent solo { by _ spaces". This has nothing to do with the "{" character. It affects every line. There is a concept of indentation context. This is the "indent width" setting. It is the number of spaces after an opening "{" to indent the next line of code. The "indent solo { by _ spaces" defines a negative indent from the indentation context. So, if I want to code Objective-C in this style: - (void) foo { handleValue(3); if(YES) { handleValue(4); } } I need an "Indent width" of 2 and an "indent solo { by _ spaces" of 2. They cancel each other out and my code lines up. The indentation context in Swift is more complicated. At the top level, it works like Objective-C. After the top level, Swift ignores the position of the opening brace. The context is defined in terms of the parent expression. if "indent width" and "indent solo {" are the same, then they cancel each other out and my subordinate block is indented at the same level as the parent, which is wrong in any language. In order to get my code to work (after the top level), I need to set "indent solo { by _ spaces" to zero. Luckily this field does accept zero. "Indent width" does not allow zero. What this means for people dealing with leftward indent problems, you may be able to fix the problem by setting "indent solo { by _ spaces" to zero, but only in Objective-C/C++. C++ seems to work like Swift's inner block logic. Set "indent solo { by _ spaces" to zero and it should fix it everywhere. But alas, poor me. I waited ten years to switch to Swift, and I didn't wait long enough to iron out the daily bugs.
Jan ’25
Reply to finding total commission paid to Apple for claiming back sales tax on commission
My accountant is telling me I can claim back the sales tax paid on Apple's commission. In my jurisdiction sales tax is 13% so I could get 13% of the 15% Apple commission for example, so almost 2% of my total sales (15 x 0.13 - 1.95%) as a tax credit. Are you sure that Apple paid, or was required to pay, HST on your total sales? Or only your Canadian sales? Be very careful of mixing and matching these different kinds of sales and taxes. In Canada at least, Apple sells software to consumers. Apple charges taxes on those sales to those consumers, then reports and remits those taxes to the CRA. That is totally separate from the income taxes that you pay to the CRA. You may be able to reclaim HST that you paid, but only if you are certain that said HST was actually payable and remitted to the CRA. The question here is the nature of of this commission that you pay to Apple. Is this commission taxed the same way as those "digital goods" that Apple sold to Canadians on your behalf? Back in 2021, the last time I was making any meaningful money from the App Store, Apple made a "Canada Tax on Commission Invoice" PDF available in App Store Connect. That PDF explicitly listed the HST paid on sales in Canada, much like my invoices from AWS and EasyDNS. The tax laws were crazy complicated in 2021 and they're only worse now. They will get even worse in the near future. The only advice I can give you is to make sure you have documentation to back up any tax claims that you make. If you don't have a form that explicitly lists the HST that you paid, then you're on thin ice if you try to take that money back.
Jan ’25
Reply to finding total commission paid to Apple for claiming back sales tax on commission
He's saying ignore the amount of money Apple puts in my bank account as my revenue, that my revenue numbers that Apple reports to the CRA will be pre-commission and pre-sales tax on commission. I then count the commission and the sales tax on it as expenses. He says if I don't do it this way I'll get audited since the numbers from Apple won't match what I'm submitting to the CRA. I would be cautious about filing any tax forms based on what someone claims that some other party is filing as part of their taxes. You are responsible for your taxes, not Apple's. My accountant is saying though that Apple should be charging me HST/GST on the service they provide of distributing the app globally, managing payments globally, etc. (i.e. the 15% commission). Since they provide this service for all global sales he's saying the HST/GST would apply on commission for all global sales. Should be? Is that what is really happening? Back in 2021, Apple did operate like this for sales to customers in Canada, and provided clear tax invoices documenting everything. But in 2021, the Canadian tax laws also radically changed. I'm not sure how it works today. What you are asking about here is one very specific way of doing business. Is this HST due on payment for supply of services? If so, do you have an invoice for that payment? Or is it more like royalties? One problem with all of this is that this little business that we're doing is quite unusual. Few people, including accountants, really understand it. It has radically changed in the recent past, and will radically change again in the near future. Maybe you should consider contacting CRA directly and asking them. I did that back before I got my app into the Mac App Store. The CRA was quite helpful.
Jan ’25
Reply to Learn Metal
Metal uses a subset of C++. Most of that code you're looking at is just the boilerplate setup code from years ago. That's why it still uses Objective-C. It should be easy to convert to Swift.
Topic: Graphics & Games SubTopic: Metal Tags:
Jan ’25
Reply to libncftp v. macOS Native curl with Secure Transport APIs and Session Reuse
I am working on adding RFC4217 Secure FTP with TLS by extending Mike Gleason's classic libncftp client library Why? I had an app years ago that supported FTP. One of the first bug reports I had was from someone connecting to a server on VMS. Any suggestions are welcomed that might shine a light on what native curl has access to that allows it to work with ST for these FTP secure-control+data use cases. That part is easy enough to solve. Just download Apple's curl source and look.
Topic: Privacy & Security SubTopic: General Tags:
Jan ’25
Reply to How does SpyBuster scan my iOS apps?
Apparently, all you need to do is ask them. See: www macobserver com/news/anti-spying-tool-spybuster-arrives-to-ios-thanks-to-ukrainian-developer-macpaw/ and www igen fr/app-store/2022/07/spybuster-detecte-les-applications-de-votre-iphone-en-lien-avec-la-russie-131429 (I guess the forum doesn't like those external links.) But apparently, there is a way to do it via StoreKit and it is allowed as per the Guidelines: don’t collect information about which other apps are installed on a user’s device for the purposes of analytics or advertising/marketing So I guess if you're doing it for any other reason, you're good to go.
Topic: Privacy & Security SubTopic: General Tags:
Jan ’25
Reply to How is an iOS app on the App Store able to detect other apps?!?!
Apparently, all you need to do is ask them. See: www macobserver com/news/anti-spying-tool-spybuster-arrives-to-ios-thanks-to-ukrainian-developer-macpaw/ and www igen fr/app-store/2022/07/spybuster-detecte-les-applications-de-votre-iphone-en-lien-avec-la-russie-131429 (I guess the forum doesn't like those external links.) But apparently, there is a way to do it via StoreKit and it is allowed as per the Guidelines: don’t collect information about which other apps are installed on a user’s device for the purposes of analytics or advertising/marketing So I guess if you're doing it for any other reason, you're good to go.
Topic: Privacy & Security SubTopic: General Tags:
Jan ’25