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.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I have an app with a TabView. The tabItems look fine on the iPhone, but one is cut off on the iPad. See the picture below.
The code is simple. Here it is.
.tabItem {
Label("Saved", systemImage: "lock.fill")
}
On the iPhone, the image is positioned below the text. On the iPad, the image is positioned before the text.
'Save' would work, but that's not correct either.
I'm using Xcode 15 and my minimum deployment is iOS 17.
Anybody have a work around for this?
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
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 a UIViewController wherein I set nav items, basically the title and the rightBarButtonItem. I use a SF Symbol for the image. The code is extremely simple. Here it is.
func setupNavItem() {
self.navigationItem.title = "Problem in This View"
let helpImage = UIImage(systemName: "questionmark.circle")
let rightBarItem = UIBarButtonItem(image: helpImage, style: .plain, target: self, action: #selector(showHideHelp))
navigationItem.rightBarButtonItem = rightBarItem
}
When I navigate into this view, all heck breaks loose with the constraints. What gives? I'm using Xcode Version 14.0 beta 3 (14A5270f). See the constraint info below.
2022-07-18 16:58:59.998394-0400 NavBarItemExample[28793:996095] [LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
"<NSLayoutConstraint:0x600000a79810 UIImageView:0x136d28790.width <= _UIModernBarButton:0x136d274b0.width (active)>",
"<NSLayoutConstraint:0x600000a7af80 '_UITemporaryLayoutWidth' _UIButtonBarButton:0x136d27280.width == 0 (active)>",
"<NSLayoutConstraint:0x600000a793b0 'IB_Leading_Leading' H:|-(>=11)-[_UIModernBarButton:0x136d274b0] (active, names: '|':_UIButtonBarButton:0x136d27280 )>",
"<NSLayoutConstraint:0x600000a79400 'IB_Trailing_Trailing' H:[_UIModernBarButton:0x136d274b0]-(8)-| (active, names: '|':_UIButtonBarButton:0x136d27280 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600000a79810 UIImageView:0x136d28790.width <= _UIModernBarButton:0x136d274b0.width (active)>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
I think that there is a mistake in the Wayfinder watch face for Apple Watch Ultra. Note that in my picture, longitude shows '-81.54327 W', but because W is used, longitude should be either 81.54327 W or just -81.54327.
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 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 have an app with a CloudKit Public Database in which a CKRecord can contain a CKAsset or two that holds the url of image data. I don't want to always obtain the image data so my desiredKeys excludes the CKAsset key in the CKRecord in that case. I use the following Swift function.
var (matchResults, queryCursor) = try await database.records(matching: query, desiredKeys: desiredKeys)
The desiredKeys variable could be an array of strings with the keys of CKRecord fields I want to return or nil if I want all of the data including the asset data.
After I have the records, I do the following.
if let imageAsset = record["ImageAsset"] as? CKAsset,
let url = imageAsset.fileURL,
let data = try? Data(contentsOf: url) {
self.imageData = data
}
However, when I exclude the "ImageAsset" key from the desiredKeys array, my if let imageAsset contains the asset information. Looking at the received data, I can see that other keys that I exclude are not being downloaded, but the CKAsset url appears to be downloaded. Why? I expected that the if let would have been nil and the code within the if let would not have been executed.
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.
I actually have found a workaround to an issue I reported on earlier. Here it is by example.
let predicate = #Predicate<Data> { data in
data.result == result
&& data.variable?.starts(with: SomeString) ?? false
}
Note the data.variable?. and the ?? false. This works. I still don't think I should have to discover these things. Something needs to be fixed on Apple's end.
I get the following.
403 Forbidden
Anybody else have this problem?
The new versions of my apps will have a minimum deployment target of iOS 17. So, why do I need to supply screenshots in App Store Connect for a 5.5" Display iPhone? There are no 5.5" Display iPhones which will support iOS 17.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
iPhone
App Store Connect
If I do this, I'll only have to submit the iOS version of the app and not have to dork with two app reviews. What do you think? What am I missing?
Any info on this?