Unfortunately not.
What I ended up doing was displaying the popover at specific fixed coordinates to make it look like the origin is the button item in the toolbar. It's not ideal, but it does the job.
Here is the result:
Post
Replies
Boosts
Views
Activity
Never mind. I was printing the string in the console with the "po" command, like so:
po String(localized:"\(1000) apples")
For some reason when using "po", all ' characters inside strings are displayed with a backslash.
For example this:
po "1'000"
will output this:
"1\'000"
How do you call localized strings from your code? Using NSLocalizedString or String(localized:)?
Wow, not be able to opt-out strings from interface builder files is really a problem! It often happens to add elements in IB, UILabels for example, whose content is populated via code. We really need a way for specify that a particular IB item should not be localized.
What is the recommended approach to handle these cases?
Just found that this is due to the iOS 16 preferredSearchBarPlacement feature. In order to always display the search bar we need to set this property to stacked.
if #available(iOS 16.0, *) {
navigationItem.preferredSearchBarPlacement = .stacked
}
Have you tried looking at PHCloudIdentifier?
It allows you to identify an asset synced via iCloud.
https://developer.apple.com/documentation/photokit/phcloudidentifier
I just ran into this issue. If I try to use a class instead of a struct as a diffable data source object, the hashable methods are not called causing issues.
I haven't found anything documented about this limitation. It would be nice to get an official feedback about this.
As a temporary fix, logancautrell solution works perfectly, thank you for sharing that.
I have the same exact question. Does adding or removing a Transformer class require a new version of the store?
day, what did you find out?
Thank you
I found that a way to reclaim memory is to frequently reset the context.
Since objects are invalidated after a reset, I decided to work with objects ids instead (these will remain the same after a reset).
This is my new code:
var objectsIds = managedObjectContext.allImages.map({$0.objectID})
for objectsIdsChunk in objectsIds.chunked(into: 100) {
for objectId in objectsIdsChunk {
autoreleasepool {
if let image = managedObjectContext.object(with: objectId) as? Image {
var imageData = image.imageData
}
}
}
managedObjectContext.reset()
}
This is the array chunked extension:
extension Array {
func chunked(into size: Int) -> [[Element]] {
return stride(from: 0, to: count, by: size).map {
Array(self[$0 ..< Swift.min($0 + size, count)])
}
}
}
With this solution the memory level remain low.
Some of the users of one of my app have the same exact crash. Also in my case it's a MapKit app. Tommy8, did you figure out what was the problem?
This is my crash report:
Thread 3 name: com.apple.vectorkit.dispatch.layoutqueue
Thread 3 Crashed:
0 VectorKit 0x1ad0f8830 md::FontAtlas::freeCell(md::FontAtlasCell*) + 164
1 VectorKit 0x1ad0f8820 md::FontAtlas::freeCell(md::FontAtlasCell*) + 148
2 VectorKit 0x1ad0f7fb4 md::FontAtlas::flushOldestCell() + 104
3 VectorKit 0x1acd4f064 md::FontAtlas::finishFrame(std::__1::shared_ptr<ggl::RenderTransaction> const&) + 112
4 VectorKit 0x1acd1d89c md::LabelManager::layout(md::LayoutContext const&, md::CartographicRenderer const*, std::__1::unordered_set<std::__1::shared_ptr<md::LabelMapTile>, std::__1::hash<std::__1::shared_ptr<md::LabelMapTile> >, std::__1::equal_to<std::__1::shared_ptr<md::LabelMapTile> >, geo::StdAllocator<std::__1::shared_ptr<md::LabelMapTile>, mdm::Allocator> > const&, md::PassList&) + 2628
5 VectorKit 0x1acce723c md::LabelRenderLayer::layout(md::LayoutContext const&) + 916
6 VectorKit 0x1accec488 std::__1::__function::__func<md::CartographicRenderLayer::frame(md::LayoutContext const&)::$_0, std::__1::allocator<md::CartographicRenderLayer::frame(md::LayoutContext const&)::$_0>, void ()>::operator()() + 112
7 VectorKit 0x1accd6a00 invocation function for block in geo::TaskQueue::queueAsyncTask(std::__1::shared_ptr<geo::Task>, NSObject<OS_dispatch_group>*) + 108
8 libdispatch.dylib 0x19ae9f460 _dispatch_call_block_and_release + 32
9 libdispatch.dylib 0x19aea0f88 _dispatch_client_callout + 20
10 libdispatch.dylib 0x19aea8640 _dispatch_lane_serial_drain + 672
11 libdispatch.dylib 0x19aea91c0 _dispatch_lane_invoke + 436
12 libdispatch.dylib 0x19aeaa4a4 _dispatch_workloop_invoke + 1780
13 libdispatch.dylib 0x19aeb3e10 _dispatch_workloop_worker_thread + 652
14 libsystem_pthread.dylib 0x1e118cdf8 _pthread_wqthread + 288
15 libsystem_pthread.dylib 0x1e118cb98 start_wqthread + 8
Updated to Xcode 14.2. Same issue, can't edit my storyboard because Xcode crash. For now I can continue working with Xcode 13 but this problem is really starting to worry me.
I found the cause of the issue.
My project is a Catalyst project and I used a UIMenuBuilder inside the AppDelegate buildMenu(with:) method to remove some items from the Mac menu bar. One of the item I removed was the format menu (UIMenu.Identifier.format).
This on iOS 15 has no effect to the UITextView menu, but on iOS 16 removing the format menu cause the UITextView menu to also hide the "Format" item. I think it has someting to do with the fact that the item was renamed from "BIU" (iOS 15) to "Format" (iOS 16).
So, I added a condition to remove the menu items only when the environment is macCatalyst and now everything works as expected.
Hi Claude31.
Did you set allowsEditingTextAttributes to true?
When you do that, users are able to change formatting to bold, underline and italics on iPhone via the menu and on iPad via dedicated buttons above the keyboard.
I just tried to create a new project with just a single UITextView and the button correctly appear also on iOS 16 (the name of the button on iOS 16 changed from BIU to "Format").
So, it seems to work with new projects, but in my case, for some reason, all text views in my project are no more showing the "Format" button when the app is executed on iOS 16 (works ok on iOS 15).
I also tried to add in my project an empty controller with a UITextView with all attributes set to defaults values (only allowsEditingTextAttributes to true) and also this text view does not show the "Format" button.
On the new project the options I have in the menu are:
Cut
Copy
Paste
Replace...
Format
Look Up
Translate
Search Web
Share...
On my project the options are:
Cut
Copy
Paste
Replace...
Look Up
Translate
Search Web
Share...
I'm trying to figure out what in my project is causing all text views to lose the Format button on iOS 16.
Has anyone else had this problem?
Thank you
Hi. Unfortunately promoted in-app purchases are not currently supported with StoreKit 2.
Check this post:
https://developer.apple.com/forums/thread/706538?answerId=714432022#714432022
I have the same issue in a project with 8 storyboards. All are displayed fine but one. When I try to load this particular storyboard Xcode just crash.
This happens on Xcode 14 and Xcode 14.1 RC.
Works fine on Xcode 13.4.1.
Anybody else experienced Xcode 14 crashing issues when opening a particular storyboard?
Attached one of Xcode crash log.
Xcode-2022-10-31-223133.ips
Thank you