Hello!
Is there a way to perform an action before alert (no matter which) appears and sheet (no matter which) opens? Perhaps, system event or something like this.
Posts under iOS tag
200 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I’m developing an app using RealityKit and RealityView. On newer iPhones, such as the iPhone 15 Pro, Object Occlusion appears to be enabled by default, which causes 3D entities to be hidden behind real-world objects in the scene. However, I need to disable this behavior to ensure proper rendering of my 3D content.
This issue does not occur on older devices like the iPhone 13, where the app works as intended. I haven’t been able to find a solution to explicitly disable object occlusion on the newer devices for RealityView.
Any guidance or suggestions to resolve this issue would be greatly appreciated! Thanks!
My app currently doesn't specify multiple different appearances (Any, Dark, Tinted) for the App Icon. I want to release an update in which I plan to create a new AppIcon resouce which is going to contain these 3 appearances so that users on iOS 18 can have better experience.
Once I will provide the new App Icon with the Any, Dark and Tinted variants, which of these variants will the App Store use for my app on the App Store? Does it depend on the user's system-wide choice of appearance? That is, would the App Store show a different icon appearance for my app for a person using the "Dark" option and a different app icon for the person using the "Light" option?
Can I force the App Store to always display the "Any" variant of my icon on the App Store, regardless of the user's dark mode setting?
My app targets iOS 13. What would happen if a person running iOS 13 would install the new update of my app, which newly contains all 3 App Icon color appearances? Would the "Any" variant be displayed and would iOS 13 ignore the "Dark" and "Tinted" variants? Or is there no backwards compatibility and older iOS version would display a blank app icon (the icon used by iOS for apps, which do not specify an App Icon)?
P.S. Is this documented somewhere? Perhaps in a WWDC video or in documentation? I could not find enough in-depth information on this topic (especially on app icon appearance behavior on iOS 17 and older).
Does any ont encountered such crash? It only occured on iOS18 device.
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '_endUndoGroupRemovingIfEmpty:: _UITextUndoManager 0x30d3bca50 is in invalid state, endUndoGrouping called with no matching begin
UserInfo:(null)'
Pthread id: 2420148
Thread 0 Crashed:
0 CoreFoundation __exceptionPreprocess + 164
1 libobjc.A.dylib objc_exception_throw + 88
2 Foundation -[NSUndoManager endUndoGrouping] + 0
3 Foundation __NSFirePerformWithOrder + 296
4 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36
5 CoreFoundation __CFRunLoopDoObservers + 552
6 CoreFoundation __CFRunLoopRun + 788
7 CoreFoundation CFRunLoopRunSpecific + 588
8 GraphicsServices GSEventRunModal + 164
9 UIKitCore -[UIApplication _run] + 816
10 UIKitCore UIApplicationMain + 340
11 application main (main.m:39)
12 (null) 0x00000001abfecde8 0x0 + 7180570088
I try with this URL App-prefs:General&path=Date&Time it work on iOS 17 but not with iOS 18
i never imagined that an apple product could do such. a thing . i 've updated to the latest version , 15.3 what should i do next time? i've had to restart it three times, the last one finally helped
here is the link https://youtu.be/-aqjzVKMZGA
UITabBarController
|
|
VC_Tab1 --------------------------- VC_Tab2
| |
| |
VC_Tab1_Child VC_Tab2_Child
|
(HeaderView)
|
(MyButton)
The structure of the view controllers and views in the project is as described above.
<case 1>
self.navigationController?.popToRootViewController(animated: false)
tabBarController.selectedIndex = 1
When popToRootViewController(animated: false) is called in VC_Tab1_Child, followed by setting the tab controller’s selectedIndex = 1, the following results are observed:
viewWillAppear(_:), <VC_Tab2_Child>
deinit, <VC_Tab1_Child>
viewDidAppear(_:), <VC_Tab2_Child>
The originally expected results are as follows
viewWillDisappear(_:), <VC_Tab1_Child>
viewDidDisappear(_:), <VC_Tab1_Child>
deinit, <VC_Tab1_Child>
deinit, <HeaderView>
deinit, <MyButton>
headerView.backButton.rx.tap -> Event completed
headerView.backButton.rx.tap -> isDisposed
viewWillAppear(_:), <VC_Tab2_Child>
viewDidAppear(_:), <VC_Tab2_Child>
The HeaderView belonging to VC_Tab1_Child was not deallocated, and the resources associated with that view were also not released. Similarly, VC_Tab1_Child.viewWillDisappear and VC_Tab1_Child.didDisappear were not called.
<case 2>
self.navigationController?.popToRootViewController(animated: false)
DispatchQueue.main.async {
tabBarController.selectedIndex = 1
}
After performing the pop operation as shown in the code and waiting for a short period before testing, the expected results were generally achieved. (However, rarely, the results were similar to those observed when called without async.)”
<case 3>
self.navigationController?.popToRootViewController(animated: false)
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
tabBarController.selectedIndex = 1
}
When a sufficient delay was ensured as described above, the expected results were achieved 100% of the time.”
The abnormal behavior is more pronounced in iOS versions prior to 18 and varies depending on the iOS version.
I couldn’t find any documentation explaining the unexpected behavior shown in the results above. What could be the cause? The simulation code is provided below.
https://github.com/linusix/UITabBarController_Test2
When I attempt to preview my code, I encounter an error message stating, “Cannot preview in this file: Failed to launch (App Name).” This issue is specific to this particular app. I attempted creating a new project, and that works fine.
This is what it says in the diagnostics:
| [Remote] JITError
|
| ==================================
|
| | [Remote] LLVMError
| |
| | LLVMError: LLVMError(description: "The file was not recognized as a valid object file")
It crashes any app including System Preferences or etc.
Below is an example of crash log with my own app.
2024-09-26_15-05-07.3244_+0800-b0897577a4d8c61bb9452bf8ae1f2a0ca097aabc.crash
Last Exception Backtrace:
0 CoreFoundation 0x19fa6508c __exceptionPreprocess + 164 (NSException.m:249)
1 libobjc.A.dylib 0x19cd672e4 objc_exception_throw + 88 (objc-exception.mm:356)
2 CoreFoundation 0x19fa29140 -[__NSArrayM objectAtIndexedSubscript:] + 592 (NSArrayM.m:309)
3 UIKitCore 0x1a2fb6554 -[UIInputSwitcherView localizedTitleForItemAtIndex:] + 32 (UIInputSwitcherView.m:860)
4 UIKitCore 0x1a2fbda68 -[UIKeyboardMenuView customizeCell:forItemAtIndex:] + 384 (UIKeyboardMenuView.m:1392)
5 UIKitCore 0x1a2fb68ac -[UIInputSwitcherView customizeCell:forItemAtIndex:] + 88 (UIInputSwitcherView.m:914)
6 UIKitCore 0x1a2fb681c -[UIInputSwitcherView tableView:cellForRowAtIndexPath:] + 192 (UIInputSwitcherView.m:907)
Good evening. I have come up with this amazing and revolutionary idea that is going to change the ent world for the better.
I’m a 23 year old Design Engineer from Greece and I would like to come to direct contact with the Apple Design Team, in order to discuss this project and the best case scenario, sell it to you.
The foldable iPhone is not a good idea. Its not revolutionary and it’s going to leave a big black mark in Apple history.
With my idea, the whole world will see again the greatness of the biggest company in history.
Hello everyone,
I hope you’ll all bear with me as I get up to speed. My background is in Unix, procedural languages, mission critical databases and enterprise applications.
I’ve just started heading a team with an iOS app used in healthcare that contains confidential patient information (PHI) that's governed by HIPAA and FDA cybersecurity, etc.
It seems there’s some contention in the team over whether the app, SQLite db, and medical images belong in the Documents or an Application Support directory in the Library.
From everything I’ve read, it seems that Apple’s intent is Library/Application Support.
Two questions:
Which is the correct location? And hopefully, a few compelling justifications.
On one of our iPads, the app stopped displaying what was two years of data in SQLite. I haven’t yet tested for index corruption, however one of the programmers believes this resulted from an iOS update that needed space and cleared data in the cache (but that makes no sense to myself).
Feedback highly appreciated. Many thanks,
David
Why, because somebody has to
My code
extension MyViewController: UICollectionViewDelegate, UICollectionViewDataSource {
func collectionView(
_ collectionView: UICollectionView,
cellForItemAt indexPath: IndexPath
) -> UICollectionViewCell {
if let cell = collectionView.dequeueReusableCell(
withReuseIdentifier: "CollectionViewCellID",
for: indexPath
) as? CollectionViewCell {
cell.setup()
return cell
}
return UICollectionViewCell()
}
func collectionView(
_ collectionView: UICollectionView,
didSelectItemAt indexPath: IndexPath
) {
// Unnecessary dequeue
guard collectionView.dequeueReusableCell(
withReuseIdentifier: "CollectionViewCellID",
for: indexPath
) is CollectionViewCell else { return }
// My action for selecting cell
print("Cell Selected")
}
}
Error:
*** Assertion failure in -[UICollectionView _updateVisibleCellsNow:], UICollectionView.m:5673
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Expected dequeued view to be returned to the collection view in preparation for display. When the collection view's data source is asked to provide a view for a given index path, ensure that a single view is dequeued and returned to the collection view. Avoid dequeuing views without a request from the collection view. For retrieving an existing view in the collection view, use -[UICollectionView cellForItemAtIndexPath:] or -[UICollectionView supplementaryViewForElementKind:atIndexPath:].
Solution:
The problem was doing unnecessary dequeuing in didSelectItemAt
when selecting the cell. In previous iOS like 17 or 16 or lower, it was allowed to dequeue where it is not really needed but from iOS 18, it may restricted to unnecessary dequeuing. So better to remove dequeue and use cellForItem(at) if we need to get cell from collection view.
Example
extension MyViewController: UICollectionViewDelegate, UICollectionViewDataSource {
func collectionView(
_ collectionView: UICollectionView,
cellForItemAt indexPath: IndexPath
) -> UICollectionViewCell {
if let cell = collectionView.dequeueReusableCell(
withReuseIdentifier: "CollectionViewCellID",
for: indexPath
) as? CollectionViewCell {
cell.setup()
return cell
}
return UICollectionViewCell()
}
func collectionView(
_ collectionView: UICollectionView,
didSelectItemAt indexPath: IndexPath
) {
guard collectionView.cellForItem(at: indexPath) is CollectionViewCell else { return }
// My action for selecting cell
print("Cell Selected")
}
}
Hello, I am using Xcode 15.3 and doesn't add any support for Apple Intelligence yet as it requires Xcode 16+. But I see many crashlogs related to Apple Intelligence, I assume crash is related to UITextView element of UIKit.
Can you please help me to resolve this issue, how can I fix it?
There are few lines of the crashlog, they are all similar.
Thread 0 name:
Thread 0 Crashed:
0 UIKitCore 0x0000000196692d74 specialized UITextView._intelligenceCollectContent(in:collector:) + 2748 (UITextView_IntelligenceSupport.swift:37)
1 UIKitCore 0x0000000196691eb0 @objc UITextView._intelligenceCollectContent(in:collector:) + 60 (<compiler-generated>:17)
2 UIIntelligenceSupport 0x000000026b91f1e4 UIIntelligenceElementCollector.performCollection(_:) + 424 (UIIntelligenceElementCollector.swift:46)
3 UIKitCore 0x0000000196473b70 specialized UIView._intelligenceElement(in:using:transformToRoot:) + 1440 (UIView_IntelligenceSupport.swift:132)
4 UIKitCore 0x000000019647a800 specialized UIView._intelligenceCollectElement(for:in:using:transformToRoot:) + 424 (UIView_IntelligenceSupport.swift:84)
5 UIKitCore 0x00000001964792ec @objc UIView._intelligenceCollectElement(for:in:using:transformToRoot:) + 136 (<compiler-generated>:77)
6 UIKitCore 0x0000000196472c20 closure #1 in UIView._intelligenceCollectSubelements(in:using:transformToRoot:) + 256 (UIView_IntelligenceSupport.swift:55)
7 UIIntelligenceSupport 0x000000026b91f728 UIIntelligenceElementCollector.performElementCollection(_:) + 424 (UIIntelligenceElementCollector.swift:61)
v
8 UIKitCore 0x00000001964728f4 UIView._intelligenceCollectSubelements(in:using:transformToRoot:) + 928 (UIView_IntelligenceSupport.swift:54)
9 UIKitCore 0x0000000196473354 @objc UIView._intelligenceCollectSubelements(in:using:transformToRoot:) + 136 (<compiler-generated>:0)
10 UIKitCore 0x0000000196479810 closure #3 in UIView._intelligenceElement(in:using:transformToRoot:) + 256 (UIView_IntelligenceSupport.swift:165)
11 UIIntelligenceSupport 0x000000026b91fb54 UIIntelligenceElementCollector.performElementArrayCollection(_:) + 144 (UIIntelligenceElementCollector.swift:78)
...
...
225 UIIntelligenceSupport 0x000000026b8ee630 closure #1 in IntelligenceCollectionListener.collectFragments(_:) + 192 (IntelligenceCollectionListener.swift:60)
226 UIIntelligenceSupport 0x000000026b91b138 thunk for @escaping @callee_guaranteed () -> () + 36
227 CoreFoundation 0x000000019376b6e4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 28 (CFRunLoop.c:1818)
228 CoreFoundation 0x0000000193759910 __CFRunLoopDoBlocks + 356 (CFRunLoop.c:1860)
229 CoreFoundation 0x00000001937595f4 __CFRunLoopRun + 2432 (CFRunLoop.c:3217)
230 CoreFoundation 0x0000000193758830 CFRunLoopRunSpecific + 588 (CFRunLoop.c:3434)
231 GraphicsServices 0x00000001df7381c4 GSEventRunModal + 164 (GSEvent.c:2196)
232 UIKitCore 0x00000001962beeb0 -[UIApplication _run] + 816 (UIApplication.m:3844)
I asked this question of AI and it said that yes it was possible, and gave some sample code
override class func filterConfiguration() -> ILMessageFilterExtensionConfiguration {
let config = ILMessageFilterExtensionConfiguration()
// You can specify multiple network URLs
config.networkURLs = [
URL(string: "https://api1.example.com/filter")!,
URL(string: "https://api2.example.com/filter")!
]
return config
}
And said the OS will try the first, and if there's no response within the first few seconds it'll move onto the second.
However, there is no such class as ILMessageFilterExtensionConfiguration AFAICT, if there is then how to access/use it, if there isn't, then I wonder how the AI counjured it up?
If multiple urls can be specified, then can the extension also specify a particular API to use and switch between them at some point?
When does the OS call filterConfiguration()?
Hiya,
I am having issues trying to use previews in the xcode 15 beta, i am using an M2 macbook air with 8gb of ram.
I am using MacOS Sonoma and iOS 17.0 Beta 1 and am struggling using previews, the base simulator works but no previews.
I am not receiving any error so am very confused.
Any help would be majorly appreciated.
Thanks,
Gus
I used .tint(.yellow) to change the default back button color. However, I noticed that the color of the alert button text, except for .destructive, also changed. Is this a bug or Apple’s intended behavior?
this occurs in iOS 18.1 and 18.1.1
Below is my code:
// App
struct TintTestApp: App {
var body: some Scene {
WindowGroup {
MainView()
.tint(.yellow)
}
}
}
// MainView
var mainContent: some View {
Text("Next")
.foregroundStyle(.white)
.onTapGesture {
isShowingAlert = true
}
.alert("Go Next View", isPresented: $isShowingAlert) {
Button("ok", role: .destructive) {
isNextButtonTapped = true
}
Button("cancel", role: .cancel) { }
}
}
thank you!
Some users experience this kind of crash:
NSInternalInconsistencyException:Use of the class INVocabulary requires the entitlement com.apple.developer.siri.
Make sure you have enabled the Siri capability in your Xcode project.
During app startup, calling the following code causes a crash:
INVocabulary *vocabulary = [INVocabulary sharedVocabulary];
But our project definitely has siri configured to be available.
Now that we can't figure it out, is it a bug in the system?
When using Apple's Journal app through iPhone Mirroring, the user is allowed to authenticate via TouchID on the Mac instead of requiring you to unlock your phone, authenticate and then re-lock it to access it again in iPhone Mirroring.
Any other app that's using a call to authenticate via FaceID can't do this under iPhone Mirroring. Is there a new API call for this, or is it still a private API for Apple only?
HI!
I am interested in redirecting the user to some specific iOS settings but just discovered that the paths/URLs to the settings change sometimes across iOS versions.
Is there any official Apple resource with a list of all the paths for the iOS settings? Or at least for the latest iOS version? I found some non-official resources without citing the source, but it would be great to have official documentation about this topic.
Thank you very much in advance for taking your time to read this post!
Best regards,
Iván
I've got a few questions about device check, and would be grateful if anybody knows the answers:
why is DC not reset when the device transfers between users?
The canonical example of why an app might use DC is if it offers a promotion and to stop user's from getting that promotion multiple times.
However, using the same example scenario yes you've stopped the first user from getting multiple promotions but then if that device is transferred to another user you've stopped them from getting any promotions at all?
how can you test things when the bits can't be reset? If once you've set the bits on a device then you can no longer ever use that device again to test the apps behavior in the situation when the bits are unset.
does the app have complete freedom to set the timestamp to whatever it wants? For example, could the app set a bit with a timestamp of epoch?
if the bits are shared between all apps from the same developer, then supposing that developer have more apps in the App Store then there are bits? If they have 5 apps offering a promotion and a device has previously had 4 apps installed, then the user wants to install a 5th app, but with all 4 bits now then the user will be able to abuse the promotion on the 5th app because the app has no way of recording if the promo has been used or not as the collective bits have been used up?