Posts

Post not yet marked as solved
27 Replies
13k Views
In iOS 16, UIDevice.name has changed to only return the model of the device, not the user specified name. There is an entitlement, com.apple.developer.device-information.user-assigned-device-name that can be requested to keep the old behaviour, but I can't find any info on how to request that entitlement. Anyone able to help?
Posted Last updated
.
Post not yet marked as solved
1 Replies
604 Views
In iOS 15, when an app showed a Safari View Controller, the sourceAppIdentifier provided to a NEFilterDataProvider would be related to the app that used the Safari View Controller. E.g For a SFVC shown in Google Docs it would be EQHXZ8M8AV.com.google.Docs But in iOS 16, depending on whether it is for a Browser Flow or a socket flow, the identifier is now always given as either .com.apple.WebKit.Networking for Browser flows or .com.apple.mobilesafari for socket flows. This now means it is no longer possible for a NEFilterDataProvider to know which app is responsible for that flow and as such cannot use the sourceAppIdentifier in any decision as to whether to allow or drop the flow. Was this an intentional change? If so, why?
Posted Last updated
.
Post not yet marked as solved
2 Replies
1.5k Views
So I've enabled Hardened Runtime on my app but want to test it actually does what it is meant to do.So I put in a simple couple of calls to location services on a button: CLLocationManager* locMan = [CLLocationManager new]; [locMan startUpdatingLocation];and expected my app to crash on Mojave since I hadn't ticked the "Location" option in the "Resource Access" section of the Hardened Runtime capabilities.Instead it carried on as normal and I saw the Location StatusItem show up in the menu bar with my app listed as something that was using Location services.So now I'm wondering if Hardened Runtime is really turned on for my app or not. Or am I misunderstanding its usage?FYI - My app is distributed via Developer ID provisioning, not the App Store.
Posted Last updated
.
Post not yet marked as solved
3 Replies
5.1k Views
Trying to convert some code over from NSURLConnection and noticed that the timeouts are per-session, not per-task. In our existing code there are a few places where some requests are given longer timeouts then the others.I see that in NSURLSession the timeouts are all session based. i.e one-size-fits all. There seem to be a couple of options to be able to fine-tune the timouts per-task:Use different sessions for each different timeout. Not pleasant and goes against the idea of having one session-per client-server pairing.Set the Session timeout for each task at task creation time. Not even sure this would work and if it did would need additional multithreading safeguards to ensure only one task at at time can be created.Anyone else had to deal with this oversight?
Posted Last updated
.
Post not yet marked as solved
0 Replies
739 Views
Hi, Our education app needs to be able to pick up the UPN of the currently logged in user on a Shared iPad set up via Apple Schools Manager. I haven't been able to find any information about how to get such info, but I imagine I'm not looking in the right place. Is such a thing possible, and if so, how? Thanks
Posted Last updated
.
Post not yet marked as solved
1 Replies
1.5k Views
Hi My code reads a bunch of URLs from a file and does something with each one. swift for line in everyLineFromSomeTextFile { guard let url = URL(string: line) else {continue} doSomethingWith(url) } I recently noticed that some of the lines in the file had wrongly encoded path portions. e.g: https://www.apple.com/us/search/caf%e9 (Or see here if the forum munges that up) Badly Encoded - https://developer.apple.com/forums/content/attachment/14fa4686-ba0a-46ba-8129-4fe9cb965a6c This looks like it was incorrectly percent-encoded from ISO 8859 character set instead of UTF8 as I am sure the last path component is meant to be 'café' when unencoded . However my code didn't skip that line as URL(string: line) didn't return nil. But url only contained the scheme and the host. The path was empty. I tested what URLComponents also did with that string and it gave a similar result - valid scheme and host but empty path. However URLComponents.percentEncodedPath actually returns the original malformed path: /us/search/caf%e9 To complicate things further: url.absoluteString == "https://www.apple.com/us/search/caf%e9" Surely both of those initializers should fail if the string can't be properly and fully parsed? As it happened, my code went ahead and incorrectly did: doSomethingWith(url) where url was https://www.apple.com I haven't even looked at what would happen if the host, query or fragment components were also incorrectly encoded in my source. I realise that URL and URLComponents are just wrappers around NSURL and NSURLComponents, but they behave the same too. (the url string wasn't really an Apple one - I used that for simplicity)
Posted Last updated
.
Post marked as solved
1 Replies
1.5k Views
Am I right that .auto is just the default privacy specifier for when an explicit one is not mentioned in the log code, and as such there is no need to ever use it explicitly? swift var i =123 var s = "hello" myLogger.log("\(s, privacy: .auto), \(i, privacy: .auto)") produces the same log as: swift myLogger.log("\(s), \(i)") and that s == "private" in the logs and i == 123 Also in: swift myLogger.log("\(s, privacy: .auto(mask: .hash)), \(i, privacy: .auto(mask: .hash))") that only s will be hashed as i resolves to being public so no masking is needed and 123 is displayed. (The documentation could really use some actual examples of more use cases)
Posted Last updated
.
Post marked as solved
3 Replies
2.5k Views
For testing purposes, is it possible to set the "com.apple.configuration.managed" settings for an app via Apple Configurator? I've looked and searched fo a couple of hours and not found anything, so assume its not possible??? Assuming its not possible, what do other teams do for testing MDM without needing a full blown MDM solution?
Posted Last updated
.
Post not yet marked as solved
3 Replies
1.3k Views
My iOS app has a function that logs a whole load of statistics about a particular object. Since this is only for dev purposes I don't want any of the actual statistics gathering to be run if debug logs are not enabled so I am checking OSLog.default.isEnabled(type: .debug) before doing anything. Here is the basic shell of my code: swift     func dumpStatistics(for item: Any) {         func callSomeVerySlowFunc(_ object: Any) - String {            /* Something much more complicated than this */             return "Hello"         }         guard OSLog.default.isEnabled(type: .debug) else {             NSLog("Not dumping Statistics, debug logging is disabled")             return         }         NSLog("(NSLog) dumping Statistics, debug logging is supposedly enabled")         os_log(.debug, "(os_log)dumping Statistics, debug logging is supposedly enabled")         let stats: String = callSomeVerySlowFunc(item)         NSLog("(NSLog) dumping Statistics: %@", stats)         os_log(.debug, "(os_log) dumping Statistics: %{public}@", stats)     } When "Show Debug Info" is enabled in Console, this is what I get (as expected): (NSLog) dumping Statistics, debug logging is supposedly enabled (os_log)dumping Statistics, debug logging is supposedly enabled (NSLog) dumping Statistics: Hello (os_log) dumping Statistics: Hello When "Show Debug Info" is disabled, this is what I expect to get:  Not dumping Statistics, debug logging is disabled However, this is what I actually do get: (NSLog) dumping Statistics, debug logging is supposedly enabled (NSLog) dumping Statistics: Hello This implies that OSLog.default.isEnabled(type: .debug) is always returning true, but the actual logging code itself knows it's not really enabled. So this has the effect that I go through all the expense of calculating the statistics when I shouldn't. (BTW - I added the NSLog calls to help me see what was really happening. I don't intend to keep them in there) I don't think I am doing anything wrong in my code. I'm running macOS 10.15.7 alongside two iPads, one with iOS 14.3 and one with 14.4. Both iPads are connected via USB
Posted Last updated
.
Post marked as solved
22 Replies
8.9k Views
Is it possible to add images to forum posts? The UI for creating posts seems to allow it as I can drag an image in from the desktop and it shows up while composing the post, but once posted the images seems to be stripped.Is it supposed to be supported, and if so how do I nurse it into working?
Posted Last updated
.
Post not yet marked as solved
0 Replies
914 Views
Recently I've been converting our iOS Network Extension (an NEDNSProxyProvider) to macOS. I've got the extension building, running and intercepting DNS requests. But whatever I try I can't ever seem to do any useful debugging of the Extension. I can attach to the process and Pause it, but any attempt to stop at a breakpoint never works and I also can't do stuff such as gather the Memory Graph ("Unable to acquire required task port(588:0)").It is a non-optimized build and checking the entitlements of the systemextension does list com.apple.security.get-task-all set to true in the debug build.Here are the full (slightly redacted) entitlements:<plist version="1.0"> <dict> <key>com.apple.application-identifier</key> <string>XXXXXXXXXX.com.mycompany.PersephoneMac.CerberusMac</string> <key>com.apple.developer.networking.networkextension</key> <array> <string>dns-proxy</string> </array> <key>com.apple.developer.team-identifier</key> <string>XXXXXXXXXX</string> <key>com.apple.security.app-sandbox</key> <true/> <key>com.apple.security.application-groups</key> <array> <string>XXXXXXXXXX.com.mycompany.PersephoneRedux-Mac</string> </array> <key>com.apple.security.get-task-allow</key> <true/> <key>com.apple.security.network.client</key> <true/> </dict> </plist>I'm assuming this should be doable, after all simpler debugging was called out at WWDC as to an advantage over kexts.
Posted Last updated
.
Post not yet marked as solved
1 Replies
771 Views
So the new feedback system that replaces the old bug reporter has a few annoyances. I couldn't find an approriate category for feedback about the feedback assistant itself. Is there a best place to do so?For those interested:The formatting of the main text loses all paragraph formatting and runs all text into a single paragraph.There doesn't seem to be a way to re-download attachments. They show up but are not usable.
Posted Last updated
.
Post not yet marked as solved
0 Replies
880 Views
I have some questions about the intended behaviour of kext loading in Catalina.From the release notes, I see that when a kext is installed the OS needs to be restarted before the kext will be loaded. Trying it here I see the following behaviour:Installer runs and installs kext as usualUser is prompted to allow the kext from System PreferncesAfter this, the OS tells the user that the kext will not be available until after restarting the Mac. This is indeed true.Restart and the kext loads as normal.This is in line with the documentation so far. But what I am not sure about is what happens on re-install and kext updating?Experimenting here I see that if I uninstall the kext and re-install, it will load straight away without requiring a restart.Likewise, if I install a newer version over the top of an existing kext (after previously unloading the old one during the upgrade scripts) then the new one will also run fine without restarting.What I would like to know is are these behaviours likely to remain until the OS is final? Are my experiencees with reinstall and updating the expected behaviour or are they also intended to not apply until restart?And as a general question. Why the new requierment for a restart in ithe initial case? Kind of makes it hard for Enterprise Admins to push out such software to all users without also forcing a restart.
Posted Last updated
.
Post not yet marked as solved
0 Replies
839 Views
So when stapling my installer package file I get the following output:We do not know how to deal with trailer version 58519. Exepected 1 Processing: Properties are { NSURLIsDirectoryKey = 0; NSURLIsPackageKey = 0; NSURLIsSymbolicLinkKey = 0; NSURLLocalizedTypeDescriptionKey = "Installer package"; NSURLTypeIdentifierKey = "com.apple.installer-package-archive"; "_NSURLIsApplicationKey" = 0; } Terminator Trailer size must be 0, not 2639 {magic: t8lr, version: 1, type: 2, length: 2639} Found expected ticket at 16671916 with length of 2639 Sig Type is RSA. Length is 3 Sig Type is CMS. Length is 3 Package MyPackage.pkg uses a checksum of size 20 The staple and validate action worked!It all seems to actually work and the installer works fine on a vanilla macOS Catalina beta, but I just wanted to check that the messages relating to 'trailers' are not an issue?
Posted Last updated
.
Post marked as solved
26 Replies
12k Views
Tried updating a Mojave VM to 10.15 beta in a VMWare Fusion (v11.1) VM, but after a while it just got stuck at the boot screen with the large Apple logo. Anyone managed to install Catalina in any form of VM?
Posted Last updated
.