For iOS 14 and watchOS 7.0, I completely recoded and modernized my app using Swift (was Objective C). I am almost done and am most proud of the job, but I have this issue that I need to fix on the Apple Watch app. I am not able to transfer data to the Apple Watch from the iPhone and get the following console messages. (The [xxx:xxxxxx] are my modification of the console messages.). I am guessing that the first 2 messages are the thing I need to fix and I need to fix this issue before I submit the app.
2020-09-24 08:29:02.873423-0400 WatchApp Extension[xxx:xxxxxx] [default] lookupMainFuncAddressInMachHeader:71: Invalid Swift entry point data
2020-09-24 08:29:02.874413-0400 WatchApp Extension[xxx:xxxxxx] [default] lookupMainFuncAddressInMachHeader:77: Swift entry point addres could not be determined.
2020-09-24 08:29:04.001368-0400 WatchApp Extension[xxx:xxxxxx] [WC] denying activation due to missing delegate
ExtensionDelegate: your iphone is Reachable
ExtensionDelegate: Session activated
2020-09-24 08:29:10.884500-0400 WatchApp Extension[xxx:xxxxxx] [WC] already in progress or activated
2020-09-24 08:29:15.046379-0400 WatchApp Extension[xxx:xxxxxx] [WC] WCSession is missing its delegate
2020-09-24 08:29:15.047176-0400 WatchApp Extension[xxx:xxxxxx] [WC] WCSession is missing its delegate
2020-09-24 08:29:15.047860-0400 WatchApp Extension[xxx:xxxxxx] [WC] WCSession is missing its delegate
2020-09-24 08:29:15.782075-0400 WatchApp Extension[xxx:xxxxxx] [WC] already in progress or activated
2020-09-24 08:29:24.390293-0400 WatchApp Extension[xxx:xxxxxx] [WC] already in progress or activated
2020-09-24 08:31:57.059417-0400 WatchApp Extension[xxx:xxxxxx] [WC] already in progress or activated
2020-09-24 08:32:00.055282-0400 WatchApp Extension[xxx:xxxxxx] [WC] already in progress or activated
InterfaceController: your iphone is Reachable
2020-09-24 08:32:00.058230-0400 WatchApp Extension[xxx:xxxxxx] [WC] already in progress or activated
2020-09-24 08:32:08.427192-0400 WatchApp Extension[xxx:xxxxxx] [WC] already in progress or activated
2020-09-24 08:32:13.374677-0400 WatchApp Extension[xxx:xxxxxx] [WC] WCSession is missing its delegate
2020-09-24 08:32:13.375717-0400 WatchApp Extension[xxx:xxxxxx]] [WC] WCSession is missing its delegate
2020-09-24 08:32:13.376426-0400 WatchApp Extension[xxx:xxxxxx] [WC] WCSession is missing its delegate
2020-09-24 08:32:51.861915-0400 WatchApp Extension[xxx:xxxxxx] [WC] already in progress or activated
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I've created a macOS app using Catalyst from my iPad app. I see this message in the console and I need to know what it means. Thanks.
I have an app that uses Core Data and CloudKit that I am trying to convert into a SwiftData CloudKit app. Things were working very well until this most recent beta (beta 5) of Xcode 15.0. I have image data which the app saves as Data in external storage. I let Xcode convert my Core Data model in to a SwiftData model. As I said, things were working well. I could turn the image data into an Image for SwiftUI. That is, until beta 5. With beta 5, I get the following.
SwiftData/BackingData.swift:210: Fatal error: 'try!' expression unexpectedly raised an error: Swift.DecodingError.dataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: "The given data was not valid JSON."
Well the data is NOT JSON, it is image data and yet, I get this fatal error. Does anybody else see this?
I have saved data using the app on the beta 5 simulator using SwiftData and I have verified that the data is correct using my core data app. The images are fine.
I have used Xcode for app signing since its inception. Before that, I managed signing like everybody else did - manually. Today I uploaded the iOS version of my app fine, but when I tried to upload the macOS version, I got the following.
Invalid Provisioning Profile Signature. The provisioning profile included in the bundle com.blablabla.BlaBla [com.blablaba.BlaBla.pkg/Payload/BlaBla.app] cannot be used to submit apps to the Mac App Store until it has a valid signature from Apple. For more information, visit the macOS Developer Portal.
This is the first time that I've gotten this error. I am probably missing something simple. At least, I hope that I am. Can anybody help me? I am using Xcode 14.3.
I'm using SwiftData with an @Model and am also using an @ModelActor. I've fixed all concurrency issues and have migrated to Swift 6. I am getting a console error that I do not understand how to clear. I get this error in Swift 6 and Swift 5. I do not experience any issue with the app. It seems to be working well. But I want to try to get all issues taken care of. I am using the latest Xcode beta.
error: the replacement path doesn't exist:
"/var/folders/1q/6jw9d6mn0gx1znh1n19z2v9r0000gp/T/swift-generated-sources/@_swiftmacro_17MyAppName14MyModelC4type18_PersistedPr> opertyfMa.swift"
I have a number of 'AttributeGraph: cycle detected through attribute' console messages. On a whim, I commented out the two ScrollViews which I have in the app and the messages stopped. I set a symbolic breakpoint at 'print_cycle' to break when the attribute graph cycle is detected. Sure enough, the ScrollView has become the first responder.
#5 0x0000000184488a1c in ___lldb_unnamed_symbol120650 ()
#6 0x00000001849efd94 in ___lldb_unnamed_symbol168748 ()
#7 0x00000001849ed128 in ___lldb_unnamed_symbol168728 ()
#8 0x00000001849ec26c in ___lldb_unnamed_symbol168655 ()
#9 0x00000001849ec400 in ___lldb_unnamed_symbol168660 ()
#10 0x0000000184baa210 in ___lldb_unnamed_symbol185453 ()
#11 0x0000000184baa260 in ___lldb_unnamed_symbol185454 ()
#12 0x00000001a277ed60 in -[UIResponder _setFirstResponder:] ()
#13 0x00000001a2b29d38 in -[UIView _setFirstResponder:] ()
#14 0x00000001a277ed50 in -[UIResponder _setFirstResponder:] ()
#15 0x00000001a2b29d38 in -[UIView _setFirstResponder:] ()
#16 0x00000001a2ad55ac in -[UIScrollView _becomeFirstResponder] ()
I can't remove the ScrollViews, so I wonder if there is anything I can do about this.
I added Core Data to my app. My core data model has an Entity with 3 Binary Data attributes with external storage along with other attributes. I saved an array of data to core data and when I examine the result on CloudKit Dashboard, I see two of the three data record fields are of type Bytes and one is of type CKAsset. Looking at a particular piece of data in the cloud (I added Queryable to recordName), I see the CKAsset data as 'Binary File (645.17KB)' and the Bytes data as '77+9UE5HDQ (660.66KB)'. Will this pose a problem? Why isn't the data all CKAssets in CloudKit? Will the Bytes record field hold enough data? Searching the web, I've see others having problems with Binary Data and Core Data Plus CloudKit in the past, but nobody has mentioned this specific result.
Xcode 15 beta is giving me the following warning for my Mac App (Mac Catalyst), SDK: macOS destination.
Only one native Mac app can be added to the App Store.
I don't see the warning on Xcode 14.3.1.
What gives? I don't see anything about this in the release notes for the beta version.
I have SwiftData and CloudKit working on a new version of my UIKit app. The current version uses CoreData/CloudKit I have a question. How does one know when there there is new or deleted data to update a view in a UIKit app with SwiftData? CoreData has NSPersistentStoreRemoteChangeNotificationOptionKey. What does SwiftData have that's equivalent? It's not feasible to redo my whole app to use SwiftUI at this stage.
I get the following message when I try to run this app in Xcode.
Could not launch AppName. Runningboard has returned error 5. Please check the system logs for the underlying cause of the error.
Interestingly, the destination Mac (Mac Catalyst) destination does launch. The funny thing is there is a companion app almost exactly like this one that launches fine. Any help with this would be greatly appreciated.
Xcode helped me to file a feedback. The number is FB13206919.
Running watchOS 9.0.1 and Xcode 14.0.1. Also running iOS 16.0.2. Trying to run my code on the new Apple Watch Ultra and this is what I get (see below). Rebooted everything. Still no go.
Failed with HTTP status 403: forbidden
CKRecord is a class which does not conform to the Sendable protocol. Its fields consist of NSStrings, NSData and others which are not Sendable. I understand that Apple is incrementally modifying objects to be sendable, but I am experiencing and I would assume others are experiencing a very large number of warnings (for now) about CKRecords and Sendable.
It may be too much to make CKRecord Sendable and it may be too much to create a Sendable version of CKRecord, but it would be nice if it could at least be investigated.
My particular situation is I have created a Protocol named CKMethods which some of my view controllers use to download and upload CKRecords. I suddenly have a large number of warnings about non-sendable types being sent from main actor-isolated context to non-isolated instance method. The CKRecords sent to and from the protocol do not get mutated and I have never had a problem with data races in the years that I have had this protocol. At some point, the warnings will probably become errors and I definitely do not want to get to that point.
I am still coming up to speed on Swift Concurrency, so there may be a more simple solution than the one I am working on - creating a Sendable Struct for every CKRecord type that I have in my app and modifying all of the methods to pass the Struct instead of a CKRecord and convert the Struct to a CKRecord for upload and convert the CKRecord to the Struct for download.
I'm in the process of converting one of my apps to SwiftData. I converted the other ones over. This app has a much more involved Schema, but SwiftData seems to handle it well. My issue is when I try to fetch data based on a. #Predicate. Here's my code.
let predicate = #Predicate<Data> { data in
data.result == result
&& data.variable!.starts(with: SomeString)
}
let sortBy = [SortDescriptor<Data>(\.result]
let descriptor = FetchDescriptor<Data>(predicate: predicate, sortBy: sortBy)
if let theData = try? context?.fetch(descriptor) {
The if let at the bottom fails. Note that 'variable' is optional while result is not. I have to use ! in the predicate since it's a bool that is returned. If my predicate were just data.result == result, then all is well. I can then check the received data for the second condition in the predicate just fine. It just doesn't work inside of the Predicate. The same is true if I used contains. Anybody else having this issue? I'm using Xcode 15.0 beta 6.
Question. Is there a way to hook up the Apple Vision Pro to the Mac for development without using the $299 dongle? I was thinking of a USB-C cable from the battery to the Mac. Someone mentioned wireless, but usually one has to connect first.
I'm going through the migration to Swift 6 and I am running up with a few things. I have two view controllers which conform to the CLLocationManagerDelegate protocol. Both methods of the delegate have the same issue in my code. Below is an example of the warning received.
Main actor-isolated instance method 'locationManagerDidChangeAuthorization' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode