Xcode: Version 15.0 beta 2 (15A5161b)
iPhone: iOS 17.0 (21A5268h)
Run from Xcode to Simulator or my iPhone, build successfully, install failed with the same error:
My widget extension target info.plist file looks like the image below, and it worked find with all the previous Xcode version.
After adding the key NSExtensionPrincipalClass like this:
I can install my app to simaltor and my device, however, when archive and upload to the App Store (for TestFlight testing), i got another error (the first one is related to this issue, the second i could not figure out what it is):
Posts under Beta tag
200 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
I am getting the following errors when I attempt to build my project since I updated Xcode to Version 15.0 beta 2 (15A5161b). I am wondering if anyone could help me figure it out as I have already cleared the cache and the build folder as well as reinstalling the firebase package entirely. Here are the two errors I have been receiving:
"failed to verify module interface of 'Project_Name' due to the errors above; the textual interface may be broken by project issues or a compiler bug" (The code on the line this error is on is on a autogenerated file titled "Project_Title.private" and cannot be edited, "// swift-interface-format-version: 1.0")
The other error I assume also has to do with the above issue, "no such module as 'firebase'" ( the code on line of question is "import Firebase".) I would appreciate ay help I could get because I cannot find any documentation or similar problems. I have attached screenshots below for your convenience.
Thank you for your help!
Anyone know how to set Side By Side Comparison in the new commit UI? New UI seems to missing a lot of features like multi-select of files to discard/stage...
I'm not sure if I'm changed an unknown-to-me setting somewhere, but since this morning, after profiling an app (metal, allocations, etc), every project I run/build on Xcode 15b3, either on simulator or on device, displays partially-alpha images blended to black, as if there was some problem in the process of compiling the PNGs (lack of premultiplying, color space, etc).
If I open those same projects on Xcode 14, they are displayed everything as they should.
Also, If I open them on other computers with Xcode 15b3 other than mine, it also works fine. And it was working fine for me this morning as well, but not anymore.
I've tried uninstalling Xcode beta and the simulator a few times, cleaning folders and preferences, hoping it was some setting I changed by mistake with some hotkey, but no luck so far.
I'll attach two pictures, one from Xcode 14, and the other one from Xcode 15b3, hoping it's some silly thing I'm missing.
xc15b3:
xc14:
I installed Xcode 15 beta 3 (Xcode_15_beta_3) and the iOS 17 runtime (iOS_17_beta_3_Simulator_Runtime).
I am able to build and run in the Simulator (iOS 17) and on my physical iPhone 14 Pro running iOS 16.5.1 (20F75).
But when I connect my physical iPhone 12 Pro running iOS 17.0 (21A5277h) it doesn't show in Xcode Devices and Simulator.
What could be the problem?
I already tried restarting Xcode, the Mac and the iPhone. Plugging to a different usb-c port.
Hello people,
I am currently experiencing a lot of disruption for the uploading of my files to the iCloud Drive. I have a folder that I share with some of my colleagues that contain some lectures notes and such, and I have two devices, a MacOS on the new Sonoma 14.0 Beta and an iPad on the 16.6 iPadOS. Recently the files started getting stuck upon upload and I think this started happening when I started sharing the folders with other people over iCloud.
I went through the internet multiple times to see if someone is having this problem and I willingly ran
sudo killall bird hoping it would fix my issue, but sadly it didn't.
Would appreciate any support on this, I am aware this might have a potential relation with the Beta MacOS.
Xcode 14 introduced some ridiculous Info.plist management bugs which are not yet fixed in Xcode 15:
The bugs are manifested in the General and Info tabs of target management:
-The Build value in the General tab is not in sync with the CFBundleVersion value in the Info tab (that is, changing the value in the General tab won't affect the Info tab and vice versa).
-The App Category value in the General tab isn't in sync with the LSApplicationCategoryType value in the Info tab.
-Additional document type properties in the Info tab cannot be added: clicking "Click here to add..." doesn't do anything.
-Document types in Info tab cannot be deleted: once you added a document type instance (even as a test) there's no way to remove it.
I'm new to Apple development and decided to learn using SwiftData and Xcode 15 beta 4 (though I'm starting to think I don't need that extra challenge). I've worked through many issues--with you all's help--but this is one I can't figure out and hasn't shown up in my searches.
I'm working on the traditional task list app (with a Task model). I've tried several approaches to app structure, but each time I eventually hit this same error. It doesn't happen when I set up the new Xcode project, but eventually it does. I've cleaned the build folder, restarted the Simulator, and even rebooted the Macbook I'm working on.
Here's what happens when I click Product > Run:
the app builds successfully
the Simulator displays a white screen as expected
then the error appears.
Here are the error messages:
In the debug area it says:
SwiftData/ModelContainer.swift:159: Fatal error: failed to find a currently active container for Task
Failed to find any currently loaded container for Task)
and in the warning in the editor says Thread 1: Fatal error: failed to find a currently active container for Task
The debugger is highlighting this line in the call stack (not sure if that's useful as a newbie):
#7 0x0000000100bb6d90 in Task.init(id:title:priority:) at /var/folders/3v/q8g4z9bx4lb9z6t7mhgwgghw0000gn/T/swift-generated-sources/@__swiftmacro_10BadgerTool4Task5ModelfMm_.swift:2
Here's the code:
The Task model isn't complex:
// Task.swift
import Foundation
import SwiftData
@Model
class Task {
@Attribute(.unique) var id: UUID
var title: String
var priority: String
init(id: UUID = UUID(), title: String, priority: String = "None") {
self.id = id
self.title = title
self.priority = priority
}
}
I have the model container set in the context of the highest view:
// BadgerToolApp.swift
import SwiftUI
import SwiftData
@main
struct BadgerToolApp: App {
var body: some Scene {
WindowGroup {
NavView()
.modelContainer(for: Task.self)
}
}
}
I tried moving all other views one layer down (which is why the unnecessary NavView is there):
// NavView.swift
import SwiftUI
import SwiftData
struct NavView: View {
@State var selectedCollection: Collection?
@State var selectedTask: Task?
var body: some View {
NavigationSplitView(
sidebar: {
SideBarView(selectedCollection: $selectedCollection, selectedTask: $selectedTask)
},
content: {
ContentListView(selectedCollection: $selectedCollection, selectedTask: $selectedTask)
},
detail: {
TaskDetailView(selectedCollection: $selectedCollection, selectedTask: $selectedTask)
}
)
}
}
Trying to isolate my mistake
I removed everything else related to SwiftData (except for the imports) and gave my views hard-coded data for the simulator like this:
// SideBarView.swift
import SwiftUI
import SwiftData
struct SideBarView: View {
@Binding var selectedCollection: Collection?
@Binding var selectedTask: Task?
let collections = presetCollections //temp data
var body: some View {
List(collections, id: \.id, selection: $selectedCollection){ collection in
NavigationLink(collection.name, value: collection)
}
List{
Text("All Tasks")
Text("Settings")
}
.navigationTitle("Collections")
}
}
Everything works as expected if
I comment out the .modelContainer() modifier on the call to NavView view
I change the Task definition from the @Model class to a regular struct like this:
// Task.swift
// with @Model removed
import Foundation
struct Task: Hashable {
var id: UUID
var title: String
var priority: String
init(id: UUID = UUID(), title: String, priority: String = "None") {
self.id = id
self.title = title
self.priority = priority
}
}
What am I missing?
Could it be a bug?
Thanks for your help!
I have an app that has an iOS, Widget and ShareExtension targets.
When viewing the project file and I look at the iOS target, it has the Identity section
I can view / change the app category, Display Name, Bundle Identifier, version and build.
However, the Widget and ShareExtension now has these missing.
So, if I try to change the iOS version / build I get an error that they do not match.
The data appears to exist in the project file so I can hand edit the file for the Widget and ShareExtension.
I believe this started since using the Xcode 15 betas. Or at least I haven't noticed until now since I wanted to change the version number.
This appears to be consistent across all projects I have with Widgets.
Has anyone experienced this and is there a way to get it back?
Hello,
I just tried running by iOS project today for the first time with iOS 17 as the target, I am on Xcode 15 beta 4.
I get the errors below when running the app on an iPhone with iOS 17 public beta installed. The first error was present in iOS 16, I never found a solution for it. But the second error is new. I don't know what is causing it, but it seems that it might be serous.
I tried looking up the error, but I could not find any relevant information. Please provide direction as to how to diagnose the problem.
Thank you in advanced.
Couldn't read values in CFPrefsPlistSource<0x281ca5b90> (Domain: group.com.davidalvarezdev.Proaneer, User: kCFPreferencesAnyUser, ByHost: Yes, Container: (null), Contents Need Refresh: Yes): Using kCFPreferencesAnyUser with a container is only allowed for System Containers, detaching from cfprefsd
nw_parameters_set_source_application_by_bundle_id_internal Failed to convert from bundle ID (com.davidalvarezdev.Proaneer) to UUID. This could lead to wrong data usage accounting.
nw_parameters_set_source_application_by_bundle_id_internal Failed to convert from bundle ID (com.davidalvarezdev.Proaneer) to UUID. This could lead to wrong data usage accounting.
nw_parameters_set_source_application_by_bundle_id_internal Failed to convert from bundle ID (com.davidalvarezdev.Proaneer) to UUID. This could lead to wrong data usage accounting.
After installing the newest public (3) beta of Sonoma it brings me to the user login screen, after entering credentials the progress bar gets stuck and nothing happens. When restarting into recovery, diskutil reports the disk is corrupt, which obviously it isn't. Anyone else have this issue?
Running on M1 Mac mini.
Unable to find where this is happening...
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCountableTextLocation compare:] receiving unmatching type (null)'
*** First throw call stack:
(
0 CoreFoundation 0x000000012083f88a __exceptionPreprocess + 242
1 libobjc.A.dylib 0x0000000117674894 objc_exception_throw + 48
2 CoreFoundation 0x000000012083f768 -[NSException initWithCoder:] + 0
3 UIFoundation 0x000000014ee60aa5 -[NSCountableTextLocation compare:] + 200
4 UIFoundation 0x000000014ee25919 -[NSTextLayoutManager _invalidateLayoutForTextRange:hard:] + 1573
5 UIFoundation 0x000000014ee26102 -[NSTextLayoutManager processLayoutInvalidationForTextRange:synchronizing:] + 32
6 CoreFoundation 0x00000001207a01bd __NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ + 7
7 CoreFoundation 0x0000000120721d57 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 285
8 UIFoundation 0x000000014ee83e49 __54-[NSTextContentManager synchronizeTextLayoutManagers:]_block_invoke + 78
9 CoreFoundation 0x00000001207a01bd __NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ + 7
10 CoreFoundation 0x0000000120721d57 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 285
11 UIFoundation 0x000000014ee83dc6 -[NSTextContentManager synchronizeTextLayoutManagers:] + 85
12 UIFoundation 0x000000014ee85f51 -[NSTextContentStorage synchronizeTextLayoutManagers:] + 61
13 UIFoundation 0x000000014ee84780 -[NSTextContentStorage setAttributedString:] + 162
14 UIFoundation 0x000000014ee84488 -[NSTextContentStorage dealloc] + 29
15 libobjc.A.dylib 0x0000000117672228 _ZN11objc_object17sidetable_releaseEbb + 204
16 UIKitCore 0x000000013f3d5297 -[_UITextKit2LayoutController .cxx_destruct] + 94
17 libobjc.A.dylib 0x0000000117652766 _ZL27object_cxxDestructFromClassP11objc_objectP10objc_class + 83
18 libobjc.A.dylib 0x000000011766adfc objc_destructInstance + 61
19 libobjc.A.dylib 0x000000011767176c -[NSObject dealloc] + 19
20 UIKitCore 0x000000013f3ceb68 -[_UITextKit2LayoutController dealloc] + 119
21 libobjc.A.dylib 0x0000000117672228 _ZN11objc_object17sidetable_releaseEbb + 204
22 UIKitCore 0x000000013fee4aea -[UITextField .cxx_destruct] + 343
23 libobjc.A.dylib 0x0000000117652766 _ZL27object_cxxDestructFromClassP11objc_objectP10objc_class + 83
24 libobjc.A.dylib 0x000000011766adfc objc_destructInstance + 61
25 libobjc.A.dylib 0x000000011767176c -[NSObject dealloc] + 19
26 UIKitCore 0x000000013fade794 -[UIResponder dealloc] + 145
27 UIKit 0x0000000171b2e9ef -[UIResponderAccessibility dealloc] + 55
28 UIKitCore 0x00000001401311e4 -[UIView dealloc] + 1330
29 UIKitCore 0x000000013fec9441 -[UITextField dealloc] + 272
30 libobjc.A.dylib 0x0000000117672228 _ZN11objc_object17sidetable_releaseEbb + 204
31 CoreFoundation 0x000000012085cf54 __RELEASE_OBJECTS_IN_THE_SET__ + 144
32 CoreFoundation 0x000000012085ce7d -[__NSSetM dealloc] + 130
33 libobjc.A.dylib 0x0000000117672228 _ZN11objc_object17sidetable_releaseEbb + 204
34 UIKitCore 0x0000000140026766 -[_UILayoutArrangement .cxx_destruct] + 128
35 libobjc.A.dylib 0x0000000117652766 _ZL27object_cxxDestructFromClassP11objc_objectP10objc_class + 83
36 libobjc.A.dylib 0x000000011766adfc objc_destructInstance + 61
37 libobjc.A.dylib 0x000000011767176c -[NSObject dealloc] + 19
38 UIKitCore 0x000000014001d85e -[_UIAlignedLayoutArrangement dealloc] + 325
39 libobjc.A.dylib 0x0000000117672228 _ZN11objc_object17sidetable_releaseEbb + 204
40 CoreFoundation 0x0000000120725152 __RELEASE_OBJECTS_IN_THE_ARRAY__ + 124
41 CoreFoundation 0x000000012072508f -[__NSArrayM dealloc] + 130
...
...
I am making an app that is using swift data, and all builds are fine, but when I run the app, the app is not interactive. This wasn't the case in Xcode 15 beta 4. Any help appreciated.
Thanks.
FB12755685
Sent a feedback through feedback assistant and wanted to elaborate more over here.
Our application configures and connects to wireless networks using CoreWLAN. We started seeing crashes while connecting with the latest Beta versions of Sonoma. The crashes showed EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) which led me to believe it might be a CPU architecture issue due to the mention of i386 but that was completely wrong.
Turns out the error is due to:
*** CFRetain() called with NULL ***
CFRetain.cold.1
[CWInterface associateToEnterpriseNetwork:identity:username:password:error:] + 127
Sample code to consistently reproduce the crash on Sonoma
CWInterface* interface = [CWInterface interfaceWithName:@“en0”];
NSError *scanError = nil;
NSSet* testNetworks = [interface scanForNetworksWithName:@“SSIDName” error:&testScanError];
CWNetwork* network = [testNetworks anyObject];
NSError* connectionError = nil;
BOOL connected = [interface associateToEnterpriseNetwork:network identity:identityRef username:nil password:nil error:&connectionError]; //<--crash here
The associateToEnterpriseNetwork function expects a CWNetwork object. In the Beta versions of macOS Sonoma, the CWNetwork object has (null) values in the ssid field. This causes a cold CFRetain runtime error when trying to associate to the network.
If we can detect a broadcasting "SSIDName" SSID and try to associate to it, we will always crash on the last line.
The reason for the crash seems to be due to a difference in how the CWNetwork objects are handled in Sonoma.
Sonoma:
<CWNetwork: 0x6000036cb590> [ssid=(null), bssid=(null), security=WPA2 Enterprise, rssi=-53, channel=<CWChannel: 0x6000036fce90> [channelNumber=1(2GHz), channelWidth={20MHz}], ibss=0]
Ventura:
<CWNetwork: 0x6000010ffa60> [ssid=Chris640, bssid=(null), security=WPA2 Enterprise, rssi=-45, channel=<CWChannel: 0x6000010ffca0> [channelNumber=1(2GHz), channelWidth={20MHz}], ibss=0]
Is my assumption that the crash is due to the (null) in the SSID field correct?
From my understanding it is common practice to use @State properties for views such as a boolean used to determine whether or not a view is being shown or a DisclosureGroup is expanded.
On iOS 17 Beta 4, I've noticed that when the app enters the background, these properties are reset. This results in views being close, changed values being reset, etc. This does not happen on iOS 16.4/16.5 and below.
Is anyone else experiencing this? Should we expect that this is the normal SwiftUI behavior for iOS 17 and prepare for it?
Using Xcode 15 Beta 5 the following error now appears when building an app with @Observable
External macro implementation type 'ObservationMacros.ObservableMacro' could not be found for macro 'Observable()'; the type must be public and provided by a macro target in a Swift package, or via '-plugin-path' or '-load-plugin-library'
See the attached image.
This does not happen on other team member’s computer. He can compile app just fine and I can compile app file on Xcode 15 beta 4 and below. This just started happening with Beta 5 installation.
I have deleted all derived data, deleted the Derived data folder for the project, restarted Xcode, restarted machine, reinstalled Xcode 15 beta 5. Nothing helps.
i have been using Beta software for a while now, but it is the first time I have encounter such problem. The mac i am currently using MacBook Pro early 2020 (intel, 4 thunderbolt ports). this mac comes with a T2 Chip which runs BridgeOS. I have recently received notification form the settings app saying a new macOS version (Sonoma Developer Beta 4) is available. After attempting to update the software, it seems to corrupt the 2 copies of BridgeOS on the T2 Chip and the device will crash when it is connected to a charger under, safe mode, normal mode and recovery mode. I would like to know is anyone else experiencing this and have anyone found a work around yet. At the meantime, i will try to put the T2 chip into DFU mode and restore the image on the chip. Any help would be appreciated!
Best Regards,
Peter
Woke up today to find that many of the tester statuses were blank, and their session numbers were missing. I was about to use this to reach out to my most active members for feedback but I cannot see these stats anymore.
Anyone know what's going on here?
Content indexed through CSSearchableIndex.default().indexSearchableItems() is no longer searchable from Spotlight.
I created a very small app to demonstrate this. CSSearchableIndex.default().indexSearchableItems() returned no error, yet the result can't be found.
import CoreSpotlight
import SwiftUI
@main
struct testspotlightApp: App {
var body: some Scene {
WindowGroup {
ContentView()
.onContinueUserActivity(CSSearchableItemActionType, perform: handleSpotlight)
}
}
func handleSpotlight(_ userActivity: NSUserActivity) {
print("Found \(userActivity.userInfo?.debugDescription ?? "nothing")")
}
}
import CoreSpotlight
import SwiftUI
struct ContentView: View {
@State var result = ""
var body: some View {
VStack {
Text("Hello!")
Button {
let attribute = CSSearchableItemAttributeSet(contentType: .text)
attribute.title = "a page title"
attribute.contentDescription = "hello this is a page"
attribute.keywords = ["search", "this", "page", "title"]
let item = CSSearchableItem(
uniqueIdentifier: "12345", domainIdentifier: "com.test", attributeSet: attribute)
CSSearchableIndex.default().indexSearchableItems([item]) { error in
if let error {
result = "Failed to index: \(error.localizedDescription)"
} else {
result = "Successefully indexed to spotlight. Try searching 'a page title'"
}
}
} label: {
Text("Index a page").font(.title)
}
Text(result).multilineTextAlignment(.center)
}
.padding()
}
}
Has anyone else seen the same issue?
Hi guys,
I am migrating my widgets to iOS 17 and because I already manage my layout margins, I just want to disable to new built-in widget content margins.
I did it by using ".contentMarginsDisabled()" on the WidgetConfiguration and it works fine at run time.
WIDGET CODE
struct MyWidget: Widget {
let kind: String = "MyWidget"
var body: some WidgetConfiguration {
return IntentConfiguration(kind: kind, intent: MyWidgetIntent.self, provider: WidgetProvider<MyWidgetIntent>()) { entry in
WidgetView<MyWidgetIntent>(entry: entry)
}
.configurationDisplayName("My Widget")
.supportedFamilies([WidgetFamily.systemMedium])
.contentMarginsDisabled() // <-- HERE
}
}
RESULT
Nevertheless, when previewing the WidgetView in a WidgetPreviewContext I didn't find anyway to disable the content margins (because manipulating directly the view and not a WidgetConfiguration).
PREVIEW CODE
struct MyWidget_Previews: PreviewProvider {
static var previews: some View {
WidgetView<MyWidgetIntent>(entry: WidgetEntry<MyWidgetIntent>())
// .padding(-16) Need to add this negative padding to disable margin
.previewContext(
WidgetPreviewContext(family: .systemMedium))
}
}
Do you know how to disable the content margins for widget preview?