Salesforce Mobile SDK and Ionic – Debugging iOS
With the Web Inspector open to our app let's go to the
contacts page and see if there are any errors in the console.
We should see that the
contacts page loads like it did on Android and when using ForceJS so we are off to a good start.
Let's go into a contact and see if there are any issues with the displaying the
Contact Details Works
Hopefully this works for you as well.
Something to note, up till this point with the Web Inspector open to the console we should see no errors so far.
Now let's try editing a contact.
Edit button and change one of the fields and see if you get an error.
When I first tried to edit a text field I encountered a problem with it not staying selects. This is because the on screen keyboard was turned off. To turn it back on I had to use the
command + kkeys.
If you are like me clicking
Save wont look like it does anything. But if you look in the Web Inspector Console you'll see a different story.
Web Inspector Console With Errors
I have multiple errors because I pressed
Savemultiple times :)
And the error you see here is uncaught and in a promise. This sounds like it should be familiar. Looking at my code I did not have the latest commit from GitHub.com/BrettMN/salesforce-sdk-mobile-with-ionic-starter. I forgot to push the changes from Salesforce Mobile SDK and Ionic – Debugging Part II so nobody had the latest :(
Oh well, let's run it again with the "newer" code. And while we still get an error, it's a new one.
Since the line after
udpateContact had an error is the error,
Looking for the code and want to follow along? Find it on GitHub.com/BrettMN/salesforce-sdk-mobile-with-ionic-starter