KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: 4D for iOS debug actions
PRODUCT: 4D for iOS | VERSION: 18 | PLATFORM: Mac
Published On: April 1, 2020

When developing an app with 4D for iOS, sometimes you may run into buggy actions. Perhaps the Add Task action you implemented does not seem to be working the way it should when you test it in Simulator. To debug this, you can set breakpoints or TRACE commands in the On Mobile App Action method. Then, when you test the action in Simulator, the debug window will open.



In the above case, after stepping through the method, the case of Add Task was skipped right over. That could only mean that the name for the action does not match its name in the method. Indeed, checking the Actions section shows that the name for the Add Task action should be "addTask" not "addTasks".



It is important that the $request.action value matches what you named it in Actions. Note that if you only make changes to code in project methods, there is no need to restart Simulator to test it. However, if changes are made in the 4D for iOS editor, you would need to build and run again for the changes to take effect.