Code Monkey home page Code Monkey logo

salesforcemobilesdk-cordovaplugin's Introduction

Cordova Plugin for Salesforce Mobile SDK

The Salesforce Mobile SDK Cordova Plugin npm package allows users to interface their hybrid iOS and Android mobile applications with the Salesforce Platform, leveraging Salesforce Mobile SDK for iOS and Salesforce Mobile SDK for Android.

Getting Started

If you're new to mobile development or the force.com platform, you may want to start at the Mobile SDK landing page. This page offers a variety of resources to help you determine the best technology path for creating your app, as well as many guides and blog posts detailing how to work with Mobile SDK.

Using the Plugin

We recommend you use our [forcehybrid]((https://npmjs.org/package/forcehybrid) command-line utility to generate your application instead of adding the plugin to a Cordova project directly since there are a few additional steps required for the project to work.

More information

  • You can find the forcehybrid npm package here to develop Mobile SDK hybrid apps for iOS and Android.

  • You can find the forceios npm package here to develop Mobile SDK apps for iOS.

  • You can find the forcedroid npm package here to develop Mobile SDK apps for Android.

  • You can find the forcereact npm package here to develop Mobile SDK react native apps for iOS and Android.

  • The Salesforce Mobile SDK for iOS source repository lives here.

  • The Salesforce Mobile SDK for Android source repository lives here.

  • See our developerforce site for more information about how you can leverage Salesforce Mobile SDK with the force.com platform.

  • If you would like to make suggestions, have questions, or encounter any issues, we'd love to hear from you. Post any feedback you have on the Mobile SDK Trailblazer Community.

salesforcemobilesdk-cordovaplugin's People

Contributors

bbirman avatar bhariharan avatar brandonpage avatar brettmn avatar coderreview avatar cwarden avatar helenren avatar huminzhi avatar johnsonericatsalesforce avatar kchitalia avatar khawkins avatar sjaakiejj avatar smcnulty-sfdc avatar svc-scm avatar toddhalfpenny avatar wmathurin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

salesforcemobilesdk-cordovaplugin's Issues

Local Hybrid App takes user to desktop portal online page instead of local page.

Hi buddies,

One of my clients got a weird situation. I was just wondering if anyone had met the same behaviour or known which might cause this.

The app is build upon Salesforce Mobile SDK 4 in hybrid mode, and "isLocal" is set to true in bootconfig.json file. It is running on iOS 9.2. However, the client uses a community user to login from the app and sometimes it takes him to the desktop portal (online home page) instead of local index.html file! Which is really weird for me and I cannot reproduce it anyway.

From my point of view, the only chance it opens the desktop portal is the login page doesn't return an access token, instead, it redirects to the online home page in the web view where the Oauth login page is in. So I wanted to know if this is possible?

Any insights or comments would be appreciated.

Best Regards,
Lingjun

Erro when run on android

I make exactly the README file indicate:
cordova create TestApp
cd TestApp
cordova plugin add https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin
cordova platform add android
cordova prepare
and then: cordova run android, but when I try run on android, I receive this error:

C:\Salesforce\Workspace\Mobile\TestApp>cordova run android
Running command: C:\Salesforce\Workspace\Mobile\TestApp\platforms\android\cordova\run.bat
WARNING : No target specified, deploying to device '9d1e844b'.
Buildfile: C:\Salesforce\Workspace\Mobile\TestApp\platforms\android\build.xml

-set-mode-check:

-set-debug-files:

-check-env:
[checkenv] Android SDK Tools Revision 24.1.2
[checkenv] Installed at C:\Users\fsousa\AppData\Local\Android\android-sdk

-setup:
[echo] Project Name: com.plugin.gcm.PushHandlerActivity
[gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 22.0.1
[echo] Resolving Build Target for com.plugin.gcm.PushHandlerActivity...
[gettarget] Project Target: Android 5.0.1
[gettarget] API level: 21
[echo] ----------
[echo] Creating output directories if needed...
[echo] ----------
[echo] Resolving Dependencies for com.plugin.gcm.PushHandlerActivity...

BUILD FAILED
C:\Users\fsousa\AppData\Local\Android\android-sdk\tools\ant\build.xml:577: ../../external/cordova/framework resolve to a path with no project.properties file for project C:\Salesforce\Workspace\Mobile\TestApp\plugins\com.salesforce\src\android\libs\SalesforceSDK

Total time: 0 seconds

C:\Salesforce\Workspace\Mobile\TestApp\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s /c "ant debug -f C:\Salesforce\Workspace\Mobile\TestApp\platforms\android\build.xml -Dout.dir=ant-build -Dgen.absolute.dir=ant-gen"
ERROR running one or more of the platforms: Error: C:\Salesforce\Workspace\Mobile\TestApp\platforms\android\cordova\run.bat: Command failed with exit code 1
You may not have the required environment or OS to run this project

C:\Salesforce\Workspace\Mobile\TestApp>

duplicate symbol _sqlite3_...

I try to use the SalesforceMobileSDK-CordovaPlugin in combination with an other plugin (https://github.com/litehelpers/Cordova-sqlite-storage). When I try to run the app I got this error message:

duplicate symbol _sqlite3_temp_directory in:
/Develop/workspaces/MobileSDK/HybridOO/platforms/ios/build/HybridOO.build/Debug-iphonesimulator/HybridOO.build/Objects-normal/i386/sqlite3.o
/Develop/workspaces/MobileSDK/HybridOO/platforms/ios/HybridOO/Plugins/com.salesforce/libsqlcipher.a(sqlite3.o)
ld: 192 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I found no possibility to fix this problem.

PushPlugin not found error

I am getting a "PushPlugin not found error" when I add the following code in the callback for getAuthCredentials().

Has anyone got the following code to work?

Code:

cordova.require("com.salesforce.util.push").registerPushNotificationHandler(
function(message) {
// add code to handle notifications
},
function(error) {
// add code to handle errors
}
);

Error in Safari when debugging:

TypeError: console.err is not a function. (In 'console.err("PushPlugin not found")', 'console.err' is undefined)

Cordova plugin build not working for Android

Hi

Are the following build instructions still supported?

cordova plugin add https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin
cordova platform add android
cordova platform add ios
cordova prepare
..

I'm building with cordova v5.2.0 and Mobile SDK 4.0

cordova build android

Produces a valid APK (which I can install and run and other plugins work) however non of the salesforce plugin class files are in the app so cordova require fails

for example:

cordova.require("com.salesforce.plugin.oauth")
Produces:
cordova.js:59 Uncaught module com.salesforce.plugin.oauth not found

I've tried to build in Android studio by importing the platforms/android folder which can build the app without Salesforce Mobile SDK.

Trying to import the two salesforce libraires I need ( SalesforceSDK & Smartstore ) produces a load of missing dependencies such as com.google.volley.

What's the correct way to import the Salesforce cordova plugin, I want to avoid forcedroid as I've got an existing project that is ionic based.

iOS works fine with the above build.

Thanks

Error when running with WKWebView

After adding https://github.com/Telerik-Verified-Plugins/WKWebView to the project, I get a runtime error upon trying to login.

2016-07-20 15:36:38.559 <project name>[26486:220677] -[MyMainViewController getAuthCredentialsWithCompletionBlock:failureBlock:]: unrecognized selector sent to instance 0x7ca4c000
2016-07-20 15:36:38.573 <project name>[26486:220677] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MyMainViewController getAuthCredentialsWithCompletionBlock:failureBlock:]: unrecognized selector sent to instance 0x7ca4c000'
*** First throw call stack:
(
    0   CoreFoundation                      0x0095ca14 __exceptionPreprocess + 180
    1   libobjc.A.dylib                     0x046c5e02 objc_exception_throw + 50
    2   CoreFoundation                      0x00965d63 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
    3   CoreFoundation                      0x008a36bd ___forwarding___ + 1037
    4   CoreFoundation                      0x008a328e _CF_forwarding_prep_0 + 14
    5   <project name>                      0x003a3006 -[SalesforceOAuthPlugin authenticate:getCachedCredentials:] + 454
    6   <project name>                      0x003a27fa -[SalesforceOAuthPlugin getAuthCredentials:] + 314
    7   <project name>                      0x000bc228 -[CDVCommandQueue execute:] + 888
    8   <project name>                      0x00075966 -[MyMainViewController userContentController:didReceiveScriptMessage:] + 358
    9   WebKit                              0x04281171 _ZN28ScriptMessageHandlerDelegate14didPostMessageERN6WebKit12WebPageProxyERNS0_13WebFrameProxyERKNS0_18SecurityOriginDataERN7WebCore21SerializedScriptValueE + 267
    10  WebKit                              0x04222dd6 _ZN6WebKit29WebUserContentControllerProxy14didPostMessageERN3IPC10ConnectionEyyRKNS_18SecurityOriginDataEyRKNS1_13DataReferenceE + 276
    11  WebKit                              0x04224d03 _ZN3IPC13handleMessageIN8Messages29WebUserContentControllerProxy14DidPostMessageEN6WebKit29WebUserContentControllerProxyEMS5_FvRNS_10ConnectionEyyRKNS4_18SecurityOriginDataEyRKNS_13DataReferenceEEEEvS7_RNS_14MessageDecoderEPT0_T1_ + 185
    12  WebKit                              0x04224c1b _ZN6WebKit29WebUserContentControllerProxy17didReceiveMessageERN3IPC10ConnectionERNS1_14MessageDecoderE + 105
    13  WebKit                              0x04224c44 _ZThn8_N6WebKit29WebUserContentControllerProxy17didReceiveMessageERN3IPC10ConnectionERNS1_14MessageDecoderE + 34
    14  WebKit                              0x0405b573 _ZN3IPC18MessageReceiverMap15dispatchMessageERNS_10ConnectionERNS_14MessageDecoderE + 121
    15  WebKit                              0x040147e8 _ZN6WebKit17ChildProcessProxy15dispatchMessageERN3IPC10ConnectionERNS1_14MessageDecoderE + 34
    16  WebKit                              0x04204689 _ZN6WebKit15WebProcessProxy17didReceiveMessageERN3IPC10ConnectionERNS1_14MessageDecoderE + 43
    17  WebKit                              0x04204704 _ZThn4_N6WebKit15WebProcessProxy17didReceiveMessageERN3IPC10ConnectionERNS1_14MessageDecoderE + 34
    18  WebKit                              0x04015639 _ZN3IPC10Connection15dispatchMessageENSt3__110unique_ptrINS_14MessageDecoderENS1_14default_deleteIS3_EEEE + 115
    19  WebKit                              0x04017aaa _ZN3IPC10Connection18dispatchOneMessageEv + 94
    20  WebKit                              0x040189de _ZNSt3__110__function6__funcIZN3IPC10Connection22enqueueIncomingMessageENS_10unique_ptrINS2_14MessageDecoderENS_14default_deleteIS5_EEEEE4$_10NS_9allocatorIS9_EEFvvEEclEv + 20
    21  JavaScriptCore                      0x0adb5766 _ZN3WTF7RunLoop11performWorkEv + 390
    22  JavaScriptCore                      0x0adb5d5e _ZN3WTF7RunLoop11performWorkEPv + 30
    23  CoreFoundation                      0x008766ff __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
    24  CoreFoundation                      0x0086c38b __CFRunLoopDoSources0 + 523
    25  CoreFoundation                      0x0086b7a8 __CFRunLoopRun + 1032
    26  CoreFoundation                      0x0086b0e6 CFRunLoopRunSpecific + 470
    27  CoreFoundation                      0x0086aefb CFRunLoopRunInMode + 123
    28  GraphicsServices                    0x06014664 GSEventRunModal + 192
    29  GraphicsServices                    0x060144a1 GSEventRun + 104
    30  UIKit                               0x00cecbfa UIApplicationMain + 160
    31  <project name>                      0x00063649 main + 89
    32  libdyld.dylib                       0x0506fa21 start + 1
    33  ???                                 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Any idea how to debug this or get it working?

Query _soup property failed in left outer join smart query if the right side record is not existing

Hi

I'm not sure if this should be posted here, as it's related to SmartStore query in Salesforce Mobile SDK.

The issue is when using left outer join in smart query. It happens when querying _soup instead of inidividual properties on the right side soup and there is no corresponding record on the right side. It indeed works when right side has record. I wanted to query _soup is because I wanted to query all properties of the right side soup, so like * in normal sql, like below, the first one doesn't work as expected, but the second works fine.

  1. Query with _soup
    select a.{SoupA:Id}, b.{SoupB:_soup} from {SoupA} as a left outer join {SoupB} as b on a.{SoupA:BId} = b.{SoupB:Id} where a.{SoupA:Id} = '1';
    1.1. When SoupB has corresponding record:
    Expect: return 1 record, with both SoupA.Id and the complete SoupB record.
    Actual: true
    1.2. When SoupB has no corresponding record:
    Expect: return 1 record, with SoupA.Id and null for SoupB
    Actual: false, no record is returned at all
  2. Query with inidividual property on right side soup
    select a.{SoupA:Id}, b.{SoupB:Id} from {SoupA} as a left outer join {SoupB} as b on a.{SoupA:BId} = b.{SoupB:Id} where a.{SoupA:Id} = '1';
    2.1. When SoupB has corresponding record:
    Expect: return 1 record, with both SoupA.Id and SoupB.Id
    Actual: true
    2.2. When SoupB has no corresponding record:
    Expect: return 1 record, with SoupA.Id and null for SoupB.Id
    Actual: true

I know maybe we should not use _soup property because it is not created by us when inserting a record to a soup, because it's more like a native self-reference to the record itself. But is it possible to fix the problem described in 1.2 above? That would be really helpful as this is a shortcut for querying like b.* instead of iterating all fields.

Thanks.

upSync not working correctly

When using the up sync ability from the new smartsync plugin, you need to specify a field list.

But if one the objects that needs to be synced has a field from the field list that is empty, the application will crash on a setObjectForKey: object cannot be nil (key: Customfield__c)' exception.

This way it's not possible to have edited multiple items and use the up sync functionality if for example in item A, Customfield__c is edited and in item B it's empty.

Plugin conflict with cordova google map plugin

Hi,

We are building an mobile application (Both ios/Android) connects to salesforce using cordova (hybrid approach), and one of the requirement is to use map functionality, after some investigation we decided to use the native map plugin here: https://github.com/wf9a5m75/phonegap-googlemaps-plugin

However, we encountered different problems when try to get the Salesforce mobilesdk plugin and the map plugin working altogether in iOS and Android. Following specified the problem in detail:

In Ios:
The salesforce plugin conflicts with the map plugin, the map will not display when salesforce plugin is installed.

Steps to reproduce:

  • Configure the google map API Key for iOS and Android, follow instructions here: https://github.com/wf9a5m75/phonegap-googlemaps-plugin/wiki/Tutorial-for-Mac
  • Create a Salesforce Connected App, follow mobilesdk getting started tutorial
  • In command line, do the following
    mkdir sampleApp
    cd sampleApp
    cordova create . app.bundle.id SampleApp
    cordova platform add ios
    cordova plugin add org.apache.cordova.console //Just to see the console debug
    cordova plugin add plugin.google.maps --variable API_KEY_FOR_ANDROID="xxxx" --variable API_KEY_FOR_IOS="xxxx"
  • modified index.html in www into following
<!DOCTYPE html>
<!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
-->
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="format-detection" content="telephone=no" />
        <meta name="msapplication-tap-highlight" content="no" />
        <!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 -->
        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
        <title>Hello World</title>
    </head>
    <body>
    <script type="text/javascript">
    document.addEventListener('deviceready', function(){
        console.log('DEVICE READY');
        setTimeout(function(){
            console.log('INIT MAP START');
            var div = document.getElementById("map_canvas");
            var map = plugin.google.maps.Map.getMap(div);
            console.log('INIT MAP END');
        }, 100);
    });
    </script>
        <div style="width:90%;margin-left:10%;height:500px" id="map_canvas">MAP DIV</div>
        <script type="text/javascript" src="cordova.js"></script>
        <!--<script type="text/javascript" src="js/index.js"></script>-->
    </body>
</html>
  • In command line, do the following
    cordova prepare
    cordova run ios

App boots up and the map shows up.

{
  "remoteAccessConsumerKey": "<CONSUMER_KEY>",
  "oauthRedirectURI": "https://test.salesforce.com/services/oauth2/success",
  "oauthScopes": [
    "web",
    "api",
    "visualforce",
    "refresh_token"
  ],
  "isLocal": true,
  "startPage": "index.html",
  "errorPage": "error.html",
  "shouldAuthenticate": true,
  "attemptOfflineLoad": false,
  "androidPushNotificationClientId": ""
}
  • In command line, do the following

cordova prepare
cordova run ios

App boots up, after login to salesforce, in console it can be seen that the map initialise went through ('INIT MAP END' is printed out), but the map does not show up.

  • The problem can be replicated by removing and installing the salesforce sdk plugin multiple times
    cordova plugin rm com.salesforce
    cordova prepare
    cordova run ios

cordova plugin add https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin
cordova prepare
cordova run ios

When salesforce sdk plugin is not installed, the map shows up, and the map does not show up when salesforce sdk plugin is installed.

We think it's a display problem, if we attach callback onto map events (such as mapready, camera change, etc.), the callbacks are fired. the camera change event is fired when one touchmove on the area where is supposed to be the map. This can be verified by changing the device ready callback to following:

document.addEventListener('deviceready', function(){
        console.log('DEVICE READY');
        setTimeout(function(){
            console.log('INIT MAP START');
            var div = document.getElementById("map_canvas");
            var map = plugin.google.maps.Map.getMap(div);
            map.one(plugin.google.maps.event.MAP_READY, function(){
                console.log('MAP READY CALLBACK');
                map.on(plugin.google.maps.event.CAMERA_CHANGE, function(){
                    console.log('MAP CAMERA CHANGE CALLBACK');
                });
            });
            console.log('INIT MAP END');
        }, 100);
    });

Envirnoment:
Mac OS 10.9.5
cordova 4.1.2
debug using IPad 3 with iOS 8

In Android:
There is a build path conflict, both plugins use a different version of Android Volley, which will finally cause a "Unable to execute dex: Multiple dex files define " error when build:

Mobile SDK: https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin/blob/master/src/android/libs/SalesforceSDK/libs/volley_android-4.4.2_r2.jar

MAP: installs phonegap-http-request(plugin.http.request) as a dependency, which includes https://github.com/wf9a5m75/phonegap-http-request/tree/master/libs/android

Could we ask some advices or steps in order to fix the problem?

Thanks.

cordova prepare - Error: TypeError: Cannot read property 'attrib' of null

Hi,

I followed instruction :

npm install cordova -g

cordova create TestApp
cd TestApp
cordova plugin add https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin
cordova platform add android
cordova platform add ios
cordova prepare

and i have:

Error: TypeError: Cannot read property 'attrib' of null at Object.setOrientation (C:\github projects\sf\TestApp\platforms\android\cordova\lib\AndroidManifest.js:85:32) at updateProjectAccordingTo (C:\github projects\sf\TestApp\platforms\android\cordova\lib\prepare.js:134:10) at C:\github projects\sf\TestApp\platforms\android\cordova\lib\prepare.js:41:16 at _fulfilled (C:\github projects\sf\TestApp\platforms\android\cordova\node_modules\q\q.js:834:54) at self.promiseDispatch.done (C:\github projects\sf\TestApp\platforms\android\cordova\node_modules\q\q.js:863:30) at Promise.promise.promiseDispatch (C:\github projects\sf\TestApp\platforms\android\cordova\node_modules\q\q.js:796:13) at C:\github projects\sf\TestApp\platforms\android\cordova\node_modules\q\q.js:556:49 at runSingle (C:\github projects\sf\TestApp\platforms\android\cordova\node_modules\q\q.js:137:13) at flush (C:\github projects\sf\TestApp\platforms\android\cordova\node_modules\q\q.js:125:13) at nextTickCallbackWith0Args (node.js:420:9)

could you advise?

Passcode screen not responding on enter

Hi,
I added the latest Mobile SDK to my cordova application and I observed that in Passcode screen after login, when I tap Go button from soft input keyboard the first time, there is no response from the screen and it is stuck there forever. I am running it on Android 6.0.1 phone. Is there any work around for the same?

How to perform bulk DML operations in salesforce hybrid app ?

I have created a salesforce hybrid app using Forceios and I'm able to perform the CRUD operations using forcetk client instance .

Now I want to perform mass update on salesforce objects but I didn't find any running example code to do so.

For 2 days I have searched for topics like BULK API, SmartSync , JSForce but I don't understand how to implement them.

Kindly share a code to perform Bulk DML operations like mass update through salesforce hybrid app.

Kindly Help me out ....

Customer Portal + Auth Provider + Facebook Login

PROBLEM:
When we login using Facebook it successfully redirects to the Facebook login page and if login username and password are correct then shows the authorisation of the Facebook developer app. when you press okay it goes to the Default Landing/Home Page for customer portal without dismissing the overlay web view displayed by salesforce mobile sdk. Control doesn't transfer back to the ionic cordova app after Facebook login.

Setup:
-> On Salesforce

  1. org with customer portal
  2. Site created for login to customer portal and the SiteLogin has two buttons "Login" and "Facebook Login"
  3. Auth. Provider created for Facebook in both Salesforce Setup as well as Facebook developer app.
  4. When click on "Facebook Login" SiteLogin redirects to the Facebook SSO URL successfully and when authorised on Facebook by the user it comes back to the Landing Page for Customer Portal which is in our case Profile Page.
  5. Created a Connected app on Salesforce
  6. set the Callback Url from Auth. Provider to Salesforce Connected app.

-> On ionic cordova salesforce app for iOS

  1. used the consumer key of the connected app to connect
  2. Built the app and run on both simulator and device.

For the Hybrid iOS App:
This setup works well if used with salesforce login. after successful authentication the overlay login window(with webview) from salesforce mobile sdk and we are able to see our cordova ionic app top screen.

Please help us solving this issue for Facebook login.
If you want details of the dev org we can provide the details.

Issues with Cordova build android with SDK4.1.1 using forcedroid

Hi,

I tried to create a project using forcedroid, and facing some issues AndroidManifest merge.

Steps, which I followed, are below:

  1. Updated Cordova globally to - Cordova CLI: 5.4.0
  2. forcedroid create —apptype=hybrid_local --appname=mytest --targetdir=/Users/khirod/MyTest --packagename=com.myserver.mytest --usessmartstore=ye
The above creates the project on my directive and I could see the below information.

  3. Installed ios platform to 3.9.2
  4. Current plugin and platform list
    Plugin list
    com.salesforce 4.1.1 "SalesforceMobileSDK Plugins"
    cordova-plugin-device 1.0.1 "Device"
    cordova-plugin-whitelist 1.2.2 "Whitelist"
    phonegap-plugin-push 1.5.0 "PushPlugin"
    urbanairship-cordova 5.1.0 "Urban Airship"
    Platform List
    android 5.0.0, ios 3.9.2
  5. Installed [email protected]
  6. Cordova prepare
  7. Cordova build android

Issues after the above the step.
AAPT: /Users/khirod/MyTest/mytest/platforms/android/res/drawable-mdpi/ua_ic_close.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
AAPT: /Users/khirod/MyTest/mytest/platforms/android/res/drawable-xxhdpi/ua_ic_close.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
AAPT: /Users/khirod/MyTest/mytest/platforms/android/res/drawable-ldpi/icon.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
AAPT: /Users/khirod/MyTest/mytest/platforms/android/res/drawable-hdpi/ua_ic_close.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
:processDebugManifest
/Users/khirod/MyTest/mytest/platforms/android/AndroidManifest.xml:53:9-58:20 Error:
Element activity#com.salesforce.androidsdk.phonegap.ui.SalesforceDroidGapActivity at AndroidManifest.xml:53:9-58:20 duplicated with element declared at AndroidManifest.xml:23:9-28:20
/Users/khirod/MyTest/mytest/platforms/android/AndroidManifest.xml Error:
Validation failed, exiting
:processDebugManifest FAILED

Please suggest how I can fix these issues.

Unable to run sample sales-force contact explorer application in Cordova project in Visual Studio 2015

In visual studio 2015 When I try to run the sample sales-force contactexplorer application , I got the following error:

Here is my method:

function onDeviceReady() {
cordova.require("com.salesforce.util.logger").logToConsole("onDeviceReady:Cordova ready");
//Call getAuthCredentials to get the initial session credentials
cordova.require("com.salesforce.plugin.oauth").getAuthCredentials(salesforceSessionRefreshed, getAuthCredentialsError);
//register to receive notifications when autoRefreshOnForeground refreshes the sfdc session
document.addEventListener("salesforceSessionRefresh",salesforceSessionRefreshed,false);
//enable buttons
regLinkClickHandlers();
}

Here is my output:

jslog: onDeviceReady: Cordova ready

missing exec:com.salesforce.oauth.getAuthCredentials

TypeError: Cannot read property 'getAuthCredentials' of undefined(…)
TypeError: Cannot read property 'getAuthCredentials' of undefined
at module.exports.exec
at exec (com.salesforce.util.exec.js:34)
at Object.getAuthCredentials (com.salesforce.plugin.oauth.js:56)
at onDeviceReady (index.html:64)
at Channel.fire (cordova.js:820)
at cordova.js:229
com.salesforce.oauth
getAuthCredentials

NSURLErrorDomainCode=-999 error

@bhariharan This is related to #143

We've upgraded the SDK to 4.0.2 but we still see the NSURLErrorDomainCode=-999 error.

I now suspect if it has to do with refresh token flow....my hypothesis is that the app should obtain a new access token, but it can't so it eventually throws the NSURLErrorDomainCode error.

2016-01-19 09:22:19.385 APP[1722:740701] [{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]

2016-01-19 09:22:19.385 APP[1722:740701] what is refresh_token:

2016-01-19 09:22:19.385 APP 1722:740701] {"access_token":"*******_","instance_url":"https://abc.cs5.my.salesforce.com","refresh_token":"**__","id":"_***"}

2016-01-19 09:22:19.385 PasonaMyPage[1722:740701] oauthPlugin is true

2016-01-19 09:22:21.431 APP[1722:740701] TIMING com.salesforce.oauth:authenticate: 2053ms

2016-01-19 09:22:21.432 APP[1722:740701] refresh Token With Plugin.....

2016-01-19 09:22:21.432 APP 1722:740701] {"userId":"******","loginUrl":"https://abc.cs5.force.com","refreshToken":"**_****_","clientId":"**_***_","orgId":"**_********_","accessToken":"**_***_","userAgent":"SalesforceMobileSDK/4.0.2 iPhone OS/9.2 (iPhone) PasonaMyPage/0.0.1 Hybrid uid**_* Mozilla/5.0 (iPhone; CPU iPhone OS 9_2 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13C75","instanceUrl":"https://abc.cs5.my.salesforce.com"}APP

2016-01-19 09:22:21.476 APP[1722:740701] Resetting plugins due to page load.

2016-01-19 09:22:21:488 APP 1722:740701] ERROR|SFHybridViewController|Error while attempting to load web page: Error Domain=NSURLErrorDomain Code=-999 "(null)" UserInfo={NSErrorFailingURLStringKey=https://abc.cs5.my.salesforce.com/visualforce/session?url=/apexpages/utils/ping.apexp&autoPrefixVFDomain=true, NSErrorFailingURLKey=https://abc.cs5.my.salesforce.com/visualforce/session?url=/apexpages/utils/ping.apexp&autoPrefixVFDomain=true}

ERROR|SFHybridViewController|Error while attempting to load web page: Error Domain=CDVWebViewDelegate Code=1 "CDVWebViewDelegate: Navigation started when state=1"

When I quickly change between menu items in a popout menu I get the bootstrap error page with the following error:

CDVWebViewDelegate: Navigation started when state=1
2015-03-26 16:41:19:491 MayorApp[62832:607] ERROR|SFHybridViewController|Error while attempting to load web page: Error Domain=CDVWebViewDelegate Code=1 "CDVWebViewDelegate: Navigation started when state=1" UserInfo=0x7beca7b0 {NSLocalizedDescription=CDVWebViewDelegate: Navigation started when state=1}
2015-03-26 16:41:19.572 MayorApp[62832:1682320] Failed to load webpage with error: CDVWebViewDelegate: Navigation started when state=1
2015-03-26 16:41:19.581 MayorApp[62832:1682320] Resetting plugins due to page load.
2015-03-26 16:41:19.604 MayorApp[62832:1682320] Finished load of: about:blank

Looks like this occurs in SFHybridViewController. Has anyone seen this bug?

After Idle for 7-8 hours first request is giving error.

Hi,
My plugin version: 4.2.0, same occurs in 4.3.0 also. IOS environment.

After Idle for 7-8 hours first request is giving error.
after killing the app and opening the app ,request works.

My application works in a way that after salesforce login

force.login().then(
 function(){
  force.myCustomRequest()
  .then(function(success){
  //some code
  },function(error){
  //error handle
  })
 },
function(error){
//error handle
}
);

after 6-7 hours ideal time
force.myCustomRequest is giving error

two scenario of errors

scenario 1:

in forceng.js
oauthPlugin.getAuthCredentials success/failure don't get called

function loginWithPlugin() {
      document.addEventListener("deviceready", function () {
        oauthPlugin = cordova.require("com.salesforce.plugin.oauth");
        if (!oauthPlugin) {
          console.error('Salesforce Mobile SDK OAuth plugin not available');
          if (deferredLogin) deferredLogin.reject({status: 'Salesforce Mobile SDK OAuth plugin not available'});
          return;
        }

        console.log('forceng - loginWithPlugin - oauthPlugin.getAuthCredentials is being called');
        oauthPlugin.getAuthCredentials(
          function (creds) {
            // Initialise ForceJS
            console.log(creds.accessToken);
            init({accessToken: creds.accessToken, instanceURL: creds.instanceUrl, refreshToken: creds.refreshToken});
            if (deferredLogin) deferredLogin.resolve();
          },
          function (error) {
            console.log(error);
            if (deferredLogin) deferredLogin.reject(error);
          }
        );
      }, false);
    }

scenario 2:

in forcing.js on function function request(obj) {
refreshToken().success is not a function error occurs

$http({
        headers: headers,
        method: method,
        url: url,
        params: obj.params,
        data: obj.data
      })
        .success(function (data, status, headers, config) {
          deferred.resolve(data);
        })
        .error(function (data, status, headers, config) {
          if (status === 401 && oauth.refresh_token) {

            refreshToken()
              .success(function () {
                // Try again with the new token
                request(obj);
              })
              .error(function () {
                console.error(data);
                deferred.reject(data);
              });
          } else {
            console.error(data);
            deferred.reject(data);
          }

        });

Thanks
Sudhansu

Hybrid app getAuthCredentials failed in cordova container

hi all, I am trying to build a local hybrid app that uses SalesforceMobileSDK-CordovaPlugin, the expected result should be user list from my Salesforce instance. I followed every steps from https://www.youtube.com/watch?v=kLlzSWTyRjM(starts from 30:55), I am using Windows 8.1, instead of use Andriod emulator, I add browser platform to cordova container, but after I run the app on browser, i got "com.salesforce.oauth:getAuthCredentials failed" exception(please see attached screen-shot), after looked at app.js file, it's definitely having issue talks to connected app that I created in my Sealesforce instance, and I also double checked the values of "remoteAccessConsumerKey" & "oauthRedirectURI" properties in bootconfig.json. I don't know what else I have missed. Any advices will be appreciated!

rtaimage
rtaimage2

Command failed with exit code 1 (on Mac OSX)

Hi there

Like annoyingmouse, I'm having issues trying to build an Android app using the SalesForce SDK. After trying all of the things mentioned on his post and across the internet to no avail, I thought the only thing left for me was to try it out on a Mac. I'm not very good with VM's, so I borrowed a colleague's Mac running OSX (Yosemite). The ios version of the app builds successfully, but there are still problems with the android build.

The final error message still refers to 'exit code 1', although the rest of the errors seem to vary:

Bob-Mac:Test ramesesniblick$ cd test
Bob-Mac:test ramesesniblick$ cordova prepare
Bob-Mac:test ramesesniblick$ cordova build android
Running command: /Users/ramesesniblick/Documents/Apps/Test/test/platforms/android/cordova/build
Buildfile: /Users/ramesesniblick/Documents/Apps/Test/test/platforms/android/build.xml

-set-mode-check:

-set-debug-files:

-check-env:
[checkenv] Android SDK Tools Revision 24.1.2
[checkenv] Installed at /Users/ramesesniblick/Library/Android/sdk

-setup:
[echo] Project Name: com.plugin.gcm.PushHandlerActivity
[gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 21.1.2
[echo] Resolving Build Target for com.plugin.gcm.PushHandlerActivity...
[gettarget] Project Target: Android 5.0.1
[gettarget] API level: 21
[echo] ----------
[echo] Creating output directories if needed...
[echo] ----------
[echo] Resolving Dependencies for com.plugin.gcm.PushHandlerActivity...
[dependency] Library dependencies:
[dependency]
[dependency] ------------------
[dependency] Ordered libraries:
[dependency]
[dependency] ------------------
[echo] ----------
[echo] Building Libraries with 'debug'...

nodeps:

-set-mode-check:

-set-debug-files:

-check-env:
[checkenv] Android SDK Tools Revision 24.1.2
[checkenv] Installed at /Users/ramesesniblick/Library/Android/sdk

-setup:
[echo] Project Name: com.plugin.gcm.PushHandlerActivity
[gettype] Project Type: Android Library

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 21.1.2
[echo] Resolving Build Target for com.plugin.gcm.PushHandlerActivity...
[gettarget] Project Target: Android 5.0.1
[gettarget] API level: 21
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: /Users/ramesesniblick/Documents/Apps/Test/test/platforms/android/CordovaLib/ant-build/rsObj
[mkdir] Created dir: /Users/ramesesniblick/Documents/Apps/Test/test/platforms/android/CordovaLib/ant-build/rsLibs
[echo] ----------
[echo] Resolving Dependencies for com.plugin.gcm.PushHandlerActivity...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------

-code-gen:
[mergemanifest] No changes in the AndroidManifest files.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[echo] ----------
[echo] Handling Resources...
[aapt] No changed resources. R.java and Manifest.java untouched.
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] No need to generate new BuildConfig.

-pre-compile:

-compile:
[echo] Creating library output jar file...

-post-compile:

-obfuscate:

-dex:
[echo] Library project: do not convert bytecode...

-crunch:
[crunch] Crunching PNG Files in source dir: /Users/ramesesniblick/Documents/Apps/Test/test/platforms/android/CordovaLib/res
[crunch] To destination dir: /Users/ramesesniblick/Documents/Apps/Test/test/platforms/android/CordovaLib/ant-build/res
[crunch] Crunched 0 PNG files to update cache

-package-resources:
[echo] Library project: do not package resources...

-package:
[echo] Library project: do not package apk...

-post-package:

-do-debug:
[echo] Library project: do not create apk...
[propertyfile] Updating property file: /Users/ramesesniblick/Documents/Apps/Test/test/platforms/android/CordovaLib/ant-build/build.prop
[propertyfile] Updating property file: /Users/ramesesniblick/Documents/Apps/Test/test/platforms/android/CordovaLib/ant-build/build.prop
[propertyfile] Updating property file: /Users/ramesesniblick/Documents/Apps/Test/test/platforms/android/CordovaLib/ant-build/build.prop
[propertyfile] Updating property file: /Users/ramesesniblick/Documents/Apps/Test/test/platforms/android/CordovaLib/ant-build/build.prop

-post-build:

debug:

nodeps:

-set-mode-check:

-set-debug-files:

-check-env:
[checkenv] Android SDK Tools Revision 24.1.2
[checkenv] Installed at /Users/ramesesniblick/Library/Android/sdk

-setup:
[echo] Project Name: SalesforceSDK
[gettype] Project Type: Android Library

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 21.1.2
[echo] Resolving Build Target for SalesforceSDK...
[gettarget] Project Target: Android 5.0.1
[gettarget] API level: 21
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/ant-build/rsObj
[mkdir] Created dir: /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/ant-build/rsLibs
[echo] ----------
[echo] Resolving Dependencies for SalesforceSDK...
[dependency] Library dependencies:
[dependency]
[dependency] ------------------
[dependency] Ordered libraries:
[dependency]
[dependency] ------------------

-code-gen:
[mergemanifest] No changes in the AndroidManifest files.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[echo] ----------
[echo] Handling Resources...
[aapt] No changed resources. R.java and Manifest.java untouched.
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.

-pre-compile:

-compile:
[javac] Compiling 70 source files to /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/ant-build/classes
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:35: error: package org.apache.cordova does not exist
[javac] import org.apache.cordova.CallbackContext;
[javac] ^
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:36: error: package org.apache.cordova does not exist
[javac] import org.apache.cordova.CordovaActivity;
[javac] ^
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:37: error: package org.apache.cordova does not exist
[javac] import org.apache.cordova.CordovaWebView;
[javac] ^
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:38: error: package org.apache.cordova does not exist
[javac] import org.apache.cordova.CordovaWebViewClient;
[javac] ^
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:75: error: cannot find symbol
[javac] public class SalesforceDroidGapActivity extends CordovaActivity {
[javac] ^
[javac] symbol: class CordovaActivity
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:157: error: cannot find symbol
[javac] protected CordovaWebViewClient makeWebViewClient(CordovaWebView webView) {
[javac] ^
[javac] symbol: class CordovaWebView
[javac] location: class SalesforceDroidGapActivity
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:157: error: cannot find symbol
[javac] protected CordovaWebViewClient makeWebViewClient(CordovaWebView webView) {
[javac] ^
[javac] symbol: class CordovaWebViewClient
[javac] location: class SalesforceDroidGapActivity
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:310: error: cannot find symbol
[javac] public void authenticate(final CallbackContext callbackContext) {
[javac] ^
[javac] symbol: class CallbackContext
[javac] location: class SalesforceDroidGapActivity
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/ForcePlugin.java:29: error: package org.apache.cordova does not exist
[javac] import org.apache.cordova.CallbackContext;
[javac] ^
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/ForcePlugin.java:30: error: package org.apache.cordova does not exist
[javac] import org.apache.cordova.CordovaPlugin;
[javac] ^
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/ForcePlugin.java:41: error: cannot find symbol
[javac] public abstract class ForcePlugin extends CordovaPlugin {
[javac] ^
[javac] symbol: class CordovaPlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/ForcePlugin.java:56: error: cannot find symbol
[javac] public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
[javac] ^
[javac] symbol: class CallbackContext
[javac] location: class ForcePlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/ForcePlugin.java:104: error: cannot find symbol
[javac] abstract protected boolean execute(String actionStr, JavaScriptPluginVersion jsVersion, JSONArray args, CallbackContext callbackContext) throws JSONException;
[javac] ^
[javac] symbol: class CallbackContext
[javac] location: class ForcePlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/SDKInfoPlugin.java:33: error: package org.apache.cordova does not exist
[javac] import org.apache.cordova.CallbackContext;
[javac] ^
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/SDKInfoPlugin.java:71: error: cannot find symbol
[javac] public boolean execute(String actionStr, JavaScriptPluginVersion jsVersion, JSONArray args, CallbackContext callbackContext) throws JSONException {
[javac] ^
[javac] symbol: class CallbackContext
[javac] location: class SDKInfoPlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/SDKInfoPlugin.java:91: error: cannot find symbol
[javac] protected void getInfo(JSONArray args, final CallbackContext callbackContext) throws JSONException {
[javac] ^
[javac] symbol: class CallbackContext
[javac] location: class SDKInfoPlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/SFAccountManagerPlugin.java:31: error: package org.apache.cordova does not exist
[javac] import org.apache.cordova.CallbackContext;
[javac] ^
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/SFAccountManagerPlugin.java:62: error: cannot find symbol
[javac] CallbackContext callbackContext) throws JSONException {
[javac] ^
[javac] symbol: class CallbackContext
[javac] location: class SFAccountManagerPlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/SFAccountManagerPlugin.java:92: error: cannot find symbol
[javac] protected void getUsers(CallbackContext callbackContext) {
[javac] ^
[javac] symbol: class CallbackContext
[javac] location: class SFAccountManagerPlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/SFAccountManagerPlugin.java:109: error: cannot find symbol
[javac] protected void getCurrentUser(CallbackContext callbackContext) {
[javac] ^
[javac] symbol: class CallbackContext
[javac] location: class SFAccountManagerPlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/SFAccountManagerPlugin.java:125: error: cannot find symbol
[javac] protected void logout(JSONArray args, CallbackContext callbackContext) {
[javac] ^
[javac] symbol: class CallbackContext
[javac] location: class SFAccountManagerPlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/SFAccountManagerPlugin.java:144: error: cannot find symbol
[javac] protected void switchToUser(JSONArray args, CallbackContext callbackContext) {
[javac] ^
[javac] symbol: class CallbackContext
[javac] location: class SFAccountManagerPlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/SalesforceOAuthPlugin.java:29: error: package org.apache.cordova does not exist
[javac] import org.apache.cordova.CallbackContext;
[javac] ^
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/SalesforceOAuthPlugin.java:30: error: package org.apache.cordova does not exist
[javac] import org.apache.cordova.PluginResult;
[javac] ^
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/SalesforceOAuthPlugin.java:57: error: cannot find symbol
[javac] public boolean execute(String actionStr, JavaScriptPluginVersion jsVersion, JSONArray args, CallbackContext callbackContext) throws JSONException {
[javac] ^
[javac] symbol: class CallbackContext
[javac] location: class SalesforceOAuthPlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/SalesforceOAuthPlugin.java:81: error: cannot find symbol
[javac] protected void authenticate(final CallbackContext callbackContext) throws JSONException {
[javac] ^
[javac] symbol: class CallbackContext
[javac] location: class SalesforceOAuthPlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/SalesforceOAuthPlugin.java:96: error: cannot find symbol
[javac] protected void getAuthCredentials(CallbackContext callbackContext) throws JSONException {
[javac] ^
[javac] symbol: class CallbackContext
[javac] location: class SalesforceOAuthPlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/SalesforceOAuthPlugin.java:112: error: cannot find symbol
[javac] protected void getAppHomeUrl(CallbackContext callbackContext) {
[javac] ^
[javac] symbol: class CallbackContext
[javac] location: class SalesforceOAuthPlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/SalesforceOAuthPlugin.java:121: error: cannot find symbol
[javac] protected void logoutCurrentUser(CallbackContext callbackContext) {
[javac] ^
[javac] symbol: class CallbackContext
[javac] location: class SalesforceOAuthPlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/TestRunnerPlugin.java:32: error: package org.apache.cordova does not exist
[javac] import org.apache.cordova.CallbackContext;
[javac] ^
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/TestRunnerPlugin.java:65: error: cannot find symbol
[javac] public boolean execute(String actionStr, JavaScriptPluginVersion jsVersion, JSONArray args, CallbackContext callbackContext) throws JSONException {
[javac] ^
[javac] symbol: class CallbackContext
[javac] location: class TestRunnerPlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/TestRunnerPlugin.java:92: error: cannot find symbol
[javac] private void onTestComplete(JSONArray args, CallbackContext callbackContext) throws JSONException, InterruptedException {
[javac] ^
[javac] symbol: class CallbackContext
[javac] location: class TestRunnerPlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/TestRunnerPlugin.java:119: error: cannot find symbol
[javac] private void onReadyForTests(JSONArray args, CallbackContext callbackContext) {
[javac] ^
[javac] symbol: class CallbackContext
[javac] location: class TestRunnerPlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceIceCreamWebViewClient.java:32: error: package org.apache.cordova does not exist
[javac] import org.apache.cordova.CordovaInterface;
[javac] ^
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceIceCreamWebViewClient.java:33: error: package org.apache.cordova does not exist
[javac] import org.apache.cordova.CordovaResourceApi;
[javac] ^
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceIceCreamWebViewClient.java:34: error: package org.apache.cordova.CordovaResourceApi does not exist
[javac] import org.apache.cordova.CordovaResourceApi.OpenForReadResult;
[javac] ^
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceIceCreamWebViewClient.java:35: error: package org.apache.cordova does not exist
[javac] import org.apache.cordova.CordovaWebView;
[javac] ^
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceIceCreamWebViewClient.java:36: error: package org.apache.cordova does not exist
[javac] import org.apache.cordova.IceCreamCordovaWebViewClient;
[javac] ^
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceIceCreamWebViewClient.java:43: error: cannot find symbol
[javac] public class SalesforceIceCreamWebViewClient extends IceCreamCordovaWebViewClient {
[javac] ^
[javac] symbol: class IceCreamCordovaWebViewClient
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceIceCreamWebViewClient.java:51: error: cannot find symbol
[javac] protected CordovaWebView cordovaWebView;
[javac] ^
[javac] symbol: class CordovaWebView
[javac] location: class SalesforceIceCreamWebViewClient
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceIceCreamWebViewClient.java:59: error: cannot find symbol
[javac] public SalesforceIceCreamWebViewClient(CordovaInterface cordova, CordovaWebView view) {
[javac] ^
[javac] symbol: class CordovaInterface
[javac] location: class SalesforceIceCreamWebViewClient
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceIceCreamWebViewClient.java:59: error: cannot find symbol
[javac] public SalesforceIceCreamWebViewClient(CordovaInterface cordova, CordovaWebView view) {
[javac] ^
[javac] symbol: class CordovaWebView
[javac] location: class SalesforceIceCreamWebViewClient
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/app/SalesforceSDKManager.java:325: error: method init in class SalesforceSDKManager cannot be applied to given types;
[javac] SalesforceSDKManager.init(context, keyImpl, SalesforceDroidGapActivity.class, LoginActivity.class);
[javac] ^
[javac] required: Context,KeyInterface,Class<? extends Activity>,Class<? extends Activity>
[javac] found: Context,KeyInterface,Class,Class
[javac] reason: actual argument Class cannot be converted to Class<? extends Activity> by method invocation conversion
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/app/SalesforceSDKManager.java:337: error: method init in class SalesforceSDKManager cannot be applied to given types;
[javac] SalesforceSDKManager.init(context, keyImpl, SalesforceDroidGapActivity.class, loginActivity);
[javac] ^
[javac] required: Context,KeyInterface,Class<? extends Activity>,Class<? extends Activity>
[javac] found: Context,KeyInterface,Class,Class<CAP#1>
[javac] reason: actual argument Class cannot be converted to Class<? extends Activity> by method invocation conversion
[javac] where CAP#1 is a fresh type-variable:
[javac] CAP#1 extends Activity from capture of ? extends Activity
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/app/SalesforceSDKManager.java:350: error: type argument ? extends SalesforceDroidGapActivity is not within bounds of type-variable T
[javac] Class<? extends SalesforceDroidGapActivity> mainActivity, Class<? extends Activity> loginActivity) {
[javac] ^
[javac] where T is a type-variable:
[javac] T extends Object declared in class Class
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:109: error: cannot find symbol
[javac] super.onCreate(savedInstanceState);
[javac] ^
[javac] symbol: variable super
[javac] location: class SalesforceDroidGapActivity
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:113: error: method getBootConfig in class BootConfig cannot be applied to given types;
[javac] bootconfig = BootConfig.getBootConfig(this);
[javac] ^
[javac] required: Context
[javac] found: SalesforceDroidGapActivity
[javac] reason: actual argument SalesforceDroidGapActivity cannot be converted to Context by method invocation conversion
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:121: error: cannot find symbol
[javac] registerReceiver(userSwitchReceiver, new IntentFilter(UserAccountManager.USER_SWITCH_INTENT_ACTION));
[javac] ^
[javac] symbol: method registerReceiver(UserSwitchReceiver,IntentFilter)
[javac] location: class SalesforceDroidGapActivity
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:124: error: no suitable method found for notifyEvent(EventType,SalesforceDroidGapActivity)
[javac] EventsObservable.get().notifyEvent(EventType.MainActivityCreateComplete, this);
[javac] ^
[javac] method EventsObservable.notifyEvent(Event) is not applicable
[javac](actual and formal argument lists differ in length)
[javac] method EventsObservable.notifyEvent(EventType,Object) is not applicable
[javac](actual argument SalesforceDroidGapActivity cannot be converted to Object by method invocation conversion)
[javac] method EventsObservable.notifyEvent(EventType) is not applicable
[javac](actual and formal argument lists differ in length)
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:106: error: method does not override or implement a method from a supertype
[javac] @OverRide
[javac] ^
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:128: error: no suitable constructor found for ClientManager(SalesforceDroidGapActivity,String,LoginOptions,boolean)
[javac] return new ClientManager(this, SalesforceSDKManager.getInstance().getAccountType(),
[javac] ^
[javac] constructor ClientManager.ClientManager(Context,String,LoginOptions,boolean) is not applicable
[javac](actual argument SalesforceDroidGapActivity cannot be converted to Context by method invocation conversion)
[javac] constructor ClientManager.ClientManager(Context,String,LoginOptions) is not applicable
[javac](actual and formal argument lists differ in length)
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:137: error: cannot find symbol
[javac] super.init();
[javac] ^
[javac] symbol: variable super
[javac] location: class SalesforceDroidGapActivity
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:139: error: cannot find symbol
[javac] if (null != this.appView) {
[javac] ^
[javac] symbol: variable appView
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:140: error: cannot find symbol
[javac] WebSettings webSettings = this.appView.getSettings();
[javac] ^
[javac] symbol: variable appView
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:147: error: cannot find symbol
[javac] String cachePath = getApplicationContext().getCacheDir().getAbsolutePath();
[javac] ^
[javac] symbol: method getApplicationContext()
[javac] location: class SalesforceDroidGapActivity
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:152: error: cannot find symbol
[javac] EventsObservable.get().notifyEvent(EventType.GapWebViewCreateComplete, appView);
[javac] ^
[javac] symbol: variable appView
[javac] location: class SalesforceDroidGapActivity
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:133: error: method does not override or implement a method from a supertype
[javac] @OverRide
[javac] ^
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:156: error: method does not override or implement a method from a supertype
[javac] @OverRide
[javac] ^
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:163: error: cannot find symbol
[javac] super.onResume();
[javac] ^
[javac] symbol: variable super
[javac] location: class SalesforceDroidGapActivity
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:164: error: method onResume in class PasscodeManager cannot be applied to given types;
[javac] if (passcodeManager.onResume(this)) {
[javac] ^
[javac] required: Activity
[javac] found: SalesforceDroidGapActivity
[javac] reason: actual argument SalesforceDroidGapActivity cannot be converted to Activity by method invocation conversion
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:161: error: method does not override or implement a method from a supertype
[javac] @OverRide
[javac] ^
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:202: error: cannot find symbol
[javac] this.recreate();
[javac] ^
[javac] symbol: method recreate()
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:271: error: method hasCachedAppHome in class SalesforceWebViewClientHelper cannot be applied to given types;
[javac] if (SalesforceWebViewClientHelper.hasCachedAppHome(this)) {
[javac] ^
[javac] required: Context
[javac] found: SalesforceDroidGapActivity
[javac] reason: actual argument SalesforceDroidGapActivity cannot be converted to Context by method invocation conversion
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:287: error: cannot find symbol
[javac] super.onPause();
[javac] ^
[javac] symbol: variable super
[javac] location: class SalesforceDroidGapActivity
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:288: error: method onPause in class PasscodeManager cannot be applied to given types;
[javac] passcodeManager.onPause(this);
[javac] ^
[javac] required: Activity
[javac] found: SalesforceDroidGapActivity
[javac] reason: actual argument SalesforceDroidGapActivity cannot be converted to Activity by method invocation conversion
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:285: error: method does not override or implement a method from a supertype
[javac] @OverRide
[javac] ^
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:293: error: cannot find symbol
[javac] unregisterReceiver(userSwitchReceiver);
[javac] ^
[javac] symbol: method unregisterReceiver(UserSwitchReceiver)
[javac] location: class SalesforceDroidGapActivity
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:294: error: cannot find symbol
[javac] super.onDestroy();
[javac] ^
[javac] symbol: variable super
[javac] location: class SalesforceDroidGapActivity
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:291: error: method does not override or implement a method from a supertype
[javac] @OverRide
[javac] ^
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:297: error: method does not override or implement a method from a supertype
[javac] @OverRide
[javac] ^
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:318: error: no suitable method found for logout(SalesforceDroidGapActivity)
[javac] SalesforceSDKManager.getInstance().logout(SalesforceDroidGapActivity.this);
[javac] ^
[javac] method SalesforceSDKManager.logout(Account,Activity,boolean) is not applicable
[javac](actual and formal argument lists differ in length)
[javac] method SalesforceSDKManager.logout(Activity,boolean) is not applicable
[javac](actual and formal argument lists differ in length)
[javac] method SalesforceSDKManager.logout(Account,Activity) is not applicable
[javac](actual and formal argument lists differ in length)
[javac] method SalesforceSDKManager.logout(Activity) is not applicable
[javac](actual argument SalesforceDroidGapActivity cannot be converted to Activity by method invocation conversion)
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:312: error: method getRestClient in class ClientManager cannot be applied to given types;
[javac] clientManager.getRestClient(this, new RestClientCallback() {
[javac] ^
[javac] required: Activity,RestClientCallback
[javac] found: SalesforceDroidGapActivity,
[javac] reason: actual argument SalesforceDroidGapActivity cannot be converted to Activity by method invocation conversion
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:383: error: cannot find symbol
[javac] loadUrl(frontDoorUrl);
[javac] ^
[javac] symbol: method loadUrl(String)
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:392: error: no suitable method found for logout(SalesforceDroidGapActivity)
[javac] SalesforceSDKManager.getInstance().logout(SalesforceDroidGapActivity.this);
[javac] ^
[javac] method SalesforceSDKManager.logout(Account,Activity,boolean) is not applicable
[javac](actual and formal argument lists differ in length)
[javac] method SalesforceSDKManager.logout(Activity,boolean) is not applicable
[javac](actual and formal argument lists differ in length)
[javac] method SalesforceSDKManager.logout(Account,Activity) is not applicable
[javac](actual and formal argument lists differ in length)
[javac] method SalesforceSDKManager.logout(Activity) is not applicable
[javac](actual argument SalesforceDroidGapActivity cannot be converted to Activity by method invocation conversion)
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:442: error: cannot find symbol
[javac] loadUrl("file:///android_asset/www/" + startPage);
[javac] ^
[javac] symbol: method loadUrl(String)
[javac] location: class SalesforceDroidGapActivity
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:454: error: cannot find symbol
[javac] loadUrl(url);
[javac] ^
[javac] symbol: method loadUrl(String)
[javac] location: class SalesforceDroidGapActivity
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:487: error: method getAppHomeUrl in class SalesforceWebViewClientHelper cannot be applied to given types;
[javac] String url = SalesforceWebViewClientHelper.getAppHomeUrl(this);
[javac] ^
[javac] required: Context
[javac] found: SalesforceDroidGapActivity
[javac] reason: actual argument SalesforceDroidGapActivity cannot be converted to Context by method invocation conversion
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:488: error: cannot find symbol
[javac] loadUrl(url);
[javac] ^
[javac] symbol: method loadUrl(String)
[javac] location: class SalesforceDroidGapActivity
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceDroidGapActivity.java:499: error: cannot find symbol
[javac] loadUrl("file:///android_asset/www/" + errorPage);
[javac] ^
[javac] symbol: method loadUrl(String)
[javac] location: class SalesforceDroidGapActivity
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/ForcePlugin.java:69: error: cannot find symbol
[javac] Log.i(getClass().getSimpleName() + ".execute", "action: " + action + ", jsVersion: " + jsVersion);
[javac] ^
[javac] symbol: method getClass()
[javac] location: class ForcePlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/ForcePlugin.java:72: error: cannot find symbol
[javac] Log.w(getClass().getSimpleName() + ".execute", "is being called by js from older sdk, jsVersion: " + jsVersion + ", nativeVersion: " + SalesforceSDKManager.SDK_VERSION);
[javac] ^
[javac] symbol: method getClass()
[javac] location: class ForcePlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/ForcePlugin.java:75: error: cannot find symbol
[javac] Log.w(getClass().getSimpleName() + ".execute", "is being called by js from newer sdk, jsVersion: " + jsVersion + ", nativeVersion: " + SalesforceSDKManager.SDK_VERSION);
[javac] ^
[javac] symbol: method getClass()
[javac] location: class ForcePlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/ForcePlugin.java:55: error: method does not override or implement a method from a supertype
[javac] @OverRide
[javac] ^
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/SDKInfoPlugin.java:94: error: cannot find symbol
[javac] callbackContext.success(getSDKInfo(cordova.getActivity()));
[javac] ^
[javac] symbol: variable cordova
[javac] location: class SDKInfoPlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/SFAccountManagerPlugin.java:134: error: cannot find symbol
[javac] SalesforceSDKManager.getInstance().getUserAccountManager().signoutUser(account, cordova.getActivity());
[javac] ^
[javac] symbol: variable cordova
[javac] location: class SFAccountManagerPlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/SalesforceOAuthPlugin.java:83: error: cannot find symbol
[javac](%28SalesforceDroidGapActivity%29 cordova.getActivity%28%29).authenticate(callbackContext);
[javac] ^
[javac] symbol: variable cordova
[javac] location: class SalesforceOAuthPlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/SalesforceOAuthPlugin.java:86: error: cannot find symbol
[javac] PluginResult noop = new PluginResult(PluginResult.Status.NO_RESULT);
[javac] ^
[javac] symbol: class PluginResult
[javac] location: class SalesforceOAuthPlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/SalesforceOAuthPlugin.java:86: error: cannot find symbol
[javac] PluginResult noop = new PluginResult(PluginResult.Status.NO_RESULT);
[javac] ^
[javac] symbol: class PluginResult
[javac] location: class SalesforceOAuthPlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/SalesforceOAuthPlugin.java:86: error: package PluginResult does not exist
[javac] PluginResult noop = new PluginResult(PluginResult.Status.NO_RESULT);
[javac] ^
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/SalesforceOAuthPlugin.java:98: error: cannot find symbol
[javac] JSONObject credentials = ((SalesforceDroidGapActivity) cordova.getActivity()).getJSONCredentials();
[javac] ^
[javac] symbol: variable cordova
[javac] location: class SalesforceOAuthPlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/SalesforceOAuthPlugin.java:114: error: cannot find symbol
[javac] callbackContext.success(SalesforceWebViewClientHelper.getAppHomeUrl(cordova.getActivity()));
[javac] ^
[javac] symbol: variable cordova
[javac] location: class SalesforceOAuthPlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/phonegap/SalesforceOAuthPlugin.java:123: error: cannot find symbol
[javac] SalesforceSDKManager.getInstance().logout(cordova.getActivity());
[javac] ^
[javac] symbol: variable cordova
[javac] location: class SalesforceOAuthPlugin
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceIceCreamWebViewClient.java:70: error: cannot find symbol
[javac] return super.shouldOverrideUrlLoading(view, url);
[javac] ^
[javac] symbol: variable super
[javac] location: class SalesforceIceCreamWebViewClient
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceIceCreamWebViewClient.java:65: error: method does not override or implement a method from a supertype
[javac] @OverRide
[javac] ^
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceIceCreamWebViewClient.java:76: error: method onHomePage in class SalesforceWebViewClientHelper cannot be applied to given types;
[javac] if (!this.foundHomeUrl && SalesforceWebViewClientHelper.onHomePage(ctx, view, url)) {
[javac] ^
[javac] required: Context,WebView,String
[javac] found: SalesforceDroidGapActivity,WebView,String
[javac] reason: actual argument SalesforceDroidGapActivity cannot be converted to Context by method invocation conversion
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceIceCreamWebViewClient.java:80: error: cannot find symbol
[javac] super.onPageFinished(view, url);
[javac] ^
[javac] symbol: variable super
[javac] location: class SalesforceIceCreamWebViewClient
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceIceCreamWebViewClient.java:74: error: method does not override or implement a method from a supertype
[javac] @OverRide
[javac] ^
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceIceCreamWebViewClient.java:85: error: cannot find symbol
[javac] WebResourceResponse response = super.shouldInterceptRequest(view, url);
[javac] ^
[javac] symbol: variable super
[javac] location: class SalesforceIceCreamWebViewClient
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceIceCreamWebViewClient.java:108: error: cannot find symbol
[javac] CordovaResourceApi resourceApi = cordovaWebView.getResourceApi();
[javac] ^
[javac] symbol: class CordovaResourceApi
[javac] location: class SalesforceIceCreamWebViewClient
[javac] /Users/ramesesniblick/Documents/Apps/Test/test/plugins/com.salesforce/src/android/libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/sfhybrid/SalesforceIceCreamWebViewClient.java:109: error: cannot find symbol
[javac] OpenForReadResult result = resourceApi.openForRead(localUri, true);
[javac] ^
[javac] symbol: class OpenForReadResult
[javac] location: class SalesforceIceCreamWebViewClient
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 100 errors

BUILD FAILED
/Users/ramesesniblick/Library/Android/sdk/tools/ant/build.xml:601: The following error occurred while executing this line:
/Users/ramesesniblick/Library/Android/sdk/tools/ant/build.xml:720: The following error occurred while executing this line:
/Users/ramesesniblick/Library/Android/sdk/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.

Total time: 4 seconds

/Users/ramesesniblick/Documents/Apps/Test/test/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: ant with args: debug,-f,/Users/ramesesniblick/Documents/Apps/Test/test/platforms/android/build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
ERROR building one of the platforms: Error: /Users/ramesesniblick/Documents/Apps/Test/test/platforms/android/cordova/build: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: /Users/ramesesniblick/Documents/Apps/Test/test/platforms/android/cordova/build: Command failed with exit code 1
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1008:16)
at Process.ChildProcess._handle.onexit (child_process.js:1080:5)
Bob-Mac:test ramesesniblick$

SyncUp function Not updating Online Records

We are facing issue in Mobile Application Development using Salesforce Hybrid Mobile SDK v4.3, Ionic v2.0.0, Angular.js v1.4.0, Cordova Framework v6.2.0, Cordova iOS v4.2.0 on my Mac-Mini iOS v10.11.6. The issue is being faced in SyncUp function in the Cordova SmartSync Plugin 4.3.0. The plug-in is returning success response with Offline Soup (Cache) properly updated but it is not syncing the record online. It appears either HTTP call to SFDC is not being initiated or getting chopped with unhandled error-reporting. This is because even if we run the call in offline-mode (No LAN/Wi-Fi/4G), then also same success message is received. Any help is highly appreciated. PS - We are not using Backbone Models (OOB) and instead making direct call from Angular Controller layer.

The Success Response:
{"detail":{"status":"DONE","target":{"modificationDateFieldName":"LastModifiedDate","idFieldName":"Id","type":"rest"},"_soupEntryId":1,"isGlobalStore":false,"maxTimeStamp":0,"totalSize":0,"type":"syncUp","progress":100,"options":{"mergeMode":"OVERWRITE"},"soupName":"SampleSyncUpTestSoup”}}

Sample Code:
var sfSmartsync = cordova.require("com.salesforce.plugin.smartsync");
var soupName = "SampleSyncUpTestSoup";
options = {
mergeMode : "Force.MERGE_MODE.OVERWRITE",
attributes: {type:"Contact"}
};
var data = [{
Id: "122324354645",
FirstName: "Robert",
LastName: "Vadra",
email: "[email protected]"
}];
function successCallback(params) {
alert("Sync Up Sucess");
document.addEventListener("sync", function (event) {
console.log(JSON.stringify(event));
}
};
function errorCallback(error) {
alert("Sync Up Error");
console.log(error);
}
sfSmartsync.syncUp(soupName, options, successCallback, errorCallback);

Possible oauth token refresh problem on Android

Hi,
There could be a problem for oauth token refresh in Android SDK.
We have a user that login to app, puts the app in background for about one day and go back to the app again, the app refreshes to the url not found page in salesforce.
Screenshot

The app is a hybrid remote app (loads a visualforce page in salesforce), and it's a single page application built on angular.js and ionic. There is no page redirection in the app logic itself. Could I ask for help to troubleshoot this issue?

Salesforce Error: Can't connect to salesforce: An SSL error has occurred and a secure connection to the server cannot be made.

Recently updated to the latest version of this repo, which also required me to upgrade to cordova-ios 3.9.2. Now when my app launches, I get this:

screenshot_1_14_16__12_04_pm

Salesforce Error: Can't connect to salesforce: An SSL error has occurred and a secure connection to the server cannot be made.

Here's what gets logged to the console:

2016-01-14 12:04:46:434 [16843:986072] ERROR|SFAuthenticationManager|Error during authentication: Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSUnderlyingError=0x7fd724824260 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSErrorFailingURLStringKey=https://login.salesforce.com/services/oauth2/authorize?client_id=3MVG9sG9Z3Q1RlbeZI3EPvHBxPyFYtDPCOCgRy_M0Lv97LQ5qU6R8Yz7Sd688MIZ35QmVHADL76MNVZvLoeY0&redirect_uri=http://localhost:8100/oauthcallback.html&display=touch&response_type=token&scope=full%20refresh_token, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFNetworkCFStreamSSLErrorOriginalValue=-9824, _kCFStreamPropertySSLClientCertificateState=0, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., _kCFStreamErrorDomainKey=3, NSErrorFailingURLKey=https://login.salesforce.com/services/oauth2/authorize?client_id=3MVG9sG9Z3Q1RlbeZI3EPvHBxPyFYtDPCOCgRy_M0Lv97LQ5qU6R8Yz7Sd688MIZ35QmVHADL76MNVZvLoeY0&redirect_uri=http://localhost:8100/oauthcallback.html&display=touch&response_type=token&scope=full%20refresh_token, _kCFStreamErrorCodeKey=-9824}}, NSErrorFailingURLStringKey=https://login.salesforce.com/services/oauth2/authorize?client_id=3MVG9sG9Z3Q1RlbeZI3EPvHBxPyFYtDPCOCgRy_M0Lv97LQ5qU6R8Yz7Sd688MIZ35QmVHADL76MNVZvLoeY0&redirect_uri=http://localhost:8100/oauthcallback.html&display=touch&response_type=token&scope=full%20refresh_token, NSErrorFailingURLKey=https://login.salesforce.com/services/oauth2/authorize?client_id=3MVG9sG9Z3Q1RlbeZI3EPvHBxPyFYtDPCOCgRy_M0Lv97LQ5qU6R8Yz7Sd688MIZ35QmVHADL76MNVZvLoeY0&redirect_uri=http://localhost:8100/oauthcallback.html&display=touch&response_type=token&scope=full%20refresh_token, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made.}

Any idea what's going on here? The cordova whitelist plugin still doesn't even apply to iOS, so I don't think the connection is being blocked. I can open safari on the device and navigate to https://login.salesforce.com without issue.

ERROR|SFHybridViewController|Error while attempting to load web page: Error Domain=NSURLErrorDomain Code=-999 "(null)"

Has anyone seen this?

Everyday, first time when I launch the app that uses SFMobile SDK-CordovaPlugin (ver 4.0), I always see the following error and the app gets stuck at a white screen. It is resolved by pressing home button twice, swiping up to close the app, and re-launching it. wondering if anyone can shed some light on it.

2016-01-13 09:34:46:607 appName[617:245409] ERROR|SFHybridViewController|Error while attempting to load web page: Error Domain=NSURLErrorDomain Code=-999 "(null)" UserInfo={NSErrorFailingURLStringKey=https://xyz.cs5.my.salesforce.com/visualforce/session?url=/apexpages/utils/ping.apexp&autoPrefixVFDomain=true, NSErrorFailingURLKey=https://pasonamypage--p2t2.cs5.my.salesforce.com/visualforce/session?url=/apexpages/utils/ping.apexp&autoPrefixVFDomain=true}

Cannot enable Login using a Custom Domain Login Screen

I have a Connected App in Salesforce for which I am creating a Cordova Hybrid App. I want to show a custom branded login page for which I have created a Custom Domain and changed background colour and logo for it.

I was finding it very difficult in the iOS & Android projects to describe the initial login URL. I tried setting it in the ForceJS and even in Cordova plugin but was unable to do so. I finally posted this problem on Google+ & Kevin Hawkins suggested that in iOS there is a hidden plist property that needs to be added.

I added that property and it started working fine for iOS but still I cannot sign in using any user credentials which does not belong to the salesforce org on which the connected app exists. My app is intended to be used by users from other orgs also.

Gradle files modify after adding SalesforceMobileSDK plugin in Cordova project

Hi,

I am using Mobile SDK version 4.1.2 and cordova 6.2.0. I wish to add android platform and use a cordova plugin cordova.plugins.diagnostic . Now I run following command

cordova platform add [email protected]
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms/android
Package: com.example.myapp
Name: MyApp
Activity: MainActivity
Android target: android-23
Android project created with [email protected]

Installing "com.salesforce" for android
Installing "cordova-plugin-whitelist" for android

This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do not need this plugin since the whitelist will be built in.

Installing "cordova-plugin-device" for android
Installing "phonegap-plugin-push" for android
Running SalesforceMobileSDK plugin android post-install script
Moving Salesforce libraries to the correct location
Fixing Gradle dependency paths in Salesforce libraries
Fixing root level Gradle file for the generated app
include ":SalesforceSDK"

include ":SmartStore"

include ":SmartSync"

include ":SalesforceHybrid"

Moving Gradle wrapper files to application directory
Fixing application build.gradle
allprojects {
repositories {
mavenCentral()
}
}
Done running SalesforceMobileSDK plugin android post-install script

Plugin "cordova-plugin-device" already installed on android. Making it top-level.
Installing "cordova-plugin-inappbrowser" for android

Dependent plugin "cordova-plugin-whitelist" already installed on android.
Installing "cordova.plugins.diagnostic" for android
Dependent plugin "phonegap-plugin-push" already installed on android.

Fixing AndroidManifest.xml file for Salesforce SDK Plugin.
Fixed AndroidManifest.xml

The command prompt output says that it changed build.gradle and settings.gradle file. But when I open the project in Android Studio , settings.gradle is reset to original version

include ":"

include ":CordovaLib"

Moreover, the line
compile project(':SalesforceHybrid')

is also removed later from build.gradle file.

This issue arises when I try to add one more plugin other than MobileSDK plugin.
Why does this issue arise, even if the script ran succesfully to modify settings.gradle and build.gradle ?
Is there any fix to avoid resetting of build.gradle and settings.gradle file to avoid modifications?

cordova build failed

While running ---> cordova build

C:\Users\kvp\AppData\Local\Android\sdk\tools\ant\build.xml:573: ../../external/c
ordova/framework resolve to a path with no project.properties file for project

D:\Hybrid\pro7\contactsApp\plugins\com.salesforce\src\android\libs\SalesforceSDK

Here is my versions details

D:\Hybrid\pro7\contactsApp>ant -v
Apache Ant(TM) version 1.9.6 compiled on June 29 2015
Trying the default build file: build.xml
Buildfile: build.xml does not exist!
Build failed

D:\Hybrid\pro7\contactsApp>java -version
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)

D:\Hybrid\pro7\contactsApp>node -v
v0.12.7

D:\Hybrid\pro7\contactsApp>cordova -v
4.3.0

OAuth issue when using multiple apps on the same device

Hi,

We have one OAuth issue when using multiple mobile sdk apps on the same device.

Test apps & environment:

  • Apps are using Mobile SDK cordova plugin 4.1.1.
  • The file bootconfig.json - isLocal is true.
  • App1 and App2 link to different connected apps configured in different orgs. And using different users to login as well.
  • Tested on iPhone 6s iOS 9.3 simulator.

Reproduce steps:

  1. Install and login App1 successfully.
  2. Install and login App2 successfully.
  3. Quit App1 completely and re-open it. Then the oauth login is requested again with the following error. However, the access token is not revoked because the user is still listed in Connected App User's Usage page.

2016-05-11 16:18:33:588 App1[13854:2338042] ERROR|SFUserAccountManager|Error deserializing the user account data: Error Domain=SFUserAccountManager Code=10002 "User account data could not be decrypted. Can't load account." UserInfo={NSLocalizedDescription=User account data could not be decrypted. Can't load account.}
2016-05-11 16:18:33:659 App1[13854:2338042] INFO|SalesforceSDKManagerWithSmartStore|Launching the Salesforce SDK.
2016-05-11 16:18:33:662 App1[13854:2338042] INFO|SFSecurityLockout|Skipping 'lock' since not authenticated
2016-05-11 16:18:33:662 App1[13854:2338042] INFO|SalesforceSDKManagerWithSmartStore|Passcode verified, or not configured. Proceeding with authentication validation.
2016-05-11 16:18:33:663 App1[13854:2338042] INFO|SalesforceSDKManagerWithSmartStore|No valid credentials found. Proceeding with authentication.
2016-05-11 16:18:33:663 App1[13854:2338042] INFO|SFAuthenticationManager|No current user account, so creating a new one.

4, App1 does not start properly if login again. It seems there are SmartStore errors as well.

2016-05-11 16:19:17:385 App1[13854:2338042] ERROR|SF_FMDatabase|DB Error: 26 "file is encrypted or is not a database"
2016-05-11 16:19:17:457 App1[13854:2338042] ERROR|SF_FMDatabase|DB Error: 26 "file is encrypted or is not a database"
2016-05-11 16:19:17:458 App1[13854:2338042] ERROR|SFSmartStore|Error opening store 'defaultStore': out of memory
2016-05-11 16:19:17:463 App1[13854:2338042] ERROR|SF_FMDatabase|DB Error: 26 "file is encrypted or is not a database"
2016-05-11 16:19:17:529 App1[13854:2338042] ERROR|SF_FMDatabase|DB Error: 26 "file is encrypted or is not a database"
2016-05-11 16:19:17:529 App1[13854:2338042] ERROR|SFSmartStore|Error opening store 'defaultStore': out of memory
2016-05-11 16:19:17:536 App1[13854:2338583] ERROR|SF_FMDatabase|DB Error: 26 "file is encrypted or is not a database"
2016-05-11 16:19:17:603 App1[13854:2338583] ERROR|SF_FMDatabase|DB Error: 26 "file is encrypted or is not a database"
2016-05-11 16:19:17:603 App1[13854:2338583] ERROR|SFSmartStore|Error opening store 'defaultStore': out of memory

Thanks.

App goes blank on pause event

Using this plugin in a cordova (or ionic) iOS app is causing the app to go blank when ever there is a pause (resign) event (i.e. sliding the control center, sidebar on an iPad, clicking the home button, etc.) as show in the image.
img_0183.

It happens with a brand new app with just the salesforce plugin in it.

Is this an expected behaviour? If so, is this configurable?

Callback called only once when using SmartSync syncDown/syncUp plugin method

When I use the following code:

cordova.require("com.salesforce.plugin.smartsync").syncDown(target, this.soupName, {mergeMode:sync.MERGE_MODE_DOWNLOAD.OVERWRITE}, handleSyncUpdate.bind(this));

The callback is called only once. Is the keep callback flag of Cordova Plugin being set for this method?

Thank you

Server changes after logging out from application in Android

Hi,
In my cordova project, I added the Salesforce MobileSDK plugin for Android platform.
While running my application, if I log into the app from Sandbox org, and then logout, the server changes to Production instead of Sandbox. I faced the issue only on Android platform, it works just as expected on iOS. Is this some configuration issue ? Please help.

Error building project on Android platform

I did exactly everything as stated in README file and can't manage to run project properly.
I m sure my environment is setup correctly as all of following commands work: android, cordova, ionic, java.
The same occur when i start with this template: https://github.com/driftyco/ionic-starter-salesforce

Error:
C:\workspace\testApp>cordova build android
Running command: "C:\Program Files\nodejs\node.exe" C:\workspace\testApp\hooks\after_prepare\010_add_platform_class.js C:\workspace\testApp
add to body class: platform-android
Running command: cmd "/s /c "C:\workspace\testApp\platforms\android\cordova\build.bat""
ANDROID_HOME=C:\AndroidSDK
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_25
Running: C:\workspace\testApp\platforms\android\gradlew cdvBuildDebug -b C:\workspace\testApp\platforms\android\build.gradle -Dorg.gradle.daemon=true

FAILURE: Build failed with an exception.

  • Where:
    Settings file 'C:\workspace\testApp\platforms\android\settings.gradle' line: 4

  • What went wrong:
    A problem occurred evaluating settings 'android'.

    A path must be specified!

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1.232 secs

C:\workspace\testApp\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s /c "C:\workspace\testApp\platforms\android\gradlew cdvBuildDebug -b C:\workspace\testApp\platforms\android\build.gradle -Dorg.gradle.daemon=true"
ERROR building one of the platforms: Error: cmd: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 1
at ChildProcess.whenDone (C:\Users\Wojtek Słodziak\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:134:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

Smartstore doesn't work on Galaxy S6 (64-bit) ?

Hi friends,

It seems the Smartstore plugin (Mobile SDK 4.0.0) doesn't work on my Galaxy S6 (Android 5.1.1). All work well if I don't use Smartstore. The error message is

java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.oinio.linde.accura-2/base.apk"],nativeLibraryDirectories=[/data/app/com.oinio.linde.accura-2/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libstlport_shared.so"
at java.lang.Runtime.loadLibrary(Runtime.java:366)
at java.lang.System.loadLibrary(System.java:988)
at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:173)
at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:169)
at com.salesforce.androidsdk.smartstore.store.DBOpenHelper.(DBOpenHelper.java:132)
at com.salesforce.androidsdk.smartstore.store.DBOpenHelper.getOpenHelper(DBOpenHelper.java:124)
at com.salesforce.androidsdk.smartstore.app.SmartStoreSDKManager.getGlobalSmartStore(SmartStoreSDKManager.java:202)
at com.salesforce.androidsdk.smartstore.app.SmartStoreSDKManager.getGlobalSmartStore(SmartStoreSDKManager.java:184)
at com.salesforce.androidsdk.phonegap.plugin.SmartStorePlugin.getSmartStore(SmartStorePlugin.java:577)
at com.salesforce.androidsdk.phonegap.plugin.SmartStorePlugin.soupExists(SmartStorePlugin.java:306)
at com.salesforce.androidsdk.phonegap.plugin.SmartStorePlugin.access$1400(SmartStorePlugin.java:58)
at com.salesforce.androidsdk.phonegap.plugin.SmartStorePlugin$1.run(SmartStorePlugin.java:160)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)

Could anyone help to let me know how to solve this problem? Really appreciate it.

Best Regards,
Lingjun

BUILD FAILED: Exit code 1

We're trying to get this working at the minute and have followed the instructions here. Everything works fine until we get to the line:

cordova plugin add https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin

At which point we get the following error:

BUILD FAILED
C:\Users\<USER>\AppData\Local\Android\android-sdk\tools\ant\build.xml:577: ../../external/cordova/framework resolve to a path with n
o project.properties file for project C:\DATA\WIP\REPOS\Test\contact-force\plugins\com.salesforce\src\android\libs\SalesforceSDK

Total time: 0 seconds

C:\DATA\WIP\REPOS\Test\contact-force\platforms\android\cordova\node_modules\q\q.js:126
                    throw e;
                            ^
Error code 1 for command: cmd with args: /s /c "ant debug -f C:\DATA\WIP\REPOS\Test\contact-force\platforms\android\build.xml -Dout.dir=ant
-build -Dgen.absolute.dir=ant-gen"
ERROR building one of the platforms: Error: C:\DATA\WIP\REPOS\Test\contact-force\platforms\android\cordova\build.bat: Command failed with e
xit code 1
You may not have the required environment or OS to build this project
Error: C:\DATA\WIP\REPOS\Test\contact-force\platforms\android\cordova\build.bat: Command failed with exit code 1
    at ChildProcess.whenDone (C:\Users\<USER>\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspa
wn.js:131:23)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1008:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1080:5)

Apologies for using the Royal "we" it's just that my colleague is doing exactly the same and having the same issues. We trying to develop a hybrid Android Application and of course are adapting the instructions for use android rather than ios. We've got ant and the android sdk installed correctly as when we run cordova build after each step everything works fine, it's only after adding the SalesforceMobileSDK-CordovaPlugin that we get build errors.

We get the same errors when following the instructions in the PDF as well.

Freezing dependency version

As we were developing our application with the SalesforceMobileSDK-CordovaPlugin, we ran into an issue. Our application worked fine up until a week ago, when it started crashing whenever the app was started a second time (e.g. kill the app, open it up again) on iOS. I discovered that this was tied to an update that was pushed to the phonegap-push-plugin, that got automatically updated as the Salesforce plugin does not specify a version of the plugin to use. In order to reduce the dependency on these issues and ensure that the SDK plugin works consistently, I suggest you freeze the version of the dependencies and ensure that these are well tested.

Custom login host not listed in login hosts settings

I have a problem with the custom login host in my hybrid app on iOS. In my plist file I've defined a custom login host

<key>SFDCOAuthLoginHost</key>
<string>mycustomhost.my.salesforce.com</string>

Behaviour in unstable branch 4.2.0
If I install and start the app for the first time, the correct login of my custom host is show. If I now click on the settings icon to open the host choose connection setting without selecting e.g. the Production server, just open the the settings view, the app crashes with this stacktrace

May 13 12:17:29 localhost [71518]: INFO|SFAuthenticationManager|Cancel authentication called.  App is currently authenticating.
May 13 12:17:29 localhost [71518]: INFO|SFSecurityLockout|App requested passcode screen cancel.  Screen is not displayed.
May 13 12:17:30 localhost [71518]: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present modally an active controller <UINavigationController: 0x795f6000>.'
    *** First throw call stack:
    (
        0   CoreFoundation                      0x00928494 __exceptionPreprocess + 180
        1   libobjc.A.dylib                     0x04527e02 objc_exception_throw + 50
        2   UIKit                               0x00ea6385 -[UIViewController _presentViewController:withAnimationController:completion:] + 5682
        3   UIKit                               0x00ea946f __62-[UIViewController presentViewController:animated:completion:]_block_invoke_2 + 88
        4   UIKit                               0x00d84db2 +[UIView(Animation) performWithoutAnimation:] + 82
        5   UIKit                               0x00d84dfb +[UIView(Animation) _performWithoutAnimation:] + 40
        6   UIKit                               0x00ea9379 __62-[UIViewController presentViewController:animated:completion:]_block_invoke + 247
        7   UIKit                               0x00ea9768 __65-[UIViewController _performCoordinatedPresentOrDismiss:animated:]_block_invoke + 18
        8   UIKit                               0x0183a2d2 -[_UIViewControllerTransitionCoordinator _applyBlocks:releaseBlocks:] + 292
        9   UIKit                               0x01835f86 -[_UIViewControllerTransitionContext _runAlongsideCompletions] + 147
        10  UIKit                               0x01835c71 -[_UIViewControllerTransitionContext completeTransition:] + 136
        11  UIKit                               0x01860b34 -[UIViewControllerBuiltinTransitionViewAnimator transitionViewDidComplete:fromView:toView:removeFromView:] + 74
        12  UIKit                               0x00e5848a -[UITransitionView notifyDidCompleteTransition:] + 280
        13  UIKit                               0x00e58176 -[UITransitionView _didCompleteTransition:] + 1550
        14  UIKit                               0x00e5adb1 -[UITransitionView _transitionDidStop:finished:] + 121
        15  UIKit                               0x00d5f08f -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 247
        16  UIKit                               0x00d5f485 -[UIViewAnimationState animationDidStop:finished:] + 90
        17  QuartzCore                          0x03a7368b _ZN2CA5Layer23run_animation_callbacksEPv + 305
        18  libdispatch.dylib                   0x04e866ed _dispatch_client_callout + 14
        19  libdispatch.dylib                   0x04e6f286 _dispatch_main_queue_callback_4CF + 689
        20  CoreFoundation                      0x008721be __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 14
        21  CoreFoundation                      0x00830434 __CFRunLoopRun + 2356
        22  CoreFoundation                      0x0082f846 CFRunLoopRunSpecific + 470
        23  CoreFoundation                      0x0082f65b CFRunLoopRunInMode + 123
        24  GraphicsServices                    0x05e58664 GSEventRunModal + 192
        25  GraphicsServices                    0x05e584a1 GSEventRun + 104
        26  UIKit                               0x00cc0eb9 UIApplicationMain + 160
        27  Conference                          0x000d4d19 main + 89
        28  libdyld.dylib                       0x04eaba25 start + 1
    )
May 13 12:17:30 localhost SpringBoard[70843]: HW kbd: Failed to set (null) as keyboard focus

After restart the app, the Production Server is selected and I have no chance to select my custom login host because the host is not listed in the server selection

Behaviour in v4.1.2
If I install and start the app for the first time, the correct login of my custom host is show. If I now click on the settings icon to open the host choose connection setting without selecting e.g. the Production server, just open the the settings view, the selection view is closed and the Production server is selected. Than I have no chance to select my custom login host again because the host is not listed in the server selection

My environment:

  • Cordova 6.1.1
  • Platform iOS 3.9.2
  • SalesforceMobileSDK-Cordova Plugin 4.1.2 or 4.2.0

is it possible to use .java files in nativescript ?

Hello,

I am wondering if is it possible to design application UI using Angular JS and business logic using android with nativescript ? I mean can I dump all java files as it is like my native android and just build UI using nativescript/javascript ?
If it is possible which IDE I should use ? Is it possible using android studio?
On the other hand can a simple nativescript app be built using Android studio/Eclipse ?
Please reply.

Smartstore issue with Mobile SDK 4.3 with Android platform

Dear friends,

I upgrade my apps to Mobile SDK 4.3, all works fine in iOS. However, I have now Smartstore issues in Android.

The apps work fine in Android if not using Smartstore. When using Smartstore, I got the following error messages in the console.

08-23 18:14:08.431 5800-9476/com.xx.xx.xx W/SmartStorePlugin.execute: get field slot from row 0 col 0 failed
java.lang.IllegalStateException: get field slot from row 0 col 0 failed
at net.sqlcipher.CursorWindow.getString_native(Native Method)
at net.sqlcipher.CursorWindow.getString(CursorWindow.java:385)
at net.sqlcipher.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:51)
at android.database.CursorWrapper.getString(CursorWrapper.java:137)
at com.salesforce.androidsdk.smartstore.store.SmartStore.query(SmartStore.java:798)
at com.salesforce.androidsdk.smartstore.store.StoreCursor.getData(StoreCursor.java:94)
at com.salesforce.androidsdk.phonegap.plugin.SmartStorePlugin.runQuery(SmartStorePlugin.java:437)
at com.salesforce.androidsdk.phonegap.plugin.SmartStorePlugin.querySoup(SmartStorePlugin.java:400)
at com.salesforce.androidsdk.phonegap.plugin.SmartStorePlugin.access$700(SmartStorePlugin.java:59)
at com.salesforce.androidsdk.phonegap.plugin.SmartStorePlugin$1.run(SmartStorePlugin.java:144)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
08-23 18:14:08.431 5800-9476/com.xx.xx.xx D/SmartSTorePlugin.execute: Total time for pgQuerySoup->229
08-23 18:14:08.441 5800-5800/com.xx.xx.xx I/chromium: [INFO:CONSOLE(43)] "TIMING com.salesforce.smartstore:pgQuerySoup failed", source: file:///android_asset/www/plugins/com.salesforce/www/com.salesforce.util.exec.js (43)

I found the Sqlite is upgraded to 3.5.2 in SDK 4.3 where it was 3.4 in SDK 4.2, will this introduced the problem? And I'm also not sure if I'm the only one having this problem. My device is Samsung Galaxy S5, Android 6.0.1.

Thanks for any reply.

Bootstrap Error when starting call/sms/email from app (iOS)

Error code: 1

Error description: CDVWebViewDelegate: Navigation started when state=1

Error context: AppLoading

When starting a call from the application with either window.open('tel:123456') or even href='tel:123456' this error occurs on second method call. So for the first call everything is ok, but when the second call is started, the application shows that error.

Same applies to sms and mailto links

Display Salesforce login screen after certain screen in Hybrid Mobile app

Hi,

I am developing an ionic hybrid mobile app. Currently app displays Salesforce login screen (sandbox / production) after splash screen. Is there a way to display salesforce login screen after showing app introduction screen for e.g. Splash screen --> Introduction screen --> Salesforce login screen --> dashboard screen?

Thanks and regards,
Pravin

OAuth command does nothing when running on android

We're working on trying to get a mobile app up and running with the mobile SDK. I've tried re-setting up the app about 20 times at this point, but I've never seemed to be able to get this fully working.

I was finally able to get a project with the cordova plugin working and able to compile to my android phone, but when it gets to the point where it runs the oauthPlugin.getAuthCredentials function, nothing happens. It doesn't bring up the salesforce login, it doesn't error, it just does nothing...

I've tried getting this set up in ionic projects, straight up cordova projects, forcedroid hybrid projects, but haven't had any luck with any of them. I'm hoping that I'm just missing some setup step to get this to work on a phone. I'd really like to get it working with this plugin so we don't need to resort to developing two separate apps for android and ios. Let me know if there's any additional info that would help (versions, etc.)

Using this plugin as Phonegap Build Plugin

Hey Saleforce-Community and Cordova-plugin-developer

do you would like to contribute the Cordova-Plugin to npm so that I can use this in Phonegap Build? I am seeing no way to user this plugin in Phonegap Build.

Do you have any recommendations?

java.lang.ClassNotFoundException: Didn't find class "com.salesforce.androidsdk.smartsync.app.HybridAppWithSmartSync"

I'm working with local cloned repos (current) and when trying to do any MobileSDK applications, including the TestApp simplest sample, I get the error

java.lang.ClassNotFoundException: Didn't find class "com.salesforce.androidsdk.smartsync.app.HybridAppWithSmartSync"

And the application fails to start

e.g.

cordova create TestApp
cd TestApp
cordova plugin add https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin
cordova platform add android
cordova prepare
cordova emulate

This error occurs

Any ideas?

Plugin not working

Create a project using the steps in readme.
Running using:

cordova run --debug android

I get the exception:

java.lang.ClassNotFoundException: com.salesforce.androidsdk.phonegap.plugin.SalesforceOAuthPlugin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.