4 Replies
      Latest reply on Jun 24, 2019 7:33 PM by Franco
      Franco Level 1 Level 1 (0 points)

        Not sure it this is the right forum

         

        I want to debug my App while on my eBike. I can't bring my computer :-)

         

        I am communicating via bluetooth with a Cycle Analyst, and the bike need to be rolling to get live data :-)

        App works well with stationary bike but while rolling i get some strange data.

         

        So I have a lot's of debug print

        I can't seems to find the log file where they are written to.

         

        With Device and Simulator, I can see the log of a crash I had but not what I am looking for.

         

        I tried this solution but it did not work.

        https://stackoverflow.com/questions/9097424/logging-data-on-device-and-retrieving-the-log

         

        The article also mentioned

        https://developer.apple.com/library/archive/qa/qa1747/_index.html

        But I am not sure if there is a difference between NSLog and print

         

        How could I proceed ?

        • Re: On device debug with log
          eskimo Apple Staff Apple Staff (12,425 points)

          The best way to do this is to log the information using OSLog and then use a sysdiagnose log to capture that.  See the Bug Reporting > Profiles and Logs page for more details on the latter.

          Share and Enjoy

          Quinn “The Eskimo!”
          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
          let myEmail = "eskimo" + "1" + "@apple.com"

            • Re: On device debug with log
              Franco Level 1 Level 1 (0 points)

              Thank you ! learn a lot reading those link.

               

              Can i use those Profiles https://developer.apple.com/bug-reporting/profiles-and-logs/?platform=ios

              to get information without sending it to Apple ?

              The App is not on the store and for now, the App is just for me, but i might make it open source if it gets better.

               

              it is a lot of work to rewrite all my print to follow the format needed to log. :-)

                • Re: On device debug with log
                  eskimo Apple Staff Apple Staff (12,425 points)

                  Can i use those Profiles … to get information without sending it to Apple ?

                  Yes.  If you follow the sysdiagnose instructions, you’ll find that, after step 4, you end up with a sysdiagnose file (a big file with a name like sysdiagnose_xxx.tar.gz).  Step 5 tells you to attach that file to your bug report, but you don’t need to do that.  You can just unpack the file and look inside it yourself.  Specifically, open the system_logs.logarchive file using the Mac Console app and then search for your log entries.

                  Share and Enjoy

                  Quinn “The Eskimo!”
                  Apple Developer Relations, Developer Technical Support, Core OS/Hardware
                  let myEmail = "eskimo" + "1" + "@apple.com"