One of the programmers in the local BuckeyeCocoa group turned me on to this resource in the Mac App Store. It's not free.
A Companion for SwiftUI
Post
Replies
Boosts
Views
Activity
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.
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
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?
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.
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.
Does uu + vv = 1 or uu + vv = t help?
u and v are points on a unit circle on the u and v axes.
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++;
I've done additional testing and it appears my conclusions about the sample rate were wrong. When I change the format to 8000 Hz sample rate, while the srcNode render block is still called ever 0.0106 seconds, it is only requesting 85 or 86 samples which corresponds to the lower sample rate. So I think the ringBuffer is working.
Thanks for the reply, but I'm still not clear. The atomic reference shows a function that take 4 parameters and returns a bool. The CAAtomicCompareAndSwap32Barrier takes 3 parameters and doesn't return a value. How do I map the CAAtomic parameters to the atomic parameters?
Can someone explain what the parameters to CAAtomic... are and what the function does to them?
Thanks,
Mark
I recompiled my app with a non-paid developer key set to run locally the other day. Today, when I tried to launch the app, I again got the above error.
Me too, on an existing project, but not a brand new project (just the simple "Hello, World" starter app).
Thanks - I searched all over the Apple Developer site and couldn't find the link. It looks like xcodereleases is a non-apple site that links to the Apple downloads.
Mark
private (set) helps. Thanks.
I think I figured it out. URLSession uses a user agent of the application bundle name / build. Somehow the build setting on my program was cleared so the user agent was / (Unknown version number). That was causing the FCC's server to reject my request. I change the build number in Xcode and I can download my file.