Here we have yet another bug, I suppose, in SwiftData that happens on iOS18 but it is not an issue on iOS17.
There are 2 models defined as follows
@Model
final public class Note: Identifiable, Codable, Hashable
{
public private(set) var uuid = UUID().uuidString
var heading: String = ""
var tags: [Tag]?
init(heading: String = "") {
self.heading = heading
}
required public init(from decoder: Decoder) throws {
...
}
public func encode(to encoder: Encoder) throws {
...
}
}
@Model
final public class Tag: Identifiable, Codable
{
var name: String = ""
@Relationship(deleteRule: .nullify, inverse: \Note.tags) var notes: [Note]?
init(_ name: String) {
self.name = name
}
required public init(from decoder: Decoder) throws {
…
}
public func encode(to encoder: Encoder) throws {
...
}
}
and a function o add new tags as follows
private func addTags(note: Note, tagNames: [String]) {
if note.tags == nil {
note.tags = []
}
for tagName in tagNames {
if let tag = fetchTag(tagName) {
if !note.tags!.contains(where: {$0.name == tagName}) {
note.tags!.append(tag)
}
} else {
// The following line throws the exception on iOS18 when Tag conforms to Codable:
// Illegal attempt to map a relationship containing temporary objects to its identifiers.
note.tags!.append(Tag(tagName))
}
}
}
This code works perfectly well on iOS17 but on iOS18 I get the exception “Illegal attempt to map a relationship containing temporary objects to its identifiers.”
What I noticed that this happens only when Tag model conforms to Codable protocol. Is it a bug? It looks like, otherwise we've got some undocumented changes have been made.
In my previous post I mentioned about the other issue about ModelContext that is broken too on iOS18 - I mean it works perfectly well on iOS17.
Demo app with an example how to workaround this problem is available here on GitHub.
Repro steps:
Add a note with some tags (separated by space)
Edit this note and add a new tag (tag that does not exists in database) and tap Save.
You should noticed that the tag hasn't been added. It works occasionally but hardly to be seen.
Posts under iOS tag
200 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I've seen an earlier post on this with no response.
Has anyone else gotten a response from Apple or have run across a solution to onDrag lagging when released to drop on iOS 18? I've been chasing this for a week thinking it was me and then I woke up and started testing it on older iOS versions and the issue goes away. I happens on simulators and real phones. A little more digging and I'm seeing occasional chatter about this .5 to 1 second delay.
Here's a code example that reproduces it:
import SwiftUI
import UniformTypeIdentifiers
struct ContentView: View {
@State private var draggableText: String = "Move this"
var body: some View {
VStack(spacing: 80) {
DraggableItem(content: $draggableText)
DropZone {
Text("Place Here!")
.font(.headline)
.foregroundColor(.white)
}
.frame(width: 150, height: 150)
.background(Color.green)
.cornerRadius(12)
}
.padding()
}
}
struct DraggableItem: View {
@Binding var content: String
var body: some View {
Text(content)
.frame(width: 120, height: 120)
.background(Color.red)
.foregroundColor(.white)
.cornerRadius(8)
.onDrag {
NSItemProvider(object: NSString(string: content))
}
}
}
struct DropZone<Content: View>: View {
var content: () -> Content
var body: some View {
ZStack {
content()
}
.onDrop(of: [UTType.text], delegate: DropHandler())
}
}
struct DropHandler: DropDelegate {
func performDrop(info: DropInfo) -> Bool {
// Add logic to handle the drop
print("Item dropped!")
return true
}
}
#Preview {
ContentView()
}
let activityViewController = UIActivityViewController(activityItems: items,
applicationActivities: [])
activityViewController.popoverPresentationController?.barButtonItem = navigationController.topViewController?.navigationItem.rightBarButtonItem
navigationController.present(activityViewController, animated: true, completion: nil)
Crash logs
=====================================================
*** Assertion failure in -[_UIActivityContentCollectionView _dequeueReusableViewOfKind:withIdentifier:forIndexPath:viewCategory:], UICollectionView.m:7588
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Attempted to dequeue a cell for a different registration or reuse identifier than the existing cell when reconfiguring an item, which is not allowed. You must dequeue a cell using the same registration or reuse identifier that was used to dequeue the cell originally to obtain the existing cell. Dequeued reuse identifier: UIActivityContentActionCellIdentifier; Original reuse identifier: UIActivityActionGroupCell; Existing cell: <UIActivityActionGroupCell: 0x10f19f220; baseClass = _UICollectionViewListCell; frame = (16 354; 358 30); clipsToBounds = YES; layer = <CALayer: 0x600000781740>>'
why are people having problems with the playground download when some people have full access to it What is the difference between us and other people who have it
Yet another bug, I suppose, on iOS 18. This time it relates to the SwiftUI framework, and to be precise, it's about the theme change functionality. It no longer works properly on iOS 18, while it’s not an issue on iOS 17.
Demo app available at: https://github.com/m4rqs/iOS18ThemeIssue
Steps to reproduce:
Assume the system is set to use the light theme.
Go to the Settings tab.
Switch the colour scheme to Dark.
Switch the colour scheme to System (this no longer works).
Switch the colour scheme to Light (the tab bar is not updated if the content page is long enough and go beyond current view).
Switch between tabs (tab bar icons are greyed)
enum Theme: Int {
case system
case light
case dark
}
struct SettingsView: View {
@State private var theme: Theme = .system
@State private var colorScheme: ColorScheme? = nil
var body: some View {
Form {
Section(header: Text("General")) {
Picker("Colour Scheme", selection: $theme) {
Text("System").tag(Theme.system)
Text("Light").tag(Theme.light)
Text("Dark").tag(Theme.dark)
}
.preferredColorScheme(colorScheme)
.onChange(of: theme) {
switch theme {
case .light: colorScheme = .light
case .dark: colorScheme = .dark
default: colorScheme = nil
}
}
}
}
}
}
After I updated Siri doesn't work. If I try to use it by typing I get no feedback or response. If I say 'Siri' or hold down the side button the 'animation' on the screen starts but stops immediately and again I have no response or feedback. When turning off Apple Intelligence and just using Siri, it works perfectly. But in conjunction with Apple Intelligence, it is not possible to use Siri.
IOS 18.2 Beta
IPhone 15 pro Max
Hello,
We haven't been getting crash logs for internal TestFlight builds.
I've tried intentionally causing a crash by calling fatalError() directly. The TestFlight feedback dialog appears and crash logs appear on the iPhone device itself, but they never appear in App Store Connect or Xcode Organizer.
The builds are all created by an Xcode cloud workflow and the Share analytics with App Developers setting is on.
I filed a radar ticket at FB15453505, but I wonder if others might have run into the same thing.
Has anyone else had this issue and figured out how to resolve it?
Topic:
App Store Distribution & Marketing
SubTopic:
TestFlight
Tags:
iOS
App Store Connect
Debugging
TestFlight
"Can not preview in this file"
Xcode 16.0
iPhone 14 Pro , iOS 18.0
When I choose to start Preview on my iPhone, the canvas screen keeps showing loading circle animation. The iPhone enters the Xcode Previews App but only displays the default screen (Xcode icon& 'Preview from Xcode')
I uploaded the some of diagnostics files
previews_diagnostics_summary.txt
remote_injection.json
there are no AI chips on iOS 18.1, there is a region with great states and English everywhere. there is no apple intelligence and siri section (just siri instead). There is also no eraser function in the photo app.
Hello.
Here is my AASA file (my appID changed):
{
"applinks": {
"apps": [],
"details": [
{
"appIDs": [ "A123B4567C.app.myapp.tool" ],
"components": [
{ "/": "/en", "exclude": true },
{ "/": "/en/*", "exclude": true },
{ "/": "/workspace/*", "exclude": true },
{ "/": "*" }
],
"paths": [ "NOT /en", "NOT /en/*", "NOT /workspace/*", "*" ]
}
]
}
}
I need to open all links with my app except those with excluded flag.
When I open 'right' links, my app opens them (that's great).
When I open excluded link (e.g. https://myapp.app/workspace/personal) Safari opens it (that's great) but then the app is launched (that's what not expected).
What I already checked:
added the old "paths" property (it wasn't there originally)
rebooted my device
reinstalled my app from the TestFlight then from the AppStore
asked ChatGPT
used AASA validator (branch.io one)
cleared Safari cache
checked my links for redirects
What else can I check? Thanks.
I have implemented SSL pinning by following this article https://developer.apple.com/news/?id=g9ejcf8y , however pen testing team was able to bypass SSL pinning using Objection & Frida tools.
I am using URLSession for API calls. I used Xcode 16. My app's minimum iOS deployment version is 16 onwards.
<key>NSAppTransportSecurity</key>
<dict>
<key>NSPinnedDomains</key>
<dict>
<key>*.mydomain.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSPinnedCAIdentities</key>
<array>
<dict>
<key>SPKI-SHA256-BASE64</key>
<string>my SHA256 key</string>
</dict>
</array>
</dict>
</dict>
</dict>
Could anyone suggest how to mitigate this bypass mechanism?
Is there a way for my app to know that a phone number has just been messaged to or a call to 911 just started? Or SOS has just been executed by the user?
Topic:
App & System Services
SubTopic:
Automation & Scripting
Tags:
iOS
SMS and Call Reporting
CallKit
I'm encountering an issue where a specific BLE device (a Telematics Control Unit) is being discovered by some iPhone models but not others, all running the same iOS version (18.0.1).
Here's the breakdown:
Successful discovery: iPhone 11, iPhone 14 Plus, iPhone 6s
No discovery: iPhone 13, iPhone 12 mini
Firmware: The TCU firmware is up-to-date.
BLE: Bluetooth is enabled on all devices.
I've tried basic troubleshooting like restarting devices and resetting network settings, but the issue persists. Could this be related to differences in Bluetooth chipsets or antenna designs between iPhone models, even with the same iOS version? Are there any known compatibility issues between this TCU and specific iPhone models?
Any insights or suggestions for further debugging issue would be greatly appreciated!
Hello, Dear Developers
Problem Description
My team is working on functionality test in iOS18.
Basically, application functionality works as expected without any modification.
However, We found a small issue in settings application.
iOS 17
In iOS17, 3rd party OSS license string in settings application would been displayed if the license button is been clicked.
Model: iPhone SE 3
OS Version: 17.6.1
iOS 18
However, in iOS18, nothing but a blank page.
Model: iPhone SE 3
OS Version: 18.0.1
Settings.bundle
Below are files in settings.bundle.
What I've searched
Using XCode 16 makes no change
Nothing about settings.bundle in iOS 18 release note
A similar post: https://forums.developer.apple.com/forums/thread/764519
The solution in the post doesn't solve my problem.
If you know the solution, please let me know.
Best wishes.
Yesterday I upgraded to IOS 18.1 RC, after the update, I went to the privacy and security section, then went back out and then back in, and a gray background appeared on the selected item, all the items in privacy Privacy and security are all grayed out when I go back in and then click back in. I've updated and reinstalled, but the problem still persists. Does anyone else have the same problem? I use Iphone 15PM, Thanks All!
My app supports only iPhone mode, and when it runs on an iPad device, it normally displays compatible iPhone mode.
But my code as long as you use the AVPictureInPictureController, open the picture in picture, will lead to get [UIScreen mainScreen] bounds became the real width and height, so the UI disorder;
How should my application be compatible with this?
Hello!
I have an iPhone 15 Pro on 18.1 with my developer account Linked. but 18.2 not showing up. I try disconnect all.. nothing.
‘of course I Check my account dev and everything its okay.
I'm using an iPhone 15 Pro Max and running developer beta 18.2 released today. I've already been an 'Apple Intelligence' user and now have been able to link it with my PAID ChatGPT account.
HOWEVER;
I'm searching for these Image features everyone seems to be posting about and cannot find them anywhere.
I'm apparently supposed to sign up for beta access to the Image features through some new Apple natively released app that was supposedly included in this build update, which I cannot find.
What gives??!!
My App development language is only Arabic. I am using textField to Login User, whenever user long pressed, ToolTip showed up. Problem is with tool tip text it is flipped. My device language is English
Hi, is there any way to interact with the eye tracking accessibility feature in iOS and iPadOS? I want to be able to trigger an eye tracker recalibration programmatically. Also if possible, I would like to be able to retrieve gaze location data.
These are not intended to be features on an app being published to the app store but rather a custom made accessibility app.