Post

Replies

Boosts

Views

Activity

Current iOS 17.6.1 Restore images useless
I wanted to take an old iPhone 11 Pro and downgrade from iOS 18 beta to iOS 17 for testing. I can download today (Sept 26) the restore image for the iPhone 11 Pro (and many others) but when I try to restore it (Finder Option click, select restore image), Apple rejects it (I guess they won't sign it). If find this to be a problem. There is no reason why an iPhone in developer mode can't be used for testing a release less than a few weeks after the next release comes out. Why do they have the restore images if you can't use them? Why is there no restore images for iOS 17.7?
0
0
125
6d
How to prevent duplicate resource bundles from SPM dynamic framework in app extensions?
We use a local swift package in 6 of our app extensions. The product from the local package that we link to each app extension is a dynamic framework. And while the dynamic framework is copied into the final app bundle once, the resource bundles of each target that comprise the dynamic framework is copied into each app extension. I'd much rather have the bundles be copied into the dynamic framework once to prevent app bloat. Here is a visualization of the issue: . └── MyApp.ipa/ ├── MyApp (executable) ├── MyDynamicFramework_TargetA.bundle ├── MyDynamicFramework_TargetB.bundle ├── MyDynamicFramework_TargetC.bundle ├── Frameworks/ │ └── MyDynamicFramework.framework/ │ ├── TargetA │ ├── TargetB │ └── TargetC └── PlugIns/ ├── Widgets.appex/ │ ├── MyDynamicFramework_TargetA.bundle │ ├── MyDynamicFramework_TargetB.bundle │ └── MyDynamicFramework_TargetC.bundle ├── Intents.appex/ │ ├── MyDynamicFramework_TargetA.bundle │ ├── MyDynamicFramework_TargetB.bundle │ └── MyDynamicFramework_TargetC.bundle ├── IntentsUI.appex/ │ ├── MyDynamicFramework_TargetA.bundle │ ├── MyDynamicFramework_TargetB.bundle │ └── MyDynamicFramework_TargetC.bundle ├── NotificationContent.appex/ │ ├── MyDynamicFramework_TargetA.bundle │ ├── MyDynamicFramework_TargetB.bundle │ └── MyDynamicFramework_TargetC.bundle ├── RichPushContent.appex/ │ ├── MyDynamicFramework_TargetA.bundle │ ├── MyDynamicFramework_TargetB.bundle │ └── MyDynamicFramework_TargetC.bundle └── NotificationService.appex/ ├── MyDynamicFramework_TargetA.bundle ├── MyDynamicFramework_TargetB.bundle └── MyDynamicFramework_TargetC.bundle Notice that the resource bundles of Target A, B, and C are copied multiple times causing an unhealthy app size. I'd either like the resource bundles to be copied into MyDynamicFramework or copied once into the app bundle and let the app extensions reference them. Given the SPM + Xcode linking is a black box for the most part, how would I accomplish this?
3
1
791
Mar ’24
Xcode 14.3.1 for Ventura 13.6.9
Where do I download this version of Xcode? Xcode 14.3.1 Or whatever is the latest version for Ventura 13.6.9 I'm trying to learn Unreal Engine which is asking for Xcode to be installed. When I got to the app store I get an error: "Xcode can’t be installed on “2017 iMac27” because macOS version 14.5 or later is required." Please advise Thanks
1
0
121
6d
cannot open Runner.xcworkspace
I cannot open the Runner.xcworkspace on xcode even though i have tried everything (all ran with cleaned and not cleaned derived data) -i am running xcode on the latest version -tried deleting/installing again/updating pods more than enough times -tried opening from terminal/xcode/finder (all end up either opening Runner.xcodeproj or not opening at all) what are other options left to do ?
0
0
70
6d
Pls validate workaround for Predictive Code n/a on external boots
What minimal changes can I make to use Xcode 16+ predictive code completion (PCC) when I've been booting from external drives (on the same apple-silicon machine)? PCC says it requires booting from an internal drive. I boot from external for a host of reasons that aren't going to change, but need to investigate whether/how I should accommodate PCC. I haven't found technical communications on PCC requirements, and I hate to guess (wrong) because OS/workflow reconfiguration is hard and disruptive. So this post is to ask whether my approach would work, or if there's a better one. I hope to continue using the external for the user home directory, the installed Xcode application, and Xcode temporary files (and of course the projects and artifacts). (a) Does the "internal drive" requirement extend only to booting, or also to installing Xcode or situating the user HOME dir? (b) Can one use the same external HOME directory for a user booting alternately from an internal and external drives? I would doubt it since the OS's would conflict e.g., in the HOME/Library state. So I assume that means we use separate HOME dir's, but link key user HOME directories to external/real HOME (git, etc. - also .ssh?). Then OS's have distinct views, but user has mostly common view. (Assuming user always codes/builds for least-common-denominator.) Aside: is it possible to redirect the system var/temp to an external? (c) Xcode signing for the same machine/CPU seems locked to a specific OS. I.e., to switch between OS drives but do code signing in Xcode, I've had to re-issue a certificate. (c-1) Is that avoidable? (c-2) Can I somehow maintain a per-machine certificate, and toggle between them? (c-3) Is that process made possible or impossible if Xcode is always pointing at the same Derived-Data/Archives directories? Is there any way to make it semi-automatic, once configured? Thank you! (I didn't see any forum tag for PCC.)
2
0
114
1w
FCP Workflow extension does not build with clang unknown argument -e_ProExtensionMain in Xcode 16
With Xcode 16 I cant make the Final Cut Extension Workflow work. I am quite sure I was able to add the Workflow Extension target a couple of months ago in Xcode 15 and did successfully build it, but in Xcode 16 it wont build and it fails with this error: clang: error: unknown argument: '-e_ProExtensionMain' I have installed multiple times Workflow Extensions SDK 1.0.2 and even disabled Library validation like its described in the release notes but I dont think thats the problem here. Seems like clang doesn't have the arguments for it, I guess the SDK should add these but seems like something got messed up - the template shows up fine in Xcode. I reinstalled Xcode and command line tools but that didnt help. Checking clang it really doesnt have the argument. But where does the SDK add this? Xcode seems to be using internal clang and /usr/bin/clang doesn't have it either. Any tips what could be the problem here? I was not really able to locate the SDK to remove it before trying to install again - any ideas? Steps to reproduce Create new project Add FCP workflow extension target Build -> it fails Same behaviour with 16.1 Beta. I am running Sonoma 14.7. Thanks in advance for any ideas!
3
0
130
1w
Xcode 16 Do not display comments correctly
Comments are not displayed correctly in Xcode 16. As you can see on the included screenshot, the first /// are displayed correctly but the remaining ////////////////////////// are super small. In a programming text editor, like Xcode, all characters MUST be monospaced. Otherwise it is impossible to code. Xcode is not supposed to be a word processor. There are no parameters to fix that. It was working fine for the past 15 years on Xcode. Please fix that so I can work again. And never do that ever again. Understood?
6
0
176
1w
Trouble with getting a background refresh task working
I am able to setup and schedule a background refresh task as well as manually trigger it via Xcode and the simulator tied to my iPhone 11 Pro test phone using the e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier: However, it won't execute on the app on it's own. And yes, the pinfo.list entries are correct and match! I know the scheduler is not exact on timing but it's just not executing on its own. Since I can trigger manually it I'm pretty sure the code is good but I must be missing something. I created an observable object for this code and the relevant parts look like this: class BackgroundTaskHandler: ObservableObject { static let shared = BackgroundTaskHandler() var taskState: BackgroundTaskState = .idle let backgroundAppRefreshTask = "com.opexnetworks.templateapp.shell.V1.appRefreshTask" func registerBackgroundTask() { BGTaskScheduler.shared.register(forTaskWithIdentifier: backgroundAppRefreshTask, using: nil) { task in self.handleAppRefresh(task: task as! BGAppRefreshTask) } self.updateTaskState(to: .idle, logMessage: "✅ Background app refresh task '\(backgroundAppRefreshTask)' registered.") BGTaskScheduler.shared.register(forTaskWithIdentifier: backgroundTaskIdentifier, using: nil) { task in self.handleProcessingTask(task: task as! BGProcessingTask) } self.updateTaskState(to: .idle, logMessage: "✅ Background task identifier '\(backgroundTaskIdentifier)' registered.") } // Handle the app refresh task private func handleAppRefresh(task: BGAppRefreshTask) { self.updateTaskState(to: .running, logMessage: "🔥 app refresh task is now running.") PostNotification.sendNotification(title: "Task Running", body: "App refresh task is now running.") let queue = OperationQueue() queue.maxConcurrentOperationCount = 1 let operation = BlockOperation { self.doSomeShortTaskWork() } task.expirationHandler = { self.updateTaskState(to: .expired, logMessage: "💀 App refresh task expired before completion.") PostNotification.sendNotification(title: "Task Expired", body: "App refresh task expired before completion \(self.formattedDate(Date())).") operation.cancel() } operation.completionBlock = { if !operation.isCancelled { self.taskState = .completed } task.setTaskCompleted(success: !operation.isCancelled) let completionDate = Date() UserDefaults.standard.set(completionDate, forKey: "LastBackgroundTaskCompletionDate") self.updateTaskState(to: .completed, logMessage: "🏁 App refresh task completed at \(self.formattedDate(completionDate)).") PostNotification.sendNotification(title: "Task Completed", body: "App refresh task completed at: \(completionDate)") self.scheduleAppRefresh() // Schedule the next one } queue.addOperation(operation) } func scheduleAppRefresh() { // Check for any pending task requests BGTaskScheduler.shared.getPendingTaskRequests { taskRequests in let refreshTaskIdentifier = self.backgroundAppRefreshTask let refreshTaskAlreadyScheduled = taskRequests.contains { $0.identifier == refreshTaskIdentifier } if refreshTaskAlreadyScheduled { self.updateTaskState(to: .pending, logMessage: "⚠️ App refresh task '\(refreshTaskIdentifier)' is already pending.") // Iterate over pending requests to get details for taskRequest in taskRequests where taskRequest.identifier == refreshTaskIdentifier { let earliestBeginDate: String if let date = taskRequest.earliestBeginDate { earliestBeginDate = self.formattedDate(date) } else { earliestBeginDate = "never" } self.updateTaskState(to: .pending, logMessage: "⚠️ Pending Task: \(taskRequest.identifier), Earliest Begin Date: \(earliestBeginDate)") } // Optionally, show a warning message to the user in your app PostNotification.sendNotification(title: "Pending Tasks", body: "App refresh task is already pending. Task scheduling cancelled.") return } else { // No pending app refresh task, so schedule a new one let request = BGAppRefreshTaskRequest(identifier: refreshTaskIdentifier) request.earliestBeginDate = Date(timeIntervalSinceNow: 15 * 60) // Earliest in 15 minutes do { try BGTaskScheduler.shared.submit(request) self.taskState = .scheduled self.updateTaskState(to: .scheduled, logMessage: "✅ App refresh task '\(refreshTaskIdentifier)' successfully scheduled for about 15 minutes later.") PostNotification.sendNotification(title: "Task Scheduled", body: "App refresh task has been scheduled to run in about 15 minutes.") } catch { print("Could not schedule app refresh: \(error)") self.taskState = .failed self.updateTaskState(to: .failed, logMessage: "❌ Failed to schedule app refresh task.") } } } } // Short task work simulation private func doSomeShortTaskWork() { print("Doing some short task work...") // Simulate a short background task (e.g., fetching new data from server) sleep(5) print("Short task work completed.") } In my AppDelegate I trigger the registerBackground task in the didFinishLaunchingWithOptions here: BackgroundTaskHandler.shared.registerBackgroundTask() And I scheduled it here in the launch view under a task when visible: .task { BackgroundTaskHandler.shared.scheduleAppRefresh() } I've also tried the last in the AppDelegate after registering. either way the task schedules but never executes.
3
0
119
1w
macOS 15.1b5, Xcode 16.1b2, does not compile
macOS project, was compiling on macOS 14, now there are errors when trying to compile it again: In file macOS 15.1 / usr/include/ ___wctype.h there are errors: Use of undeclared identifier '_CTYPE_A' in line: return (__istype(_wc, _CTYPE_A|_CTYPE_D)); And further down: Use of undeclared identifier '_CTYPE_A' Use of undeclared identifier '_CTYPE_C' Use of undeclared identifier '_CTYPE_D' Is this an SDK problem?
1
0
106
1w
Problem installing debugging on IOS 18 with Xcode 16
Project previously built and installed fine (Xcode 16). Upgrade to IOS 18 and now debug install 'Prepares' for ever (never finishes) on both my iPhone 11 Pro and my 12.9 iPad. Tried clearing buffers, derived data, restarting/rebooting. The projects are projects that I have tested and run for several years on many versions, not new to the Xcode world. Permissioning (i.e. Developer mode) enabled on all devices, tried various cables on all devices. Relinked all devices..but no success. Projects build and run fine on simulators, but just can't finish installing on the real hardware. Stunning frustrating and NO USEFULL error messages.
2
0
112
6d
loudKit Containers are not being created or connecting back do apple dev besides the default container
Every new container i create for cloudkit doesn't work and or connect back to my icloud dev account. Here are the errors: Communication with Apple failed. An iCloud Container with Identifier 'iCloud.icloud.com.plantclock.backup' is not available. Please enter a different string. Provisioning profile "iOS Team Provisioning Profile: CGL.CannaGrowLog" doesn't support the iCloud.icloud.com.plantclock.backup iCloud Container. Provisioning profile "iOS Team Provisioning Profile: CGL.CannaGrowLog" doesn't match the entitlements file's value for the com.apple.developer.icloud-container-identifiers entitlement. STEPS TO REPRODUCE Went into xcode > Project name > targets > icloud > containers > + sign and anytime i try to add it fails with the above issues. Also, going into apple dev website has no option to even see or add containers.
1
0
118
6d
Errors running with ASAN when targeting iOS Devices
I'm unable to run my app with ASAN enabled when targeting a physical iOS device. Simulator targets do work. With Xcode 12 and an iPad mini 4 running iOS 14 beta 1 I get the following error during app launch ==750==ERROR: AddressSanitizer failed to allocate 0xffffffffff9fc000 (-6307840) bytes at address 2db624000 (errno: 22) ==750==ReserveShadowMemoryRange failed while trying to map 0xffffffffff9fc000 bytes. Perhaps you're using ulimit -v With Xcode 11.5 and an iPad Air 2 running OS 12.4.1 the error is ==2177==Unable to find a memory range after restricting VM. ==2177==AddressSanitizer CHECK failed: /BuildRoot/Library/Caches/com.apple.xbs/Sources/clangcompilerrt/clang-1103.0.32.62/compiler-rt/lib/asan/asanmac.cc:92 "((0 && "cannot place shadow after restricting vm")) != (0)" (0x0, 0x0) <empty stack>==2177==AddressSanitizer CHECK failed: /BuildRoot/Library/Caches/com.apple.xbs/Sources/clangcompilerrt/clang-1103.0.32.62/compiler-rt/lib/asan/../sanitizercommon/sanitizermallocmac.inc:143 "((!asaninitisrunning)) != (0)" (0x0, 0x0) warning: could not execute support code to read Objective-C class data in the process. This may reduce the quality of type information available. AddressSanitizer report breakpoint hit. Use 'thread info -s' to get extended information about the report. (lldb) thread info -s thread #1: tid = 0x1076c2, 0x000000011531e984 libclangrt.asaniosdynamic.dylib`__asan::AsanDie() My coworker is able to use ASAN with the same App using iPad Pro 10.5, iPadOS 13.5.1, Xcode 11.5 Are there any configuration changes I need to make to be able to use ASAN on my devices?
11
1
7.7k
Jun ’20
Can't build with Xcode 14: "Doesn't match platform DriverKit"
I have an app that includes a DriverKit extension that up until now I've been building without issue using Xcode 13. It was time to regenerate my Developer ID Application certificate so I needed to rebuild the app. However, I'm now running macOS Ventura and Xcode 14.3.1, and cannot get it to build in this later version of Xcode for reasons that are totally inscrutable to me. I've tried using both the newly generated provisioning profiles I've manually created in the "Certificates, Identifiers & Profiles" developer page, and the (still valid) provisioning profiles I already had installed. The trouble is that, when I select a provisioning profile I made for the DriverKit extension, Xcode won't accept it for the following reason: Platform: macOS Doesn't match platform DriverKit This makes no sense to me! There is no way to create a distribution provisioning profile for the "DriverKit" platform. All I can select is either "Mac" or "Mac Catalyst". So there's seemingly no way out of this. What am I missing?
0
0
86
6d
Xcode 16 Typed Allocators
From the Xcode 16 Release notes: Clang New Features Clang now supports generating code to call typed allocators. To enable this support for C allocation functions such as malloc() set the CLANG_ENABLE_C_TYPED_ALLOCATOR_SUPPORT build setting to YES. For C++ allocations with operator new, set CLANG_ENABLE_CPLUSPLUS_TYPED_ALLOCATOR_SUPPORT to YES. (132456928) Looking in the Build Settings I don't see anything that says Typed Allocator or something similar. I would love to have a bit more information about what this is as well.
2
0
111
1w
Not able to inspect react native drop down element in iOS
Am trying to automate below drop down but iOS Accessibility inspector is unable to detect the element. Even we tried with Appium Inspector issue is same. Drop down: https://www.npmjs.com/package/react-native-element-dropdown We tried to debug the dropdown component. In that we can see the value is rendered properly from react. We have raised the issue with Appium, but they have given few suggestions in the Appium setting but it didn't solve. Now it's something that has to be done from XCTest Framework end. Appium issue git link: https://github.com/appium/appium/issues/14825
0
0
53
1w
KeyedUnarchive a previously object archived with NSArchiver archivedDataWithRootObject
Hi, in my previous macOS app I used to archive a dictionary to a preference file using [NSArchiver archivedDataWithRootObject:dictionary]; and to unarchive it using [NSUnarchiver unarchiveObjectWithData:dataFromDisk]; Now I would like to replace the 2 deprecated methods with NSError *error; NSSet *classSet = [NSSet setWithObjects:[NSDictionary class], [NSArray class], [NSString class], [NSNumber class], [NSData class], nil]; NSDictionary *dictionary = [NSKeyedUnarchiver unarchivedObjectOfClasses:classSet fromData:dataFromDisk error:&error]; But I get a nil dictionary and the error 4864: non-keyed archive cannot be decoded by NSKeyedUnarchiver. So I guess I should first keep on unarchiving the preferences dataFromDisk using the old deprecated method [NSUnarchiver unarchiveObjectWithData:dataFromDisk]; Then I could use the new NSKeyedArchiver and NSKeyedUnarchiver methods for the upcoming release. But, if this deprecated method [NSUnarchiver unarchiveObjectWithData:dataFromDisk]; fails to unarchive the old data (and on some machines now it fails), how could I use the new methods? Should I consider my old preference file gone? Is a way to force the new NSKeyedUnarchiver method to unarchive data previously archived with NSArchiver ?
0
0
29
1w