I’m currently making an iOS extension, but at the moment I’m getting unexpected results at run time, and I want to see what my variables are holding. But since I’m bundling my app and running it on my device, I can’t see any print() logs from Lua or printf() logs from C++ or Objective C.
I’ve looked at this link and got up to the “path mappings” section before the instructions became too unclear to continue. I don’t know what the “engine source” is in this context, nor what the path names mean. This might be related to my issue.
Solved, I ended up downloading a log file from the device thanks to that link. Unfortunately it doesn’t capture C++ or Objective C printf calls, but it will do for now.
This setting is extra verbose, and is disabled by default.
We don’t really use it much to be honest. We mainly use dmLogInfo, dmLogWarning and dmLogError.
I’ve the same problem : I’m trying to debug my own ios extension using log messages but I can’t see my printf(…) or fprintf(stderr,…) from my C files in my ‘log.txt’ downloaded file. How can I use dmLog Does I need to install all the dmEngine sdk?
If you sign the application with an iOS Developer certificate (as opposed to a distribution cert) you will also be able to see the output in the Console app on macOS.
I’m using “Personal Team” certificate to sign my ios application. Is there a known problem concerning the output in the Console app on macOS using this certificate?
Other remark/question:
I may have missed something : I build manually (and locally) my ios library calling make -f … and putting the “.a” file in my defold “lib” folder. How can I build this library on the cloud build server ?
I think I understood…
I will group my native code in the “src” folder of my extension. By doing this, my native extension should be built in the cloud…
Currently, I compile it outside (external folder) to produce an external library that I copy into the “lib” folder of my extension (so I have to call manually xcrun make -f …)
I was inspired by the organization of the native extension fmod (https://github.com/dapetcu21/defold-fmod).
I will rather take inspiration from the organization of the native extension “ios-android in-app purchase” that you provide as an example in the documentation (https://github.com/defold/extension-iap ;o).
Success and It’s better !
I put all my native code into the defold project (I gave up going through an external library) and now, I can trace/debug my ios native extension…
By the way, I gain a simpler, more fluid compilation ;o)