Posts

Post marked as Apple Recommended
833 Views
During last night, Apple allegedly pushed new XProtect antivirus signatures. After that, I think XProtect found the malware Pirrit in my Xcode Simulator files from Apple. I'm not kidding. This is an excerpt from the XProtect log (notice the NSFilePath!): 2024-05-01 07:54:12.951 Pirrit 👉 no status_message report time 0.0000000 {"action":"report","path":{"modificationDate":732892166.8634809,"path":"\/Library\/Developer\/CoreSimulator\/Images\/1944D6AF-4D6B-4877-8F87-924EB62FC984.dmg","creationDate":732892166.8634809},"status":{"description":"Error deleting path: \/Library\/Developer\/CoreSimulator\/Images\/1944D6AF-4D6B-4877-8F87-924EB62FC984.dmg: Error Domain=NSCocoaErrorDomain Code=513 \"“1944D6AF-4D6B-4877-8F87-924EB62FC984.dmg” couldn’t be removed because you don’t have permission to access it.\" UserInfo={NSUserStringVariant=(\n Remove\n), NSFilePath=\/Library\/Developer\/CoreSimulator\/Images\/1944D6AF-4D6B-4877-8F87-924EB62FC984.dmg, NSUnderlyingError=0x1247612a0 {Error Domain=NSPOSIXErrorDomain Code=1 \"Operation not permitted\"}}.","causedBy":[],"code":24}} 2024-05-01 07:54:13.197 Pirrit message not in JSON format 2024-05-01 07:54:41.125 Pirrit ⚠️ FailedToRemediate time 0.0000280 {"caused_by":[],"execution_duration":2.8014183044433594e-05,"status_code":24,"status_message":"FailedToRemediate"} XProtect also detects another threat on my machine: 2024-05-01 10:09:58.530 BadGacha ⚠️ ThreatDetected time 0.0000120 {"caused_by":[],"execution_duration":1.2040138244628906e-05,"status_message":"ThreatDetected","status_code":21} Please check your XProtect logs. There is an app that can display these logs out there. Or you can use the system logging facility. I have deleted the whole Developer folders (both at / and ~) and reinstalled Xcode (not Beta). But a new XProtect scan finds Pirrit in the Core Simulator file again! I have also attempted to install an anti virus solution (Malwarebytes), but it does not detect anything. I am wondering if we should get someone from Apple involved. I am also wondering if I should reset my whole machine… Is anyone else seeing these issues in the XProtect log? It is unclear at this time whether there really is a Pirrit malware in Apple's Xcode simulator files or if there is some issue with XProtect like a faulty signature. Don't panic.
Posted
by otacon85.
Last updated
.
Post not yet marked as solved
0 Replies
379 Views
Hey everyone, How do I detect that my View is coming into the foreground? The app has been suspended by iOS before, because I closed it (which is fine). I am running into the strange problem, that .onChange(of: scenePhase) is never triggered on my custom subview. It only works if I attach it to the first view inside the root view. Some context: My app is iOS 17 and iPhone only. does work: on TabView() inside ContentView() ContentView() is the root view of the app. struct ContentView: View { @Environment(\.scenePhase) var scenePhase var body: some View { TabView { CustomSubView() } .onChange(of: scenePhase) { oldPhase, newPhase in if newPhase == .active { // some code, does work } else if newPhase == .background { // some code, does work } } } does not work: on CustomSubView() inside TabView() inside ContentView() struct CustomSubView: View { @Environment(\.scenePhase) var scenePhaseCustomSubView var body: some View { NavigationStack { } .onChange(of: scenePhaseCustomSubView) { oldPhase, newPhase in if newPhase == .active { // some code, is not firing for some reason -> use onAppear? } else if newPhase == .background { // some code, does work } } } } Thank you for your help
Posted
by otacon85.
Last updated
.
Post not yet marked as solved
2 Replies
1.2k Views
Hey guys and gals, iOS 14 is taking 15 GB additional storage from my device – which is a problem since it only has 64 GB. I can see it under storage in the Info section of system settings. There are two entries with ~ 15 GB each at the very bottom ("System" and "Other"). How do I delete these additional files? Is this a bug? Should I file a radar? Thanks
Posted
by otacon85.
Last updated
.
Post not yet marked as solved
1 Replies
2.9k Views
Hey guys,I'd like to show a password prompt every time my app returns from the background (trust me, it makes sense, it's not annoying; it's similar to what 1Password does).So I need to show a certain ViewController every time the app enters the foreground or every 10 minutes.I tried a lot, but I don't seem to get it to work. For instance:func applicationWillResignActive(_ application: UIApplication) { print("called it")} func applicationDidBecomeActive(_ application: UIApplication) { print("called it") } func applicationWillEnterForeground(_ application: UIApplication) {print("called it")}These methods simply don't get called on my device. Please note that the app is iOS 13 only. There was some change I don't understand (scenes?).Does someone have an idea or can point me in the right direction?Thank you.
Posted
by otacon85.
Last updated
.
Post not yet marked as solved
8 Replies
2.3k Views
I have made an iOS 13 app with a watch extension. The app is written in English. I have localized it to German. Everything is fine with the iPhone app; however the watch extension is only available in English. The German localization is not loaded.When I list the available localizations by printing1 like so:print(Bundle.main.localizations)the iPhone app gives me:["en", "Base", "de"]which is fine for me, but the Watch Extension only lists:["en"]which isn't correct – "de" is missing.I have added German as a localization in the Interface Builder (Interface Builder Languages Screenshot) but that doesn't seem to work.I have also tried removing the German localization completely from the project and adding it back – didn't work either. (Localization screenshot with German localization enabled)What am I missing?Any help is appreciated. Thank you very much.1 I know that printing to the console is obsolete, you should use oslog instead, but I haven't gotten around to that yet, to be honest.
Posted
by otacon85.
Last updated
.