You need to sign in to do that
Don't have an account?
michael.vo
smartstore angularjs mobile pack
In the init.js of raja's angularjs mobile pack the smartstore property of navigator is null on ipad device and safari:
if (navigator.smartstore) {
SFConfig.dataStore = new Force.StoreCache('sobjects', [
{path: 'Name', type: 'string'},
{path: 'attributes.type', type: 'string'}
], 'Id');
SFConfig.dataStore.init();
}
Is there another property I have to initialize before this?
Also what is the following commented out code doing?
//Uncomment below and set accessToken(= sessionId), instanceUrl and proxyUrl to test smartstore (mock version - coz real smartstore is part of cordova)
// inside the browser
//initApp({
// accessToken: '00Di0000000JEm3!AQ4AQLnaKs7PPHaRd0xjvJwJkf6O.9R7ECpU5mndDb1DwYsoxhMDrCyEag.5Ws_HFI5fY.9fYgsQ_4F1D5vXltKmK5b7guCK',
// instanceUrl: 'https://na15.salesforce.com',
// proxyUrl: 'http://localhost:3000/proxy/'
//});
if (navigator.smartstore) {
SFConfig.dataStore = new Force.StoreCache('sobjects', [
{path: 'Name', type: 'string'},
{path: 'attributes.type', type: 'string'}
], 'Id');
SFConfig.dataStore.init();
}
Is there another property I have to initialize before this?
Also what is the following commented out code doing?
//Uncomment below and set accessToken(= sessionId), instanceUrl and proxyUrl to test smartstore (mock version - coz real smartstore is part of cordova)
// inside the browser
//initApp({
// accessToken: '00Di0000000JEm3!AQ4AQLnaKs7PPHaRd0xjvJwJkf6O.9R7ECpU5mndDb1DwYsoxhMDrCyEag.5Ws_HFI5fY.9fYgsQ_4F1D5vXltKmK5b7guCK',
// instanceUrl: 'https://na15.salesforce.com',
// proxyUrl: 'http://localhost:3000/proxy/'
//});
Debuging on mobile safari can be done either :
with weinre and get the features of the web concole,
or by enabling remote debugging in Mobile Safari itself, see here
http://people.apache.org/~pmuellr/weinre/docs/latest/
http://atnan.com/blog/2011/11/17/enabling-remote-debugging-via-private-apis-in-mobile-safari
Crtsy: http://stackoverflow.com/questions/17560514/angularjs-app-is-not-loading-on-safari-ios-5-1-1-back-button-any-suggestions
Regards,
Ashish