Post not yet marked as solved
Hey!
In the last couple of days, I have received multiple crash reports from users during the startup sequence of my app. The underlying issue seems to arise during a call to makeComputePipelineState, which fails with the following error message:
Inlining all functions due to use of indirect argument bufferEncountered unlowered function call to air.get_threads_per_simdgroup.i16
Am I right to assume that those are actually two messages that are not necessarily related? I am not quite sure what to make of the second part in particular, so any guidance would be greatly appreciated!
The number of crashes has been single-digit so far, but all of them have happened on the same model: the iPad Pro (12.9-inch) (3rd generation). (Not sure if that is of any importance.)
Post not yet marked as solved
I get such an error when uploading when the bundle ids are the same and when I embed the watchos app into the main app.
Post not yet marked as solved
After not happening to me for a few months, this issue has started hitting me again with currently %100 reproducability.
If turn on VPN on my Mac then instantly the developer certificates within the keychain become untrusted.
But that's not all, if VPN is then turned off the certificates do not revert to their trusted status but remain untrusted.
The consequence of this is that if VPN is turned on and then a build is perform, it fails, and the only way to fix things is to delete the cert(s) from they keychain and re-install them.
As a remote worker, having this happen several or even dozens of times a day is incredibly annoying and frustrating.
This issue has been occurring for literally years, sometimes it occurs very often, others while its quiet for a while, and has spanned multiple versions of Xcode and Mac OS. So whatever the cause is its endemic. It doesn't just affect myself, but all the members in my development team.
I'm currently using Xcode 14.1 RC 2 and Monterey but I've seen this issue occur with many versions of Xcode and Mac. (I'm using Cisco AnyConnect Secure Mobility Client).
If the VPN is somehow interfering/affecting the connectivity aspect when an attempt is made by Xcode to validate the certificate, then why does it not rectify itself after turning off VPN?
This is so so so so annoying.
Can somebody please comment on why this happens and if there's a way to prevent it.
Post not yet marked as solved
Hey, I have access to anything but the "Apps" section of the appstoreconnect.
I log in as usual, and everything works except the Apps section. It's just a blank white page.
Tried multiple users, browsers, even tried from my phone, it's just a blank page, and has been that way for the past 6 hours.
What do I do?
Post not yet marked as solved
From the class below how do I initialize chartEntry for the structure array? As it is below chartEntry is outside scope of init?
class ChartSeriesRow: ObservableObject {
var id = UUID()
var chartCategory: String
struct chartSeriesData{
var chartEntry: [ChartData]
}
struct ChartData: Codable, Identifiable, Hashable {
var id = UUID()
let chartMonth: String
let chartSales: String
}
init() {
chartCategory = ""
chartEntry = chartSeriesData: [ChartData.chartMonth: "01", ChartData.chartSales: "10.0"]
}
}
Post not yet marked as solved
Appium Server GUI mac - 1.22.3-4
Xcode (Version 14.0.1)
macMini (M1, 2020), macOS Monterey ( version 12.6)
iPhone14 Pro max : iOS version 16.0.2
I am working on setting up Appium Automation scripts using Xcode on iPhone.At the time of building WebDriverAgentRunner app from Xcode to iPhone I am getting the following error:
"Cannot link directly with dylib/framework, your binary is not an allowed client of /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/XCTAutomationSupport.framework/XCTAutomationSupport for architecture arm64
Test target WebDriverAgentRunner encountered an error (The bundle identifier for WebDriverAgentRunner-Runner.app couldn’t be read. The application may be damaged or incomplete: “/Users/paraggulwani/Library/Developer/Xcode/DerivedData/WebDriverAgent-fxmsedpwfaalxlbcwefbceeuodem/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app”.)
"
Post not yet marked as solved
When zooming in and capturing on iPhone 14pro (videoMaxZoomFactor),
the shooting screen is weird if the screen brightness is low.
If you lower the shutter speed and ISO and take a picture of the dark part, the left part is saved, not the part shown on the screen. Does anyone know why?
Post not yet marked as solved
I am using SMAppService to start a helper application which I register using
SMAppService.loginItem(identifier: "com.company.myhelper")
I want to be able to disable start at login from within the helper app. Using SMAppService.loginItem(identifier: "com.company.myhelper")
in the helper app obviously does not work as the helper app does not have a helper app. It is the helper app.
SMAppService.mainApp also does not work here as this does manage the "open at login" section while SMAppService.loginItem manages the "Allow in the Background" section.
Is there a way to stop the helper app from starting at login from within the helper app?
Post not yet marked as solved
I have an app with a horizontal stackview which contains 3 UIViews.
When all 3 UIViews are visible it works fine like this:
https://i.stack.imgur.com/BbwOy.png
However if I hide one of the UIViews dynamically like this a space is added in the stackview between the 2 UIViews:
secondView.isHidden = true
https://i.stack.imgur.com/mx4Pt.png
How can I get rid of the extra space? In Xcode I have the stack view's spacing set to 0. I don't know how to solve this. Please let me know if you know how to solve this.
Post not yet marked as solved
Wenn ich den Computer starte oder mitten in der Arbeit, tauchen am oberen rechten Rand Meldungen auf (bis zu 8) „Hintergrundobjekte hinzugefügt“. Wenn ich auf die PopUps klicke werden im "Kontrollzentrum" „Anmeldeobjekte“ geöffnet. Weder dort oder sonst wo finde ich eine Option diese Pop Ups abzustellen. Wie kann ich diese deaktivieren? (Sie lassen sich nicht durch "Fokus" ein unterdrücken und im Kontrollzentrum oder unter Anmeldeobjekte finde ich auch keine Funktion diese Meldungen abzuschalten:)
(Screenshot von einem der PopUps anbei)
Post not yet marked as solved
Recently we surveyed macOS file association by extension to retrieve what app to “open with”.
Ex: image.png -> “Preview” to open
“URLsForApplicationsToOpenContentType”(macOS 12.0+) is a good API which returns NSArray for “open with” app list.
https://developer.apple.com/documentation/appkit/nsworkspace/3752999-urlsforapplicationstoopencontent
May I ask the alternative for “URLsForApplicationsToOpenContentType” below macOS 12.x ?
“LSCopyDefaultApplicationURLForContentType” (macOS 10.10–12.00) is “Deprecated”.
https://developer.apple.com/documentation/coreservices/launch_services?language=objc
Post not yet marked as solved
We plan to develop a Share extension.
The CoreData is storing its SQLite file in AppGroup folder.
The share extension will run in a different process than main app's.
Since share extension and main app are running in different process, both will have their own instance of CoreData. However, even there are multiple instances of CoreData in different processes, their underlying are pointing to a single same SQLite file.
Under https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/ExtensionScenarios.html#//apple_ref/doc/uid/TP40014214-CH21-SW1
It mentions
When you set up a shared container, the containing app—and each contained app extension that you allow to participate in data sharing—have read and write access to the shared container. To avoid data corruption, you must synchronize data accesses. Use Core Data, SQLite, or Posix locks to help coordinate data access in a shared container.
But it isn't clear, what are detailed steps required to
How can we synchronize access to CoreData among 2 processes?
Who should responsible to consume relevant store change, and update the single token file? (https://developer.apple.com/documentation/coredata/consuming_relevant_store_changes) Should it be main app, share extension or both?
Thank you.
Post not yet marked as solved
Hi there,
The Setup/My Goal
I have a very standard Finder Sync Extension, which extends the context menu of the finder. I also have a main application which uses the KeyboardShortcuts Package (Keyboard Shortcuts - Github) to record and save a user defined shortcut. This shortcut should execute the menu item of the Finder Sync Extension (therefore getting the selected files and processing them in some way) when used.
Currently I am using inter-process communication to send an event to the extension when the shortcut is executed by the user. You can find the Swift Class responsible for the communication between Finder Sync Extension and the Main App as an Attachment here: ProcessCommunicator.swift (although the communication works and this is more an issue of the finder sync extension behaviour than one of inter-process communication).
When the Finder Sync Extension receives the event, it executes the same function which is called when the user clicks the menu item like so (this event is registered in the initialisation function of the Finder Sync Extension):
processCommunicator = ProcessCommunicatorReceiver(appGroupIdentifier: "group.some.bundle.id.port")
processCommunicator?.on(id: 1, event: { _ in
self.executeSomeAction(nil)
return nil
})
The same action is called when the user clicks the menu item:
override func menu(for menuKind: FIMenuKind) -> NSMenu {
let menu = NSMenu()
if menuKind == FIMenuKind.contextualMenuForItems || menuKind == FIMenuKind.toolbarItemMenu {
menu.addItem(withTitle: text, action: #selector(executeSomeAction), keyEquivalent: "T")
}
return menu
}
The function executeSomeAction would look something like this
@IBAction func transfer(_ sender: AnyObject?) {
guard let target = finderSyncController.selectedItemURLs() else {
NSLog("Failed to obtain targeted URLs: %@")
return
}
// Process the selected items (target)
The Problem
When the function executeSomeAction is called from the process-communicator-event (sent by the main app), the selectedItemURLs is nil and therefore the function returns without doing anything.
If the function executeSomeAction is called by the menu item click event, the selectedItemURLs is an array of paths as expected.
Is there some restriction which prevents access to the user selected, when it’s not strictly clicked by the user or am I missing something here?
Other possible Solutions to my Issue
This whole inter-process communication is only needed because I need the shortcut event to be sent to the extension. I have noticed that in the initialisier of the menu item there is a keyEquivalent (-> shortcut)
menu.addItem(withTitle: text, action: #selector(executeSomeAction), /* HERE -->*/ keyEquivalent: "T")
This shortcut seems to be ignored by the system, as it neither appears next to the menu item, nor is functional. I am assuming that this is intended but if there is any way to make this work with the inbuilt system shortcut, instead of the communication-hack I am using currently, I would prefer to use this solution.
Summary
As said before, the selectedItemURLs is only defined if it is called from the menu item event, which eliminates the ability to do some custom processing with the selected files (in my case called by an event sent by another process)
Post not yet marked as solved
Hello,
I have a question while I was coding in swift.
I wrote a following code:
import Foundation
protocol feature{
func getPayment(o:Offer)->Double
}
enum ProdCode{
case PersonalLoan
case Mortgage
case AutoLoan
}
struct Offer{
var Code:ProdCode
var Lender:String
var LoanAmt:Double
var APR:Double
var Terms:Int
}
class A: feature {
func getPayment(o: Offer)->Double {
var PLfactor = o.APR / 100 / 12
var PLfogr = pow(Decimal(1 + PLfactor), o.Terms * 12)
return o.LoanAmt * PLfactor * (PLfogr / (PLfogr) - 1)
}
}
I got an error message saying "Cannot convert value of type 'Decimal' to expected argument type 'Double'" from the line 'return o.LoanAmt * PLfactor * (PLfogr / (PLfogr) - 1)'.
if someone pick what my fault is in the line, I'd be very appreciated.
thanks for your answer in advance.
c00012
Post not yet marked as solved
I have a MacOS app which has a lot of TextFields in many views; and one editor view which has to receive pressed keyboard shortcut, when cursor is above. But as I try, I cannot focus on a view which is not text enabled. I made a small app to show a problem:
@main
struct TestFocusApp: App {
var body: some Scene {
DocumentGroup(newDocument: TestFocusDocument()) { file in
ContentView(document: file.$document)
}
.commands {
CommandGroup(replacing: CommandGroupPlacement.textEditing) {
Button("Delete") {
deleteSelectedObject.send()
}
.keyboardShortcut(.delete, modifiers: [])
}
}
}
}
let deleteSelectedObject = PassthroughSubject<Void, Never>()
struct MysticView: View {
var body: some View {
ZStack {
Rectangle()
.foregroundColor(.gray.opacity(0.3))
}.focusable()
.onReceive(deleteSelectedObject) { _ in
print ("received")
}
}
}
enum FocusableField {
case wordTwo
case view
case editor
case wordOne
}
struct ContentView: View {
@Binding var document: TestFocusDocument
@State var wordOne: String = ""
@State var wordTwo: String = ""
@FocusState var focus: FocusableField?
var body: some View {
VStack {
TextField("one", text: $wordOne)
.focused($focus, equals: .wordOne)
TextEditor(text: $document.text)
.focused($focus, equals: .editor)
///I want to receive DELETE in any way, in a MystickView or unfocus All another text views in App to not delete their contents
MysticView()
.focusable(true)
.focused($focus, equals: .view)
.onHover { inside in
focus = inside ? .view : nil
/// focus became ALWAYS nil, even set to `.view` here
}
.onTapGesture {
focus = .view
}
TextField("two", text: $wordTwo)
.focused($focus, equals: .wordTwo)
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView(document: .constant(TestFocusDocument()))
}
}
Only first TextField became focused when I click or hover over MysticView
I can assign nil to focus, but it will not unfocus fields from outside this one view.
Is it a bug, or I missed something? How to make View focusable? To Unfocus all textFields?
Post not yet marked as solved
I'm trying to use a button with .simultaneousGesture with a DragGesture to detect button down and button up (instead of just the click):
.simultaneousGesture(
DragGesture(minimumDistance: 0)
.onChanged({ _ in
print("onChanged")
isPressed = true
})
.onEnded({ _ in
print("onEnded")
isPressed = false
})
)
This works nicely on iOS, but neither onChanged nor onEnded is ever invoked on macOS.
Is there a way to make this work on macOS? Or an alternative SwiftUI way to detect mouse down / mouse up on a button?
Post not yet marked as solved
Hi,
I want to extract real textures of the objects detected by RoomPlanAPI. So, that i can apply them later on to the model generated by RoomPlan. I want to create an illusion of the real room so that i can have the control over the objects. Does anyone have any idea how can i do that?
Post not yet marked as solved
This happens with new project recently created. Existing app is working fine.
I can run and debug my watch app from Xcode on my Apple Watch device, but app gets deleted after stop running from Xcode.
App is just gone for some reason.
Tested with Xcode 14.0.1 and Xcode 14.1 RC 2, and Apple Watch on watchOS 9.1.
This was happening before watchOS 9.1.
Is anyone see this happening and know solution?
Post not yet marked as solved
this is not an code related doubt
I have 2 two storyboard which is connected to each other say like LoginView and SignUpView in storyBoard
and then I have create the HomeView in SwiftUI File How do I tell the Xcode to run the SwiftUI File after the LoginView.StoryBoard
Post not yet marked as solved
Xcode 14.0 and 14.0.1 swift project crash(release, OC file, ** obj only init no use) (Xcode 13.x normal)。
Crash Info:
Thread 1: EXC_BAD_ACCESS (code=1, address=0x9a0080020).symbol stub for: static Swift.CommandLine.unsafeArgv.getter : Swift.UnsafeMutablePointer<Swift.Optional<Swift.UnsafeMutablePointer<Swift.Int8>>>
no use:
var errorItem:TestError? = TestError()
use:
var errorItem:TestError?