Full disclosure: I'm an Xcode newbie, so I apologize in advance for the relative denseness of this question.
I'm trying to set a breakpoint in SalesforceOAuthPlugin.m from my Hybrid Force.com App Template based project. Problem is that this code doesn't reside directly in my Hybrid Force.com App Template based project, it's in the SalesforceHybridSDK project.
I can make a code change to SalesforceOAuthPlugin.m rerun ./install.sh
and create a new Hybrid Force.com App Template based project and my code changes will run, but this is obviously a terrible way to do it. I'm sure there is a infinitely better way that involves linking the two projects somehow.
Attribution to: mjgallag
Possible Suggestion/Solution #1
The SalesforceHybridSDK, as currently implemented, makes it challenging to link an existing hybrid app to the SDK for debugging purposes. This is a challenge that we plan to rectify in a future release, similar to the way Cordova now does it. But alas, our current framework structure is a blocker to such an approach.
In the meantime, I usually recommend one of two approaches to people who want to debug code within the hybrid SDK. Both involve working within the SalesforceHybridSDK Xcode project itself.
Run the DebugPlugins app target, to test existing SDK plugins. This target launches a sample app (referenced from TestPlugins -> www -> index.html), which, as a side effect, targets the OAuth plugin. And then the sample app itself is a user front-end to all of the SmartStore plugin functionality.
If you need to do some additional integration testing that's specific to your app's functionality, you can replace the aforementioned index.html with your own, adding whatever else you may need from your app to the www folder.
Either of these approaches will allow you to set breakpoints within hybrid SDK code.
Attribution to: KevinH
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/4412