I am trying to add macOS as a new platform version to a universal app, which currently has an iOS and visionOS version. Every time I try I receive this error - "macOS: There was an unexpected error while adding this platform."
I submitted a Feedback - FB14001529
I also submitted a TSI and a contact us report through App Store Connect. Any help from Apple on this issue would be great.
Thanks,
David
Posts under macOS tag
200 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
I was my understanding that you're supposed to be able to open a .ips crash log in Xcode and see pretty much what you would see if the app had been running in the debugger when it crashed. But the addresses in my app don't get symbolicated. I opened the .ips in the same project and same version of Xcode that was used to create the app. The .dSym file is around, and I can use it to symbolicate using the atos tool. What am I missing?
We have a Privileged Helper tool that we install with SMJobBless. I would like to debug it.
I've added WaitForDebugger in our helper tool launchd plist and it does wait.
But I can't attach to it via Debug->Attach to Process in Xcode with error:
Code: 3
Failure Reason: tried to attach to process as user 'myusername' and process is running as user 'root'
I set Debug process as: root in scheme settings. But I'm not sure if it does anything since I'm not running this particular scheme at the moment of attach.
I tried unsuccessfully to set "Wait for the executable to be launched" but I had to create a new scheme for it since helper is built as part of the main app so maybe I did something wrong.
Am I doing something wrong or is it not possible to attach to root process?
I am having problems building an Unreal project in Xcode.
The problem starts when the compiler starts to build a custom made plugin, that works perfectly fine on windows.
When looking at the log, it seems that I will have to rebuild the plugin for macOS-arm64, does anyone have some ideas how I should approach?
Showing All Messages
------ Building 4 action(s) started ------
[1/4] Link [Apple] Trancendent
Undefined symbols for architecture arm64:
"ExampleLibraryFunction()", referenced from:
FTrancendantMetaNodesModule::StartupModule() in Module.TrancendantMetaNodes.cpp.o
ld: symbol(s) not found for architecture arm64
/Users/Shared/Epic Games/UE_5.3/ld:1:1: ignoring file /Users/nicolaslefevre/Desktop/KanuziTemple/Plugins/TrancendantMetaNodes/Source/ThirdParty/TrancendantMetaNodesLibrary/Mac/Release/libExampleLibrary.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
Total time in Parallel executor: 2.18 seconds
Total execution time: 2.95 seconds
/Users/Shared/Epic Games/UE_5.3/clang:1:1: linker command failed with exit code 1 (use -v to see invocation)
I'm seeking some help or guidance. I'm attempting to write an app for private use that listens for HID events from a RF reader and responds.
I have a functional app, which has to be launched via sudo, to be able to execute IOHIDManagerOpen(manager, IOOptionBits(kIOHIDOptionsTypeSeizeDevice)) correctly. I'm trying to modify this app, now, to use SMAppService and bypass the need for terminal and sudo, but I'm getting confused at what parts of my code need to be embedded into the helper and how to manage communications between the different components.
I make it to step 8 in https://developer.apple.com/forums/thread/721737 before I start getting lost.
Does anyone know of a functional, SIMPLE, sample app I could take a look at, or a good guide that lays out all parts of an example? Everything I've found gives the bones but no meat.
Default behaviour of the macOS when interacting via Finder with a network share is to create thumbnails to provide a nice user experience. This behaviour is implemented by QuickLook framework.
This triggers the full file download and quickly lead to cache using large disk space and even cache trashing.
We can disable QuickLook selectively by injecting specially prepared .DS_Store file with instruction/setup to disable thumbnails in that directory but still degrades user's experience only in the network share ecosystem.
Is there any way we can provide our own thumbnails or ask Finder to not download full file to generate the thumbnail?
Hi guys,
🙏I have a problem with repeated saving to the database. If I do the first update it is OK, but after the second attempt the update fails and the console says "Failed to commit transaction: database is locked".
Here is my function:
func updateMapCoordinates(radius: Int32) {
// Otevření databáze, pokud není otevřená
guard db != nil else {
print("Database connection is nil")
return
}
var statement: OpaquePointer? = nil
let updateQuery = "UPDATE \(mapTable) SET radius = ? WHERE id = 1;"
// Začátek transakce
if sqlite3_exec(db, "BEGIN TRANSACTION", nil, nil, nil) != SQLITE_OK {
let errorMessage = String(cString: sqlite3_errmsg(db))
print("Failed to begin transaction: \(errorMessage)")
return
}
if sqlite3_prepare_v2(db, updateQuery, -1, &statement, nil) == SQLITE_OK {
sqlite3_bind_int(statement, 1, radius)
print("uložím \(radius)")
if sqlite3_step(statement) == SQLITE_DONE {
print("Coordinates saved successfully")
} else {
let errorMessage = String(cString: sqlite3_errmsg(db))
print("Failed to save coordinates: \(errorMessage)")
}
} else {
let errorMessage = String(cString: sqlite3_errmsg(db))
print("SAVE statement could not be prepared: \(errorMessage)")
}
// Finalizace statementu
sqlite3_finalize(statement)
// Ukončení transakce
if sqlite3_exec(db, "COMMIT", nil, nil, nil) != SQLITE_OK {
let errorMessage = String(cString: sqlite3_errmsg(db))
print("Failed to commit transaction: \(errorMessage)")
sqlite3_exec(db, "ROLLBACK", nil, nil, nil)
}
}
I am working with a compiler that produces native binaries, It's really meant for servers so it's not integrated with Xcode or the Xcode build system. As such the output binaries get the default ad-hoc signatures the linker makes.
After (re)compiling such a binary, there is a delay whilst running it. This is because macOS notices it's an unknown binary and goes off to ask notarization servers/Xprotect if it's known malware. Fine, I understand the need for this and why it happens.
From the logs it's clear that macOS is now tracking the "provenance" of binaries. This means where they came from. This raises the question of whether it could know that my local dev binaries are coming from this compiler, if it was in turn properly signed and notarized. And if so, whether there is some security policy I could set to say "if binary X produces binary Y, then trust Y".
Yes I know this would be a security exploit if it were done that way by default, but I am willing to take the risk of special malware that compiles itself first using this special compiler that isn't installed by default then runs the output, as presumably any such malware would be so targeted Xprotect/notarization wouldn't know about it anyway.
The provenance mechanism is some internal security thing and isn't documented, but I'm curious if anyone knows more about it and whether it's usable for this? Or alternatively if there's a way to stop macOS doing these slow checks for certain binaries e.g. under specific paths?
See crash details here:- https://pastebin.com/i9u5PE4X
There's a comprehensive thread here, folks!
https://discussions.apple.com/thread/255651156?sortBy=oldest_first
Thanks for any thoughts.
I already have an iOS app accepted on the App Store, and now I want to add a macOS platform version.
I created a new Xcode project and used the same bundle ID as my iOS app.
When I tried to upload the macOS bundle, I encountered the following error:
Invalid Provisioning Profile. The provisioning profile included in the bundle ABC.123456 [ABC.123456.pkg/Payload/ABC.app] is invalid. [Invalid 'com.apple.application-identifier' entitlement value.] For more information, visit the macOS Developer Portal. (ID: xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx)
I found that this problem occurs when the "Team ID" and "App ID Prefix" are different. How can I make them match?
hi im runing beta on my macbook pro m1 and after i insert one 256gb sd it gets corrupted!! even after i reformat it, its gets corrupted once again, im trying with another one and do it also. anyone have a problem like this??
the two micro ds have fat32 format
precaution !!
we found new crash about UIFont since iOS 18 beta published.This crash never occurred on previous operating system. Can anyone give the answer that how to fix it and tell whether later beta version might fix it.
While binding to the Shared User Defaults in .xib files is very easy I had hard times to achieve application wide preferences in projects based on storyboards. The behavior is a bit strange/unexpected and even in Xcode 15.4 it seams not to be completely solved. Issue is that IB only creates a single instance of a Shared User Default controller for the first scene, where it was requested and linking to this instance from other scenes offers no functionality. Even worse IB suggests this as first binding proposal. Here an example to deal with this issue.
add slider and label to view of ViewController in IB storyboard
add MenuItem to windows menu in the Application Scene
When running the app this menu item remains disabled as no action is connected
bind value of the created menu item to the Shared User Defaults with Model Key Path: “showTerminal“
This creates a Shared User Defaults Controller instance that we use later.
Now running the app the menu item is enabled and the checkmark toggles each time
add a checkbox to the view
add a User Default Controller to the View Controller Scene
This must be repeated for any further Window- or View- Controller scene where a binding to the user defaults is required.
bind the checkbox to the newly added User Defaults Controller (but not the Shared User Defaults Controller) keeping the suggested Controller key values and set the Model Key Path to “showTerminal“ as above
now bind the slider and the label to the same User Defaults controller using an identical Model key
If accidentally bound to the Shared User Defaults Controller (this is what IB suggests) no functional binding will take place!
Register the defaults early (before the nib is being loaded) to set default values like for example:
class AppDelegate: NSObject, NSApplicationDelegate {
override init() {
super.init()
UserDefaults.standard.register(defaults:
[ "first": 0.0
, "showTerminal": false
]
)
}
…
}
[https://github.com/MissingManual/UserDefaultsBindingsInStoryboard]
ATTENTION: Suggestion is, to create the first Defaults Controller as a Shared User Defaults Controller inside the Application scene. Somehow Xcode remembers settings of the Shared User Default Controller and otherwise bindings might fail.
MESSAGE: Never bind to the “Shared User Default Controller“ but to individually created “User Default Controller“ for every scene, unless it is the very first time.
Alternatively you can set a let variable as
@objc let defaults = UserDefaults.standard
for example in each ViewController and then bind to this by
Bind to: ViewController
Controller Key:
Model Key Path: defaults.
I want to provide my own thumbnails for the file types which System already provides thumbnails for. I tried using QLThumbnailProvider however it works only when the file type is custom. For system supported file types it doesn't allow me to override my own thumbnails. Is there any alternative to this?
I would like to code some RealityViews to run on my Mac first (and then incorporate them in a visionOS project) so that my code/test loop is faster, but I have not been able to find a simple example that supports Mac.
Is it possible to have volumes on a Mac? Is there support for using a game controller to move around the RealityView, like in the visionOS simulator?
Hi,
Reading the
copyFromBuffer
documentation states that on macOS, sourceOffset, destinationOffset, and size "needs to be a multiple of 4, but can be any value in iOS and tvOS".
However, I have noticed that, at least on my M2 Max, this limitation does not seem to exist as there are no warnings and the copy works correctly regardless of the offset value.
I'm curious to know if this is something that should still be avoided. Is the multiple of 4 limitation reserved for non Apple Silicon devices and that note can be ignored for Apple Silicon?
I ask because I am a contributor to Metal.jl, and recently noticed that our tests pass even when copying using copyWithBuffer with offsets and sizes that are not multiples of 4. If that coul cause issues/correctness problems, we would need to fix that.
Thank you.
Christian
I would like to install the beta of macOS 15 on an empty volume, rather than on top of an existing version of macOS. Is it possible? I see that I can download an .ipsw file, but I don't understand what can be done with it.
I'm working with content filters on OS X and encountered an issue where the handleNewFlow function is not called unless I explicitly invoke completionHandler(nil) in the startFilter method. This is perplexing because I expected handleNewFlow to be called automatically when new traffic flows are detected.
Here's an example of my startFilter function without the completionHandler:
override func startFilter(completionHandler: @escaping (Error?) -> Void) {
os_log("Start filter called")
// Create a network rule that matches all traffic
let allTrafficNetworkRule = NENetworkRule(remoteNetwork: nil,
remotePrefix: 0,
localNetwork: nil,
localPrefix: 0,
protocol: .any,
direction: .outbound)
// Create a filter rule that allows all traffic
let allowAllFilterRule = NEFilterRule(networkRule: allTrafficNetworkRule, action: .allow)
// Set filter settings with the default action to allow all traffic
let filterSettings = NEFilterSettings(rules: [allowAllFilterRule], defaultAction: .allow)
// If I include this it will work fine, but TCP sessions will be reset:
//completionHandler(nil)
}
Question:
Why, when I include completionHandler(nil) in the startFilter method, do all TCP sessions on my computer get reset? Is there a way to around this? My ideal state would be to get handleNewFlow to execute, but not without resetting sessions on my machine.
I just noticed that when closing a new document with edits in MacOS Sonoma that it skips the Save/Don't Save/Cancel panel and goes directly to default NSSavePanel with Delete/Cancel/Save buttons. The problem is that when I click "Delete" nothing happens. It should have simple solution, but I could not find anything. How does one respond to the "Delete" button?
My undocumented (as far as I can tell) hack was to implement
document:didSave:contextinfo
selector for runModalSavePanelForSaveOperation. It appears that in this method for a new document:
Delete button has didSave=YES (even though it did not save) and the document fileURL nil
Cancel button has didSave=NO and document fileURL nil
Save button has didSave=YES and document filieURL to saved file
I can handle Delete button this way, but since it is not a documented method, it make me uncomfortable. For example what happens is user clicks "Save", but the save has an error?
As an aside, since Apple is now working with ChatGPT, I thought it might provide some help. I asked it how I can respond to "Delete" button in MacOS Sonoma and it said to implement deleteDocument: in your NSDocument subclass.
I pointed out to ChatGPT that deleteDocument: does not exist. It said "you are correct" and you should instead check the returned result from runModalSavePanelForSaveOperation and look for "stop" action.
I pointed out to ChatGPT that runModalSavePanelForSaveOperation is void and does not return a result, it said again, "you are correct." It gave a third option which basically said to override runModalSavePanelForSaveOperation and build your own save panel from scratch. I didn't know if I should trust this answer. I reverted to my hack and wrote this post.
Also ChatGPT never apologized for wasting my time with the wrong answers.
I'm looking for a solution to install a binary on a macOS system where System Integrity Protection (SIP) is enabled, and the target installation location is protected by SIP. I need to achieve this without booting into recovery mode to disable SIP.
Is there any method to achieve this, such as by creating separate packages that can handle SIP-protected locations, developing or using installer applications capable of navigating SIP constraints, leveraging specific entitlements or permissions to facilitate the installation, or utilising Mobile Device Management (MDM) solutions for deployment?
If anyone has experience or insights on any reliable ways to accomplish this, please share any detailed steps, tools, or best practices that could be useful.