Posts

Post not yet marked as solved
5 Replies
311 Views
I just wasted quite a lot of time on this .. so in case somebody else checks in here, beware that the following: formatted(dateTime.hour(.defaultDigits(amPM: .omitted))) does, indeed omit AM/PM, but it doesn't change to using a 24 hour clock. Instead, hours cycle through 1...12 twice a day.
Posted Last updated
.
Post not yet marked as solved
0 Replies
2.8k Views
Building a large science software package on macOS11.6 with only the Command Line Tools (CLT) installed (Xcode is not installed). All was working while MacOSX11.sdk was the newest SDK (which was true when the project started last year), but a recent re-install of CLT advanced support to MacOSX12.sdk which adds one new method to NSBundle.h (localizedAttributedStringForKey) that is tripping up clang. Isolated testing shows compiling against MacOSX11.sdk does still work correctly. Since CLT's default is to use the most recent SDK, builds now fail with a compilation error when Foundation's NSBundle.h is reached. Installing CLT creates SDK directories for the range of versions of macOS that are supported by the equivalent Xcode for example (from a Monterey Mac): √ ~ % ls -l /Library/Developer/CommandLineTools/SDKs total 0 lrwxr-xr-x 1 root wheel 14 Mar 15 10:23 MacOSX.sdk -> MacOSX12.3.sdk drwxr-xr-x 7 root wheel 224 Nov 30 2020 MacOSX11.1.sdk drwxr-xr-x 7 root wheel 224 Mar 15 10:24 MacOSX11.3.sdk lrwxr-xr-x 1 root wheel 14 Mar 15 10:23 MacOSX11.sdk -> MacOSX11.3.sdk drwxr-xr-x 7 root wheel 224 Feb 23 11:14 MacOSX12.3.sdk lrwxr-xr-x 1 root wheel 14 Mar 15 10:23 MacOSX12.sdk -> MacOSX12.3.sdk √ ~ % I believe there is no way to set the global environment to select the SDK that CLT should use for headers, libraries, etc. Two low-level options are to (1) change to xcrun —sdk *** clang or (2) use -isysroot to select the MacOSX11.sdk includes, but changing the many, many makefiles to do either is unacceptable (and would need conditionals for Linux). Is there a way to coerce CLT to not use the most recent SDK? xcode-select -s .. has been mentioned in other forums but is irrelevant because there is no Xcode on the Mac. And, since this package will be distributed to people for whom make is the tool of choice, Xcode is not an option. PS: my theory is that the new localizedAttributedStringForKey method needs a Monterey version of clang with a new feature related to concurrency support and Big Sur gives you an older clang without that feature, hence compiler barfing .. Gavin Eadie, Ann Arbor MI
Posted Last updated
.
Post not yet marked as solved
4 Replies
5.7k Views
I have been asked the above question by a long-time developer, and I don't know the answer. To find out I fired up Xcode (11.0beta6), added my non-developer AppleID to the account preferences, flipped the signing team from my developer account to the new "Gavin Eadie (Personal Team)," hardened the app, archived it and tried to send it for notification with "Developer ID" selected as the distribution method.My non-dev account was happily given an "Apple Development Certificate" via Xcode (visible in account prefs) but notarizing was refused by: Team "Gavin Eadie (Personal Team)" is not enrolled in the Apple Developer Program.Is "enrolled in the Apple Developer Program" the same as "hasn't paid $99 this year"? And how did I get a Apple Development Certificate if I'm not enrolled? The documentation around this feature is astonishly confusing. Is the "Apple Development Certificate" that Xcode got me not a "Developer ID certificate" as referenced in the following Xcode help text?"In some cases, you may want to distribute an app outside of the Mac App Store. Because the app won’t be distributed by Apple, assure users that you are a trusted developer by signing your app with a Developer ID certificate. Users gain additional assurance if your Developer ID-signed app is also notarized by Apple.""A notarized app is a macOS app that was uploaded to Apple for processing before it was distributed. When you upload a macOS app to be notarized by Apple, you’ll select Developer ID as the distribution method and it’ll be code signed with a Developer ID Application certificate."
Posted Last updated
.
Post marked as solved
4 Replies
687 Views
In WWDC2020 session, "What's New in Swift," around the 27m30s mark, mention is made of the "Swift System" library, which looks extremely useful. Is there any more information available on this yet?
Posted Last updated
.
Post not yet marked as solved
2 Replies
1.6k Views
When making a connection to a hostname, the Network framework explicitly selects the 'best' internet address to use. For some use cases, for example NTP, the application would like to obtain all the internet addresses. For example, the hostname "time.apple.com" resolves to five internet addresses:% host time.apple.com time.apple.com is an alias for time-osx.g.aaplimg.com. time-osx.g.aaplimg.com has address 17.253.20.253 time-osx.g.aaplimg.com has address 17.253.24.125 time-osx.g.aaplimg.com has address 17.253.20.125 time-osx.g.aaplimg.com has address 17.253.14.125 time-osx.g.aaplimg.com has address 17.253.24.253This information is readily available from `getaddrinfo` but I was wondering if the Network framework had a provision for revealing all such addresses? My hunting suggests not. Invoking `getaddrinfo` from Swift is a bit of a pig, but if that's the way, so be it!
Posted Last updated
.
Post not yet marked as solved
1 Replies
1k Views
To familiarize myself with the process, before getting real, I tried to build a Watch-only app from the Xcode 11.2.1 template. The build fails when it attempts to move an item into a file, instead of into a directory. I can hardly believe this isn't something corrupt in my Xcode environment, but it is happening on multiple Macs.I created a new project "Watch App" at `~/Development/Watch` and ran xcodebuild from that directory. There is quite a lot of successful work done, but the last command (failing) in the build log is (with `...` representing `~/Development`): PBXCp .../Watch/build/Release-watchos/Watch\ WatchKit\ App.app \ .../Watch/build/Release-iphoneos/Watch.app/Watch/Watch\ WatchKit\ App.appbecause error: make directory .../Watch/build/Release-iphoneos/Watch.app/Watch/Watch WatchKit App.app: Not a directoryIt's failing because `.../Watch/build/Release-iphoneos/Watch.app/Watch` is not a directory (nor should it be). Is this an Xcode bug (I've seen no reference to it from Apple or in Google searchs), or some stupidity on my part?If someone would be generous enough do a quick build from that template to verify my finding, I'll file a bug report, else I'll reinstall Xcode again.
Posted Last updated
.