Explore the core architecture of the operating system, including the kernel, memory management, and process scheduling.

Post

Replies

Boosts

Views

Activity

Disk not ejected properly
Since upgrading my iMac to High Sierra Beta I somtimes got the 'Disk not ejected properly' from my Thunderbolt 2 raid (still HFS filesystem).After now connecting my USB 2 external disk to back up after about a minute or two it started to constantly connect and disconnect (Hole list of "Disk not ejected properly" in notifications).Connecting both disk to my Sierra MacBook Pro does not show this behavior. Any idea what is triggering this?
53
1
84k
Jul ’17
Update UIDragPreview during DragInteraction
Hey,during my drag, I need to update the UIDragPreview of the dragged item depending on it's location. I'm currently doing that by setting a new previewProvider each time the preview needs to be updated. When doing this, the current preview gets scaled down a little bit and the new one scales up, which looks a bit weird.Is there a better way to update the DragPreview? Or is there at least a way to get rid of the scaling?Best,Klemens
2
0
1k
Aug ’17
EAAccessory support over Lighting Audio Module in iOS 11 is unstable
I have noticed various strange behaviours with the EAAccessory interface on iOS 11 (Betas 5 and 6 **update and now in the full production version 11.0.2 **)). I wonder if anyone else has had these issues? Everything worked OK on iOS 10.I am communicating with an accessory over a lightning socket (via a LAM), and get the following behaviour:1. Connecting to a device, EAAccessoryManager returns a connected EAAccessory (an EASession can be established, and data received, although this doesn't always happen), but then immediately disconnects from the EAAccessory, and then returns another connected EAAccessory.2. After opening an EASession on this new EAAccessory, no communications to the device is possible (sending data over the OutputStream doesn't result in the data getting to the accessory)3. On switching away from the app and back again, either:a) the app crashesorb) the input stream reports endEncountered and the output stream just seems to stop working, it never reports hasSpaceAvailable again.Some simplified code which illustrates this problem is below:import UIKitimport ExternalAccessoryclass ViewController: UIViewController, StreamDelegate { var connectedAccessory: EAAccessory? var eaSession: EASession? let supportedProtocolName = "My.Supported.Protocol" @IBOutlet weak var logTextView: UITextView! @IBOutlet weak var sendButton: UIButton! override func viewDidLoad() { super.viewDidLoad() log("loaded") // Do any additional setup after loading the view, typically from a nib. NotificationCenter.default.addObserver( forName: NSNotification.Name.EAAccessoryDidConnect, object: nil, queue: nil, using: accessoryConnected) NotificationCenter.default.addObserver( forName: NSNotification.Name.EAAccessoryDidDisconnect, object: nil, queue: nil, using: accessoryDisconnected) EAAccessoryManager.shared().registerForLocalNotifications() // Maybe we're already connected if let connectedAccessory = EAAccessoryManager.shared().connectedAccessories.first { self.connectedAccessory = connectedAccessory openSession() } } private func accessoryConnected(_ notification: Notification) { log("accessoryConnected") for accessory in EAAccessoryManager.shared().connectedAccessories { log("accessory: \(accessory)") log("") } // Connect to the first one (only expect there to be one for this test) self.connectedAccessory = EAAccessoryManager.shared().connectedAccessories.first openSession() } private func openSession() { guard let connectedAccessory = self.connectedAccessory else { return } self.eaSession = EASession( accessory: connectedAccessory, forProtocol: self.supportedProtocolName) openStream(eaSession?.inputStream) openStream(eaSession?.outputStream) } private func openStream(_ stream: Stream?) { stream?.delegate = self stream?.schedule(in: RunLoop.current, forMode: RunLoopMode.defaultRunLoopMode) stream?.open() } public func stream(_ stream: Stream, handle streamEvent: Stream.Event) { switch streamEvent { case Stream.Event.openCompleted: log("\(stream) openCompleted") if (eaSession?.inputStream?.streamStatus == Stream.Status.open && eaSession?.outputStream?.streamStatus == Stream.Status.open) { log("both input and output are open") } case Stream.Event.hasBytesAvailable: log("hasBytesAvailable") readAll() case Stream.Event.hasSpaceAvailable: log("hasSpaceAvailable") case Stream.Event.errorOccurred: log("\(stream) errorOccurred") closeSession() case Stream.Event.endEncountered: log("\(stream) endEncountered") closeSession() default: log("\(stream) default") closeSession() } } private func readAll() { let bufferSize = 128 var numberOfBytesRead = 0 repeat { var buffer = [UInt8](repeating: 0, count: bufferSize) numberOfBytesRead = eaSession!.inputStream!.read(&buffer, maxLength: buffer.count) if (numberOfBytesRead > 0) { log("read:\(buffer)") } } while (numberOfBytesRead == 128) } @IBAction func sendDataButtonPressed(_ sender: UIButton) { sendData() } private func sendData() { let data: [UInt8] = [1, 0, 0, 0, 16, 0, 0, 0, 0, 3] log("Sending: \(data)") self.eaSession?.outputStream?.write(data, maxLength: data.count) } private func closeSession() { closeStream(eaSession?.inputStream) closeStream(eaSession?.outputStream) eaSession = nil } private func closeStream(_ stream: Stream?) { stream?.close() stream?.remove(from: RunLoop.current, forMode: RunLoopMode.defaultRunLoopMode) stream?.delegate = nil } private func accessoryDisconnected(_ notification: Notification) { log("accessoryDisconnected") for accessory in EAAccessoryManager.shared().connectedAccessories { log("accessory: \(accessory)") log("") } guard let accessory = notification.userInfo?[EAAccessoryKey] as? EAAccessory else { return } log("disconnected accessory: \(accessory)") log("") closeSession() } private func log(_ msg: String) { self.logTextView.insertText("\(msg)\n") scrollLogToEnd() } private func scrollLogToEnd() { let stringLength = self.logTextView.text.characters.count self.logTextView.scrollRangeToVisible(NSMakeRange(stringLength - 1, 0)) } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. }}
9
0
15k
Aug ’17
memory issues since iOS 11 or iOS 10.3
Hi,I have an App that is using geofencing and beacons since about one year in the app store. Recently I noticed more and more crashes and users are reporting of missing notifications upon geofence entry or exit ( I send a local notification upon entry or exit).so i suspect those crash reports are related to those user reports. The crash reports indicate memory management issues: lib dispatch.dylib _dispatch_callblock_and_releaseThese problem only occur since iOS 10.3. So I have some reports with iOS 10.3 but most of them with iOS 11. When I run the app in the simulator the memory usage is at around 50MB and does not increase. Even when I simulate geofence entry and exit etc it stays around the 50 MB usage.So my first question is it possible that the app crashes when not in foreground when it uses only 50MB?To investigate further I implemented the function func applicationDidReceiveMemoryWarning(_ application: UIApplication)And send a local notification when it get´s called. And indeed sometimes I sometimes get this warning and I myself have irregularities with the geofence enter and exit notifications.Now to further investigate I installed another App to monitor the same geofence (IFTTT). Here too I have irregularities with the geofence enter and exit notifications.Until now I was quite relaxed as I was sure it´s the early iOS 11 beta´s that have memory management issue. But i´m using the latest Beta (15A5372a) and I guess we are close to the final now. Also what worries me is that some users experience these issues also with iOS 10.3.Any ideas how to investigate this further or does anybody experience something similar?Very BestStephan
5
0
4.0k
Sep ’17
Universal links on redirection
I know that universal links were not working on redirection prior to some of the recent ios 11 version. I mean the following use case:1) having app that handles domain: "www.testdomain.com" universally.2) user clicks email tracking link (i.e. "http://tracking.com/someparameter") -> safari is opened.3) tracking page is the auto-redirected into universally supported link: "www.testdomain.com/somepage".But it seems like with one of the latest iOS update, universal links are now working on redirect.I could not find any official docs around universal links on redirect, so is it how universal links behave? If so, since what version is that enabled? Thank you,Alexey
3
0
13k
Nov ’17
PDFKit memory issue
I have a loop that iterates all pages in a PDF and saves parts of its content into core data. Problem seems to be that each PDFPage takes up around 30mb+ of memory. This memory is not retuned when the loop moves to ther next page. with large enough PDF in can cause out of memory crash.At first I thought it was something in the loop holidng a reference. However when I dont run the loop, or attempt to save any of the PDFPage contents and simply swipe through the PDFPages of the PDF, the memory still goes up 30mb + per page. So my question is how to clear the previous page from memory when no longer the page in view?I would add code but seems you cant pste into here so jist know its basic PDFKit code to load a pdf url
4
0
2.2k
Feb ’18
No crypto user for encrypted APFS volume!
After an update to High Sierra, I'm trying to unlock my volume (disk1s1) but cannot anymore. This is the info from terminal:APFS Container (1 found) | +-- Container disk1 C8022E32-744D-414E-9246-29ADDB0357F3 ==================================================== APFS Container Reference: disk1 Size (Capacity Ceiling): 500068036608 B (500.1 GB) Minimum Size: 500068036608 B (500.1 GB) Capacity In Use By Volumes: 485282820096 B (485.3 GB) (97.0% used) Capacity Not Allocated: 14785216512 B (14.8 GB) (3.0% free) | +-< Physical Store disk0s2 438AD64B-835E-418D-B0DF-32A3A0B7500A | ----------------------------------------------------------- | APFS Physical Store Disk: disk0s2 | Size: 500068036608 B (500.1 GB) | +-> Volume disk1s1 6C587DE6-9C8D-3792-9144-34FBE59AE9F6 | --------------------------------------------------- | APFS Volume Disk (Role): disk1s1 (No specific role) | Name: Macintosh HD (Case-insensitive) | Mount Point: Not Mounted | Capacity Consumed: 382597644288 B (382.6 GB) | FileVault: Yes (Locked) | +-> Volume disk1s2 B7508926-2601-4C8D-9707-5F53EA943031 | --------------------------------------------------- | APFS Volume Disk (Role): disk1s2 (Preboot) | Name: Preboot (Case-insensitive) | Mount Point: Not Mounted | Capacity Consumed: 39792640 B (39.8 MB) | FileVault: No | +-> Volume disk1s3 51B76A93-806E-474D-9BBA-F1E752C3032B | --------------------------------------------------- | APFS Volume Disk (Role): disk1s3 (Recovery) | Name: Recovery (Case-insensitive) | Mount Point: Not Mounted | Capacity Consumed: 1038880768 B (1.0 GB) | FileVault: No | +-> Volume disk1s4 A680E59F-DF9D-4354-BE1E-6A8AA71390A5 | --------------------------------------------------- | APFS Volume Disk (Role): disk1s4 (VM) | Name: VM (Case-insensitive) | Mount Point: /private/var/vm | Capacity Consumed: 4295213056 B (4.3 GB) | FileVault: No | +-> Volume disk1s5 7683ED91-DACF-4213-8C73-F2C24518A4B2 --------------------------------------------------- APFS Volume Disk (Role): disk1s5 (No specific role) Name: Macintosh HD2 (Case-insensitive) Mount Point: / Capacity Consumed: 97149804544 B (97.1 GB) FileVault: Yes (Unlocked)Notice after a failed upgrade, I had to partition the drive to install a fresh OS (Macintosh HD2) to move on with my life, in hopes one day I can access my original volume. Now I'm trying to unlock the original Macintosh HD / disk1s1, but its crypto users disappeared (they were there before)!diskutil apfs listUsers disk1s1 No cryptographic users for disk1s1I tried entering a blank password but not luck:diskutil apfs unlockVolume disk1s1 -nomount Passphrase: Passphrase entry error: no passphrase specifiedEntering my old password or a space as the password gives this:diskutil apfs unlockVolume disk1s1 -nomount Passphrase: Unlocking any cryptographic user on APFS Volume disk1s1 Unlocked but did not mount APFS VolumeBut it really doesn't unlock it:diskutil apfs list +-< Physical Store disk0s2 438AD64B-835E-418D-B0DF-32A3A0B7500A | ----------------------------------------------------------- | APFS Physical Store Disk: disk0s2 | Size: 500068036608 B (500.1 GB) | +-> Volume disk1s1 6C587DE6-9C8D-3792-9144-34FBE59AE9F6 | --------------------------------------------------- | APFS Volume Disk (Role): disk1s1 (No specific role) | Name: Macintosh HD (Case-insensitive) | Mount Point: Not Mounted | Capacity Consumed: 382597644288 B (382.6 GB) | FileVault: Yes (Locked)I tried decrypting it as well, but no luck (entered my password used before the update, also tried space as password):diskutil apfs decryptVolume disk1s1 Passphrase for existing "Disk" user 6C587DE6-9C8D-3792-9144-34FBE59AE9F: Starting background decryption of disk1s1 using the "Disk" crypto user as authorization Error starting background decryption of APFS Volume: One or more of the given or implied APFS Volumes are locked (-69582)Which is strange it's asking for a users passphrase when it told me there were no users; even stranger that this user's ID is the same as the volume disk ID. So I tried reseting the passphrase for this user:diskutil apfs changePassphrase disk1s1 -user 6C587DE6-9C8D-3792-9144-34FBE59AE9F6 Old passphrase for user 6C587DE6-9C8D-3792-9144-34FBE59AE9F6: New passphrase: Repeat new passphrase: Changing passphrase for cryptographic user 6C587DE6-9C8D-3792-9144-34FBE59AE9F6 on APFS Volume disk1s1 Error changing passphrase for cryptographic user on APFS Volume: The crypto user was not found on the APFS Volume (-69594)Any help on how to recover from this dreadful state, such as adding crypto users back? Thanks for any help!
1
0
8.1k
Jun ’18
Safari favicons don't support updating
I use the Gmail 'unread count' favicon labs option, which updates the favicon to reflect the unread message count in my inbox. It's an essential part of my browsing experience / daily workflow. The icon is correct when the tab is first loaded, but it never updates after that. Chrome and Firefox both implement this feature.
5
7
2.9k
Jun ’18
iOS supported profiles
Which Bluetooth Profiles / services are supported by iOS?I found this:https://support.apple.com/en-us/HT204387I read up the iOS 11.3 will only see the built in pre-defined profiles. Is there a work around?Hands-Free Profile (HFP 1.6)Phone Book Access Profile (PBAP)Advanced Audio Distribution Profile (A2DP)Audio/Video Remote Control Profile (AVRCP 1.4)Personal Area Network Profile (PAN) Human Interface Device Profile (HID)Message Access Profile (MAP)So the Android phones will see the advertising of all kinds of BT / BLE devices, but iPhone does not, unless it was previousely paired by a custom app.Once you "Forget" this device on iPhone, it goes away and will not be seen during scanning.So even a Serial Port dongle with Serial Port Profile is not supported.(SPP), unless it is drive by a custom app?Any help appreciated
2
0
9.1k
Jun ’18
Silent Notification
I am trying to implement silent push notification in my application where I need to update some data in the server when silent notification comes. I am using Pushkit and it uses VoIP certificate for silent push notification but the app has been rejectd by Apple saying that "I can't use VoIP" certificate. It seems that apple has rejected it as I don't have any VoIP call functionality in my app. In that case how can I implement silent push notification so that my app gets activated even if it is not runnning(not even in the background) and I can update the server?
4
0
4.1k
Jun ’18
iMessage has merged 2 conversations of 2 different contacts
Hi all,I've 2 separate conversations with 2 different contacts (not the same phone number, nothing in commun).On my MacBook (High Sierra) everything works fine.But on my iPhone X running iOS 12 beta 3 (since beta 2 I've this bug), these 2 conversations are merged.When I write to one or another of these 2 contacts, it displays the 2 conversations in one screen. It merges them.When I try to create a new message, when I enter one of the 2 contacts, I don't know who receive the message, it's not always the same one that receive the message.That's really annoying.Does anyone have this issue too?I filled a bug reporter for that.Regards,Alexandre
21
2
42k
Jul ’18
Major Screen Time Bug
As a parent I was so excited to hear about Screen Time, so much so that I upgraded my sons phone to iOS Beta 2 when it came out.As a parent I setup his access on my phone for his phone and set it so that he could not longer browse the web, watch YouTube etc after 10 PM at night. As before I would go in his room at night and he would be watching videos at 1 am.... (grr)Anyways Screen Time was a blessing until the other night when I heard him up at 1 am and went into his room and there he was watching videos on his phone. For some reason Screen Time wasn't shutting of his app access at 10 PM like it was supposed to.I asked my son how he was able to get around screentime and he told me... (and I consider this a big bug!)When Screen Time kicks in and shuts his apps off, he goes into Settings > General > Date & Time and then turns off "Set Automatically" and then changes the time to a time which he is not restricted by Screen Time, which then unlocks all the apps again.I thought that was smart of him to figure that out and I have not found a way to restrict him from changing his date and time settings.Last night, again he was on his phone after bed time... and I caught him. He said he found an easier way to defeat Screen Time, and he did that by setting the Time to 24 Hour Time, for some reason Screen Time does not understand 24 hour time.I hope this can be fixed by Apple, as if it can't it negates the entire reason for parents to have Screen Time.Thanks,Scott
10
2
24k
Jul ’18
Embedded binary is not signed with the same certificate as the parent app. Verify the embedded binary target's code sign settings match the parent app's.
My Parent app IS signed correctly. I have verified in every screen. Has anyone seen this?Thanks!XCode 10.0 beta 6---------------error: Embedded binary is not signed with the same certificate as the parent app. Verify the embedded binary target's code sign settings match the parent app's. Embedded Binary Signing Certificate: Software Signing Parent App Signing Certificate: - (Ad Hoc Code Signed)
8
0
19k
Aug ’18
Critical software update required, but an error was encountered... Stuck
Installed Mojave, and worked fine at first. Did a restart and now I can't get past the following message.It boots,. WiFi setting screen appears, then when I try proceed it says:A critical software update is required for your Mac, but an error was encountered while installing this update.Your Mac can't be used until this update is installed[Shut down] [try again]But it never passes that point.Any thoughts?I can't reinstall high Sierra either.
48
3
73k
Aug ’18