Post

Replies

Boosts

Views

Activity

Feedback assistant feedback
This is probably the closest forum to post this... wanted to ask if others are getting any feedback on bugs filed with the Feedback Assistant application.Over the years, when using bugreport (radar), I got decent updates regarding whether bugs were duplicates, when they got fixed or if more detailed info was needed. So far in Feedback Assistant, all my issues are still just open with no feedback whatsoever. Some open now for several months.Every major release of the OS or Xcode, I update the bugs with a short "still exists in version" note. I feel as if these will never get fixed. I'd at least like a "works as designed" or "too low a priority" note so I don't keep wasting my time.Are others getting feedback on bugs they filed through this app?
3
1
1.3k
Dec ’19
App state restoration doesn't work
With Xcode 11.x, I started to write code that taps into Apple's state restoration features. My apps don't yet use scene delegates and need to work on iOS 12, so just opted to use the iOS 12 set of APIs such as 'application(_:shouldSaveApplicationState:)'.I started out with a simple test by just implementing the shouldSave and shouldRestore functions in my app delegate. Both return 'true'. Then, for a learning exercise, I instrumented all the app delegate lifecycle APIs (e.g. willEnterForeground) as well as my view controller APIs (viewDidLoad, etc.). Also added the viewController APIs 'encode' and 'decode' functions that just called super and did some logging. Finally, in this simple tab view controller app with two tabs, I set restoration IDs in IB for all three view controllers (tab controller itself and its two children).When running the app in debug or release mode in the Simulator (iOS 13 runtime), all is well. If I suspend the app, it's definitely calling encode. Stopping the app and relaunching via Xcode then preserves which child view controller I had previously selected.When running the app on a device with iOS 13.2.2 via Xcode, things worked identically up to the point where I suspended the app (encode called). I force-quit the app on the device, but relaunching it didn't restore its state. The log output revealed that it never called the app delegate's shouldRestoreApplicationState. I also lauched the app directly on the device, but no matter what, it will not restore the last state if lauching it fresh.On top of this, In some other more advanced samples I wrote, I'm not happy with the NSCoder instance you're given in these callbacks. Their behavior is to trap (crashing your app) instead of generating errors to allow you to gracefully deal with corrupt data. And you cannot set the behavior at this point since that also traps (once a decoder object starts decoding the data, which Apple is obviously doing before calling your delegate API), you cannot switch to the 'generate errors' behavior. To remedy this, one should avoid using APIs such as encodeInteger since if you then call decodeInteger, that will trap if you have bad data. I ended up wrapping Int, Double, Bool in NSNumber and using the encode/decodeObject APIs will thankfully return nil if it cannot find an object for a certain key.Finally, even if the above simple scenario even worked, it seems to be a decent amount of work to code up both an iOS 12.x and 13.x solution. Thus, I'm going to roll my own solution. Just curious if others have had any success with Apple's APIs. Searching the forums brought up some old posts; some going unanswered.
1
0
1.2k
Nov ’19
Readme markdown not rendering in Xcode
In Xcode 11.1, I created a 'README.md' markdown file, but it always renders as its raw text (yet font size changes depending on header level). For example, in Xcode's editor I see:# AppName ## Version 1.0Where the first line is in a larger font size than the lines 3 and 4.Anyhow, if I open up a project from Apple (e.g. BuildingCustomViewsInSwiftUI), it's README renders correctly.If I paste my project's contents into Apple's sample project README, it then renders a-ok. The reverse though (taking the contents from Apple's sample and pasting into my project; even dragging in the original project) won't render it (I then see all the markup symbols such as #.I've checked every possible setting between the two projects and cannot figure out why this is happening. The type of file (markdown), encoding, etc. are identical.However, one item I have noticed is that in Apple's sample project, when I view the README.md file, the Editor | Minimap menu choice is disabled and unchecked. Whereas in my project, the menu choice is enabled. Toggling that on/off though has no effect in my project.Thus, there must be some reason why Apple's sample has the Minimap option disabled. And my guess is this is the reason why Apple's sample in then rendering the markdown file correctliy in the editor.Anyone know how to fix this?Note: I also viewed the contents of the various files under the .xcodeproj package and couldn't find anything useful (i.e.. I was hoping to find some settings difference regarding the readme file, but couldn't find any).
13
0
17k
Oct ’19