Post

Replies

Boosts

Views

Activity

Reply to Do I have to be a paid developer to develop MacOS programs for personal use?
Here is the entitlements output: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.security.app-sandbox</key> <true/> <key>com.apple.security.files.downloads.read-only</key> <true/> <key>com.apple.security.get-task-allow</key> <true/> <key>com.apple.security.network.client</key> <true/> <key>com.apple.security.network.server</key> <true/> <key>com.apple.security.personal-information.location</key> <true/> </dict> </plist> The certificate shows not valid before date of April 30, 2022 and a not valid after date of April 30, 2023.
May ’22
Reply to Do I have to be a paid developer to develop MacOS programs for personal use?
The error happened again today on my old 2014 MBA which is limited to Big Sur. It happened after the upgrade to 11.6. This time, whenever I try to start the app, I get a dump. Maybe it will help diagnose things: Process: FCC Database [1004] Path: /Applications/FCC Database.app/Contents/MacOS/FCC Database Identifier: FCC Database Version: ??? Code Type: X86-64 (Native) Parent Process: ??? [1] Responsible: FCC Database [1004] User ID: 501 Date/Time: 2022-05-16 18:29:20.133 -0400 OS Version: macOS 11.6.6 (20G624) Report Version: 12 Anonymous UUID: DAF76B35-38D8-E814-26F9-9397EDA649C7 Time Awake Since Boot: 1200 seconds System Integrity Protection: enabled Crashed Thread: 0 Exception Type: EXC_CRASH (Code Signature Invalid) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Reason: Namespace CODESIGNING, Code 0x1 kernel messages: VM Regions Near 0 (cr2): --> __TEXT 105451000-1054d9000 [ 544K] r-x/r-x SM=COW Thread 0 Crashed: 0 0x000000010fe0a000 _dyld_start + 0 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0000000000000000 rbx: 0x0000000000000000 rcx: 0x0000000000000000 rdx: 0x0000000000000000 rdi: 0x0000000000000000 rsi: 0x0000000000000000 rbp: 0x0000000000000000 rsp: 0x00007ffeea7aebc8 r8: 0x0000000000000000 r9: 0x0000000000000000 r10: 0x0000000000000000 r11: 0x0000000000000000 r12: 0x0000000000000000 r13: 0x0000000000000000 r14: 0x0000000000000000 r15: 0x0000000000000000 rip: 0x000000010fe0a000 rfl: 0x0000000000000200 cr2: 0x0000000000000000 Logical CPU: 0 Error Code: 0x00000000 Trap Number: 0 Thread 0 instruction stream not available. Thread 0 last branch register state not available. Binary Images: 0x105451000 - 0x1054d8fff +??? (0) <B8C214B1-A5BD-3CCD-ADB5-E79B13206011> (null) 0x10fe09000 - 0x10fea4fff + (852.2) <2E400646-C53E-329B-8301-2478447C89F8> External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 0 thread_create: 0 thread_set_state: 0 VM Region Summary: ReadOnly portion of Libraries: Total=2480K resident=0K(0%) swapped_out_or_unallocated=2480K(100%) Writable regions: Total=8416K written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=8416K(100%) VIRTUAL REGION REGION TYPE SIZE COUNT (non-coalesced) =========== ======= ======= STACK GUARD 56.0M 1 Stack 8192K 1 VM_ALLOCATE 8K 2 __DATA 272K 4 __DATA_CONST 48K 2 __LINKEDIT 1328K 3 __TEXT 1168K 2 =========== ======= ======= TOTAL 66.8M 15 Model: MacBookAir6,1, BootROM 433.120.6.0.0, 2 processors, Dual-Core Intel Core i5, 1.4 GHz, 4 GB, SMC 2.12f143 Graphics: kHW_IntelHD5000Item, Intel HD Graphics 5000, spdisplays_builtin Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1600 MHz, 0x02FE, 0x45424A3230554638454455302D474E2D4620 Memory Module: BANK 1/DIMM0, 2 GB, DDR3, 1600 MHz, 0x02FE, 0x45424A3230554638454455302D474E2D4620 AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x117), Broadcom BCM43xx 1.0 (7.77.111.1 AirPortDriverBrcmNIC-1680.9) Bluetooth: Version 8.0.5d7, 3 services, 19 devices, 1 incoming serial ports Network Service: Wi-Fi, AirPort, en0 Serial ATA Device: APPLE SSD TS0128F, 121.33 GB USB Device: USB 3.0 Bus USB Device: BRCM20702 Hub USB Device: Bluetooth USB Host Controller Thunderbolt Bus: MacBook Air, Apple Inc., 23.6
May ’22
Reply to How to keep a Settings scene from slowing a Mac app?
Okay, this makes no sense, or I am obviously missing something in my understanding of SwiftUI. If I declare my Settings scene as: Settings { FCCDatabaseSettings(fccData: fccData) } Where FCCDatabaseSettings is a view and fccData is an @StateObject, the map does not drag smoothly. If, OTOH, I declare it as: Settings { SettingsWrapper(fccData: fccData) } Where SettingsWrapper is a view that simply calls FCCDatabaseSettings struct SettingsWrapper: View { @ObservedObject var fccData: FCCData var body: some View { FCCDatabaseSettings(fccData: fccData) } } The map drags smoothly. What is going on?
May ’22
Reply to What is causing this error?
I figured it out. The warning is correct, the examples in Apple's documentation are incorrect. The following is from the DH entry for Map: struct AppleParkMap: View { @State private var region = MKCoordinateRegion( center: CLLocationCoordinate2D(latitude: 37.334_900, longitude: -122.009_020), latitudinalMeters: 750, longitudinalMeters: 750 ) var body: some View { Map(coordinateRegion: $region) } } This code is very similar to what I originally posted. It generates the same error. The issue is that the region object passed as a binding to the Map() constructor is part of the view's state. The Map object is modifying the binding as it is updating the view which is trying to update the view's state. The fix that works is to have the region be part of a ViewModel. class VM: NSObject, ObservableObject { @Published var region = MKCoordinateRegion( center: CLLocationCoordinate2D(latitude: 37.334_900, longitude: -122.009_020), latitudinalMeters: 750, longitudinalMeters: 750 ) } struct ContentView: View { @State private var vm = VM() var body: some View { Map(coordinateRegion: $vm.region) } } This code works without the issue.
Apr ’22
Reply to What is causing this error?
I am also seeing the CoreVideo messages reported in the other thread, but I suppress them by adding -cv_note 0 to the startup parameters. The issue is that this is creating a purple warning triangle in Xcode near the right side of the Xcode window. The warning has < and > indicators to view the previous and next issue. If I click either of those indicators, Xcode crashes. The error log indicates that Xcode is accessing an empty list. If I remove the call to Map() and re-run, the purple warning at the right side goes away, but one shows up to the right of the Scheme/Title bar at the top of the Xcode window. If I hover over that, the tip is Show Runtime Issues. If I click it it brings up the runtime issues navigator which is empty. I would like to know what's different about your setup that you are not getting the error message, or what's wrong with my setup. This is just a code snippet that reproduces the error for me. As to whether it runs correctly or not, that's not the issue. I don't like ignoring log noise in the output window, but if I have to start ignoring runtime issues in the issues navigator, that really reduces the usefulness of the issues navigator. I recompiled an MapKit app that I wrote a few months ago. It does not show this issue. The app was developed with a previous version of Xcode, but I just compiled it with the current version. No purple error issues.
Apr ’22
Reply to What is the replacement for OSAtomicCompareAndSwap32Barrier?
In this case, I found an answer. My C++ is rusty, but this works. The purpose of the call was to increment a pointer (mTimeBoundsQueuePtr) in a thread-safe manner. In CARingBuffer.h, at the top of the file, I added #include <atomic> and changed the declaration of mTimeBoundsQueuePtr at the bottom from UInt32 mTimeBoundsQueuePtr; to std::atomic<UInt32> mTimeBoundsQueuePtr; Then in CARingBuffer.cpp, I changed the last line of CARingBuffer::SetTimeBounds from CAAtomicCompareAndSwap32Barrier(mTimeBoundsQueuePtr, mTimeBoundsQueuePtr + 1, (SInt32*)&mTimeBoundsQueuePtr); to mTimeBoundsQueuePtr++;
Apr ’22