1 Reply
      Latest reply on May 22, 2020 7:11 AM by john daniel
      FrancisW Level 1 Level 1 (0 points)

        I have been doing this a long time but am still not very good at it.


        I have a document based Mac app that works fine for me and on another Mac but App Store Connect have rejected it now 3 times sayin "We still were unable to review your app as it crashed on launch on Mac running macOS 10.15.3. We have attached detailed crash logs to help troubleshoot this issue."  They had another issue but that's not relivant here and I think will be resolved if they ever open the app!


        They go on to say "For information on how to symbolicate and read a crash log, please review Tech Note TN2151 Understanding and Analyzing Application Crash Reports." as an aside that link takes me to my Agreements, Tax and Banking!  However, I have been able to find the document that they are talking about which is for iOS and most of what is suggests I do is not relivant to me it says "Note: Crash reports from macOS are typically symbolicated, or partially symbolicated, at the time they are generated."  The fact is that at the top of the backtrace at 0, 1 and 2 are three processes from my app, I can't find a way to identify them other than to follow the flow of my app.  When it was first rejected the position 3 on the backtrace was occupied by "NSViewController _sendViewDidLoad" so I moved my functions from View Did Load to View Did Appear.  So now the backtrace gets to view did appear and then there are 3 of my functions again at 0-2.  I actually don't think that any of that matters because I think I know what is wrong but I can't find, for the life of me, how to fix it.


        I have a custom Class 'Doc' and in the view controller I have an array of Doc which feeds an NStableview.  The tableview is bound to the array and I impliment Drag and Drop also in the view controller using bindings.


        What I can't do (without App Store Connect saying that it crashes) is save the Doc array in the Document Class and then make use of it.  I can save the array and open it again but I think I must be violating MVC which is causing the crash with App Store Connect.  I have now created a Class 'Model' which just has a [Doc] in it much along the lines of this sample code https://developer.apple.com/documentation/appkit/documents_data_and_pasteboard/developing_a_document-based_app

        which is just saving a string.  The bit I can't do to copy the sample code is bind my representedObject to anything that will make it work.  So now I have what is the same array, or trying to be, in the View Controller, the Model Class and the Document Class.


        I could do with knowing how I save the array and open it again using the Document Class without App Store Connect rejecting it again, it is a very slow way to test your code!  Particularly when their links don't work and their documents are not the right ones and they are very old.


        Thanks to anyone who has got this far and even more thanks to anyone who replies.



        • Re: macOS, Document based app, saving and loading
          john daniel Level 4 Level 4 (690 points)

          I don't know what you are reading, but crash reports are never symbolicated. They might be if it crashes while you are running in debug mode. But crashes from ad-hoc customer delivery, like this is, are not symbolicated. I recommend the MacSymbolicator app: github.com/inket/MacSymbolicator


          It will automatically search Xcode for the matting debug files.


          Your app isn't going to crash because you "violate MVC". I think all apps do that. It is only a theoretical architecture.


          The App Store is not a testing service. You need to test your app before sending it to them. Ideally, test it in a pristing virtual machine. Don't bother testing on your development machine. Always archive the apps and do a "development" distribution. That will give you a release build just like what the App Reviewer sees. When that crashes, you will get a crash report that you can symbolicate and find the bug.