Post not yet marked as solved
Prior to Sonoma 14.0 and Xcode 15.0.1 my custom class was encoded in a consistent pattern that I exploited to append the file many thousands of times. Now, the encodings are of a seemingly random pattern that cannot be exploited to append. This may be a result of efforts to make the encoding more efficient or virtually any other reason.
My questions are:
how do I revert to the previous JSONEncoder while using current OS & Xcode versions?, i.e, what files and in what locations do I restore?
is it likely to be sustainable if I did so?
It has been previously noted that atomic files are not "append able" which is why I used JSON in the first place.
Any info or suggestion is appreciated. Thank you.
Post not yet marked as solved
Is there any API to check which microphone mode is active for my macOS application?
There is API to check microphone mode for AVCaptureDevice. But the status bar allows to select Microphone mode for an application that reads Microphone Audio (not for Microphone itself).
Post not yet marked as solved
after subscribing, I want to have users log in for a few reasons core to the functionality of the app. However, Apple has requirements about this, stating it needs to be optional.
however, I want to have my backend layer secure so that we check a user session each time a request is made, without a check its basically open to the public which I don’t like. Without a login, there is no session To provide.
we use RevenueCat for managing subscriptions But I don’t want to rely on their servers for checking subscription status…is that the only option?
do I have an option to secure my api layer another way, without login session?
Hi there,
I would like to implement a search bar into my existing list, filled with NavigationLinks. Is there a possibility to mark all my existing NavigationLinks with variables that I can show them in my search list?
I am still quite new to SwiftUI so I would love to hear from you.
Here is my code:
var body: some View {
NavigationView {
List {
Group {
NavigationLink(destination: MidazolamLink()){
Image("MidazolamMediLabel")
.resizable()
.frame(width:60, height: 30)
Text("Midazolam")
}
NavigationLink(destination: NaloxonLink()){
Image("NaloxonMediLabel")
.resizable()
.frame(width:60, height: 30)
Text("Naloxon")
}
NavigationLink(destination: ParacetamolLink()){
Image("ParacetamolMediLabel")
.resizable()
.frame(width:60, height: 30)
Text("Paracetamol")
}
NavigationLink(destination: PrednisolonLink()){
Image("PrednisolonMediLabel")
.resizable()
.frame(width:60, height: 30)
Text("Prednisolon")
}
NavigationLink(destination: SalbutamolLink()){
Image("SalbutamolMediLabel")
.resizable()
.frame(width:60, height: 30)
Text("Salbutamol")
}
NavigationLink(destination: SauerstoffLink()){
Image("SauerstoffMediLabel")
.resizable()
.frame(width:60, height: 30)
Text("Sauerstoff")
}
NavigationLink(destination: UrapidilLink()){
Image("UrapidilMediLabel")
.resizable()
.frame(width:60, height: 30)
Text("Urapidil")
}
NavigationLink(destination: VollelektrolytloesungLink()){
Image("VollelektrolytloesungMediLabel")
.resizable()
.frame(width:60, height: 30)
Text("Vollelektrolytlösung")
}
}
}
.background(Color.clear)
.listStyle(SidebarListStyle())
.navigationTitle("Medikamente")
.toolbar {
NavigationLink(destination: About()){
Image(systemName: "info.circle")
}
NavigationLink(destination: Settings()){
Image(systemName: "gear")
}
}
BackgroundMedikamente()
}
}
}
Thank you so much for your help!
Laurin
Post not yet marked as solved
Hello
Can anyone tell me what the current limits/pricing is for the public database in Cloudkit.
A lot of the information online is out of date and I can't seem to find any up to date information. I believe there used to be a calculator and I also think that limits expanded with number of active users.
Any links or info would be great thanks.
Post not yet marked as solved
I want to use DriverKit to develop a USBDriver, which serves as a bridge between USB devices and the system. All messages between USB devices and the system will be forwarded through the USBDriver.
Can anyone give me some tips or suggestions? What API should I use? I couldn't find anything like this in the documentation or sample code.
class MyUSBDriver: public IOUserClient
{
public:
virtual bool init() override;
virtual kern_return_t Start(IOService * provider) override;
virtual kern_return_t Stop(IOService * provider) override;
virtual void free() override;
virtual kern_return_t GetRegistryEntryID(uint64_t * registryEntryID) override;
virtual kern_return_t NewUserClient(uint32_t type, IOUserClient** userClient) override;
virtual kern_return_t ExternalMethod(uint64_t selector,
IOUserClientMethodArguments* arguments,
const IOUserClientMethodDispatch* dispatch,
OSObject* target,
void* reference) override;
};
I am now able to retrieve the device descriptor in the Start method
IOUSBHostDevice *device = OSDynamicCast(IOUSBHostDevice, provider);
if (device) {
const IOUSBDeviceDescriptor *deviceDescriptor = device->CopyDeviceDescriptor();
if (deviceDescriptor) {
uint16_t idVendor = deviceDescriptor->idVendor;
uint16_t idProduct = deviceDescriptor->idProduct;
uint8_t iSerialNumber = deviceDescriptor->iSerialNumber;
IOUSBHostFreeDescriptor(deviceDescriptor);
}
}
Post not yet marked as solved
Hello. Can anyone offer any feedback on using an iMac 24 inch for app development?
Is a 24 inch display frustratingly small (as compared to a 27 inch) or is it acceptable?
Post not yet marked as solved
I am trying to add Widget Complications to an existing Apple Watch app. I added the WatchOS widgets extension and followed instructions to create static, non-updating complications to merely launch the app from the watch home screen.
Here is my code in the widget extension:
import WidgetKit
import SwiftUI
struct Provider: TimelineProvider {
func getSnapshot(in context: Context, completion: @escaping (SimpleEntry) -> Void) {
}
func getTimeline(in context: Context, completion: @escaping (Timeline<SimpleEntry>) -> Void) {
}
func placeholder(in context: Context) -> SimpleEntry {
SimpleEntry(date: Date())
}
func snapshot(in context: Context) async -> SimpleEntry {
SimpleEntry(date: Date())
}
}
struct SimpleEntry: TimelineEntry {
let date: Date
}
struct TrapScores_WidgetsEntryView : View {
@Environment(\.widgetFamily) var widgetFamily
var entry: Provider.Entry
var body: some View {
switch widgetFamily {
case .accessoryCorner:
ComplicationCorner()
case .accessoryCircular:
ComplicationCircular()
case .accessoryRectangular:
Text("TrapScores")
case .accessoryInline:
Text("TrapScores")
@unknown default:
//mandatory as there are more widget families as in lockscreen widgets etc
Text("AppIcon")
}
}
}
@main
struct TrapScores_Widgets: Widget {
let kind: String = "TrapScores_Complications"
var body: some WidgetConfiguration {
StaticConfiguration(kind: kind, provider: Provider()) { entry in
TrapScores_WidgetsEntryView(entry: entry)
.containerBackground(.fill.secondary, for: .widget)
}
.configurationDisplayName("TrapScores")
.description("This will launch TrapScores App")
.supportedFamilies([.accessoryCorner, .accessoryCircular])
}
}
struct ComplicationCircular: View {
var body: some View {
Image("Graphic Circular")
.widgetAccentable(true)
.unredacted()
}
}
struct ComplicationCorner: View {
var body: some View {
Image("Graphic Circular")
.widgetAccentable(true)
.unredacted()
}
}
#Preview(as: .accessoryCircular) {
TrapScores_Widgets()
} timeline: {
SimpleEntry(date: .now)
}
The complications appear fine in the preview:
The complication can be added to the watch face, but no graphic comes with it and it is a blank circle:
Any suggestions on what I'm doing wrong?
Post not yet marked as solved
I have a project where I m making direct swift calls from cpp as introduced in swift5.9. Below is my swift class whose method is being invoked on cpp.
import Foundation
public class MySwiftClass
{
public static func testInterop () -> Void {
NSLog("----------- hey --------")
}
}
I m able to successfully invoke 'testInterop()' in cpp with the above class, however if I add conformance to NSObject in the 'MySwiftClass' class, then the swift call fails with the error "No member named 'MySwiftClass' in namespace 'Module2'", where Module2 is my swift target.
I m not able to identify why is this happening. Any help?
Post not yet marked as solved
Hello!
We already have a public app on the AppStore. And we are trying to create another app to distribute to organizations privately.
Now, we did some digging and have some queries about the whole process which are as follows:
What type of account do we need as the developer team, meaning which programs we need to enroll to and what type of account does our customer organization need to use the app, privately?
We do not have a hundred or more employees which is an eligibility criterion for enrollment in the Enterprise Program. How can we proceed to distribute apps to organizations privately with out situation?
Do the customer organizations need Enterprise account for each app we publish?
Thanks!
Post not yet marked as solved
As the title said,
My team has been working on an app that use CATiledLayer as our main solution for the biz requirements. Our team has a plan to migrate to SwiftUI in place of UIKit, I wonder if there are any equivalence for CATiledLayer in SwiftUI?
Post not yet marked as solved
Using iOS 17 I notice when I compose an MSMessage and insert it into the active conversation and send it in the simulator the message does not appear in the the message thread.
The didStartSending(_ message: MSMessage, conversation: MSConversation) function is called when the message is sent, but there are no errors.
I'm expecting there is an error with iOS 17 Simulator and sending messages. Also, being able to debug sending a message and going to the receiver to open the message still crashes. I hope this gets solved as well as it makes it very hard to test iMessage apps.
Post not yet marked as solved
When I try to submit a build to a public TestFlihgt Group, I get the following error:
This build is using a beta version of Xcode and can’t be submitted. Make sure you’re using the latest version of Xcode or the latest seed release found on the releases tab in News and Updates
Adding new builds was working fine earlier today, about 5 hours ago. I am not using a beta version of Xcode, just the latest version downloaded from the App Store, version 15.0.1 (15A507). Also, this is not the first build of this group, as I have added many builds to this group before, even a few hours before this error with the same hardware and software configuration. I am using a MacBook Pro M2 Pro, running macOS Ventura 14.1 (23B74).
Post not yet marked as solved
the details is:
Failed to install the app on the device.
Domain: com.apple.dt.CoreDeviceError
Code: 3002
User Info: {
DVTErrorCreationDateKey = "2023-11-03 03:51:49 +0000";
IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker;
NSURL = "file:///Users/leo/Library/Developer/Xcode/DerivedData/SWSMCipher-dpgxylvyokngegautzlogdlbxkkl/Build/Products/Debug-iphoneos/SWSMCipher.app/";
}
The item at SWSMCipher.app is not a valid bundle.
Domain: com.apple.dt.CoreDeviceError
Code: 3000
Failure Reason: Failed to get the identifier for the app bundle.
User Info: {
NSURL = "file:///Users/leo/Library/Developer/Xcode/DerivedData/SWSMCipher-dpgxylvyokngegautzlogdlbxkkl/Build/Products/Debug-iphoneos/SWSMCipher.app/";
}
Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : {
"device_isCoreDevice" = 1;
"device_model" = "iPhone15,5";
"device_osBuild" = "17.1 (21B80)";
"device_platform" = "com.apple.platform.iphoneos";
"dvt_coredevice_version" = "348.1";
"dvt_mobiledevice_version" = "1643.40.14";
"launchSession_schemeCommand" = Run;
"launchSession_state" = 1;
"launchSession_targetArch" = arm64;
"operation_duration_ms" = 5;
"operation_errorCode" = 3000;
"operation_errorDomain" = "com.apple.dt.CoreDeviceError.3002.com.apple.dt.CoreDeviceError";
"operation_errorWorker" = IDEInstallCoreDeviceWorker;
"operation_name" = IDERunOperationWorkerGroup;
"param_debugger_attachToExtensions" = 0;
"param_debugger_attachToXPC" = 1;
"param_debugger_type" = 3;
"param_destination_isProxy" = 0;
"param_destination_platform" = "com.apple.platform.iphoneos";
"param_diag_MainThreadChecker_stopOnIssue" = 0;
"param_diag_MallocStackLogging_enableDuringAttach" = 0;
"param_diag_MallocStackLogging_enableForXPC" = 1;
"param_diag_allowLocationSimulation" = 1;
"param_diag_checker_tpc_enable" = 1;
"param_diag_gpu_frameCapture_enable" = 0;
"param_diag_gpu_shaderValidation_enable" = 0;
"param_diag_gpu_validation_enable" = 0;
"param_diag_memoryGraphOnResourceException" = 0;
"param_diag_queueDebugging_enable" = 1;
"param_diag_runtimeProfile_generate" = 0;
"param_diag_sanitizer_asan_enable" = 0;
"param_diag_sanitizer_tsan_enable" = 0;
"param_diag_sanitizer_tsan_stopOnIssue" = 0;
"param_diag_sanitizer_ubsan_stopOnIssue" = 0;
"param_diag_showNonLocalizedStrings" = 0;
"param_diag_viewDebugging_enabled" = 1;
"param_diag_viewDebugging_insertDylibOnLaunch" = 1;
"param_install_style" = 0;
"param_launcher_UID" = 2;
"param_launcher_allowDeviceSensorReplayData" = 0;
"param_launcher_kind" = 0;
"param_launcher_style" = 99;
"param_launcher_substyle" = 8192;
"param_runnable_appExtensionHostRunMode" = 0;
"param_runnable_productType" = "com.apple.product-type.application";
"param_structuredConsoleMode" = 1;
"param_testing_launchedForTesting" = 0;
"param_testing_suppressSimulatorApp" = 0;
"param_testing_usingCLI" = 0;
"sdk_canonicalName" = "iphoneos17.0";
"sdk_osVersion" = "17.0";
"sdk_variant" = iphoneos;
}
System Information
macOS Version 14.1 (Build 23B74)
Xcode 15.0.1 (22266) (Build 15A507)
Timestamp: 2023-11-03T11:51:49+08:00
Post not yet marked as solved
I have a C++ project that I've been compiling successfully for the past ten years in Xcode without difficulty. With Xcode 15 though, I've been getting the following error (I've attached the build steps). I'm struggling to diagnose this. Can anyone provide some tips? Thanks!
error: Cycle in dependencies detected, but could not be parsed. Please file a bug report with the build transcript and how to reproduce the cycle if possible.
Raw dependency cycle trace:
target: ->
node: <all> ->
command: <all> ->
node: /Users/helin/Library/Developer/Xcode/DerivedData/SHLib-ddxgkmfazmozquaxvjjfvevhpkcb/Build/Intermediates.noindex/EagerLinkingTBDs/Release ->
command: P0:::CreateBuildDirectory /Users/helin/Library/Developer/Xcode/DerivedData/SHLib-ddxgkmfazmozquaxvjjfvevhpkcb/Build/Intermediates.noindex/EagerLinkingTBDs/Release ->
node: /Users/helin/Library/Developer/Xcode/DerivedData/SHLib-ddxgkmfazmozquaxvjjfvevhpkcb/Build/Intermediates.noindex ->
command: P0:::CreateBuildDirectory /Users/helin/Library/Developer/Xcode/DerivedData/SHLib-ddxgkmfazmozquaxvjjfvevhpkcb/Build/Intermediates.noindex ->
CYCLE POINT ->
node: / ->
directoryTreeSignature: ->
directoryContents: / ->
node: /
Post not yet marked as solved
In visionOS, in order to fully implement Group Activities, do we need to write additional code?
Post not yet marked as solved
PHPickerViewController 选择图片后直接奔溃 iPhone是 iOS 14+ 系统测试的



崩溃信息是:
线程 2:“无法从<_NSProgressProxy 0x281b0ed00>中删除键路径 \”fractionCompleted\“ 的观察者 <PUPhotosFileProviderItemProvider 0x28003db80>,因为它未注册为观察者。
B K(英语:B K)
Post not yet marked as solved
I cannot submit new test flight builds to External Testing, I was able to do it yesterday. I've tried with both my Mac Mini & Macbook air both running xcode version: 15.0.1 (15A507)
I've tried both using Xcode Cloud & manually archiving the builds but no matter what I get the error.
This build is using a beta version of Xcode and can’t be submitted. Make sure you’re using the latest version of Xcode or the latest seed release found on the releases tab in News and Updates
I've even deleted and completely reinstalled xcode with no luck, please send help.
Post not yet marked as solved
I have developed a macos app.
in the app, launchd .plist file to run a shell script. (.plist file's location is /Library/LaunchAgents/)
In the script, I use below code to output log info.
Before update to sonoma , it worked well.
local FileLogsTask="/var/log/my_task.log"
echo ${Timestamp}:${Msg} >> "${FileLogsTask}"
After updated to sonoma.
I found old my_task.log was lost
After script is executed, my_task.log was not created
「/var/log/my_task.log: Permission denied」error is outputted
Has anyone encountered similar problems, know how to solve this problem?
Post not yet marked as solved
___exceptionPreprocess + 164
1
libobjc.A.dylib
_objc_exception_throw + 60
2
Foundation
__userInfoForFileAndLine
3
UIFoundation
-[NSTextRange initWithLocation:endLocation:] + 468
4
UIFoundation
___70-[NSTextParagraph enumerateSubstringsFromLocation:options:usingBlock:]_block_invoke + 132
5
Foundation
-[NSString enumerateSubstringsInRange:options:usingBlock:] + 1592
6
UIFoundation
-[NSTextParagraph enumerateSubstringsInRange:options:usingBlock:] + 180
7
UIFoundation
-[NSTextParagraph enumerateSubstringsFromLocation:options:usingBlock:] + 300
8
UIFoundation
___74-[NSTextLayoutManager enumerateSubstringsFromLocation:options:usingBlock:]_block_invoke_4 + 332
9
UIFoundation
-[NSTextContentStorage enumerateTextElementsFromLocation:options:usingBlock:] + 3908
10
UIFoundation
-[NSTextLayoutManager enumerateSubstringsFromLocation:options:usingBlock:] + 196
11
UIKitCore
-[_UITextKit2LayoutController rangeOfCharacterClusterAtIndex:type:] + 312
12
UIKitCore
-[UITextInputController _rangeForBackwardsDelete] + 104
13
UIKitCore
___39-[UITextInputController deleteBackward]_block_invoke + 120
14
UIKitCore
-[UITextInputController _performWhileSuppressingDelegateNotifications:] + 48
15
UIKitCore
-[UITextInputController deleteBackward] + 172
16
UIKitCore
-[UITextView deleteBackward] + 40
17
UIKitCore
-[UIKBInputDelegateManager _deleteBackwardAndNotify:reinsertText:overrideOriginalContextBeforeInputWith:] + 472
18
UIKitCore
-[UIKeyboardImpl deleteBackwardAndNotifyAtEnd:deletionCount:reinsertTextInLoop:] + 248
19
UIKitCore
-[UIKeyboardImpl performKeyboardOutput:checkingDelegate:forwardToRemoteInputSource:] + 1424
20
UIKitCore
-[UIKeyboardImpl performKeyboardOutput:forwardToRemoteInputSource:] + 32
21
UIKitCore
___77-[UIKeyboardImpl _processInputViewControllerKeyboardOutput:executionContext:]_block_invoke + 480
22
UIKitCore
-[UIKeyboardImpl _performKeyboardOutput:respectingForwardingDelegate:] + 252
23
UIKitCore
-[UIKeyboardImpl _processInputViewControllerKeyboardOutput:executionContext:] + 168
24
UIKitCore
-[UIKeyboardImpl performOperations:withTextInputSource:] + 56
25
UIKitCore
___67-[UIKeyboardImpl(UIKitInternal) _performInputViewControllerOutput:]_block_invoke + 168
26
UIKitCore
-[UIKeyboardTaskEntry execute:] + 208
27
UIKitCore
-[UIKeyboardTaskQueue continueExecutionOnMainThread] + 324
28
Foundation
___NSThreadPerformPerform + 264
29
CoreFoundation
___CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
30
CoreFoundation
___CFRunLoopDoSource0 + 176
31
CoreFoundation
___CFRunLoopDoSources0 + 244
32
CoreFoundation
___CFRunLoopRun + 828
33
CoreFoundation
_CFRunLoopRunSpecific + 608
34
GraphicsServices
_GSEventRunModal + 164
35
UIKitCore
-[UIApplication _run] + 888
36
UIKitCore
_UIApplicationMain + 340