Code Monkey home page Code Monkey logo

Comments (8)

huminzhi avatar huminzhi commented on August 10, 2024

Hi @dkaskoun , may we know the SDK version you are using?
I have tried forcedroid create hybrid app, it builds and runs ok.
Did you update bootconfig.json with current info?

from salesforcemobilesdk-cordovaplugin.

dkaskoun avatar dkaskoun commented on August 10, 2024

I've been trying with the lastest from this repo, including the build that just happened yesterday.

We finally got it to compile to ios after upgrading xcode, though, and it works fine there...

I didn't update bootconfig, but it should default to a test connected app, right? I haven't needed to update that for browser/ios compiling.

Just occurred to me you might be asking about android SDK version. I have 5.0 and 5.1 (API versions 21 and 22) installed because my phone is running 5.1 I believe.

from salesforcemobilesdk-cordovaplugin.

huminzhi avatar huminzhi commented on August 10, 2024

@dkaskoun so you did 'cordova platform add [email protected]' then 'cordova prepare', and you are seeing the issue oauthPlugin.getAuthCredentials do nothing?

from salesforcemobilesdk-cordovaplugin.

sevem avatar sevem commented on August 10, 2024

@dkaskoun I guess you are using Android Studio? How many projects do you have in your workspace? In some cases the Android project is not created correctly. If you see your project and some Salesforce SDK projects in your Android Studio project everything should be fine. If not, you have a problem with installing your SalesforceMobileSDK-Cordova Android plugin. There is a postinstall script which initializes your android project correctly. If you have an error here your android project does not work (e.g. wrong android platform version). And then you got the oauthplugin error because of missing project references

from salesforcemobilesdk-cordovaplugin.

dkaskoun avatar dkaskoun commented on August 10, 2024

I did run the platform command to set it to 5.0.0, and did do a prepare.

As for Android studio, I don't really have anything in my workspace, I specifically downloaded it for this. Far as I could tell, the Android Studio project was created correctly. I was able to open it, and the compile/run seemed to work.

Unfortunately, I don't know that I'll have a lot of time to test this again soon. Since we were able to get it to run fine on ios, which is the more important one for us at this point, we're going to mainly move forward with that, but I will try to find some time to give this another shot at some point.

from salesforcemobilesdk-cordovaplugin.

sevem avatar sevem commented on August 10, 2024

@dkaskoun these are my steps to setup an android project

  1. remove android platform if already added
    cordova platform rm android
  2. remove the Modile SDK plugin
    cordova plugin rm com.salesforce
  3. install the PushPlugin manually
    cordova plugin add https://github.com/phonegap/phonegap-plugin-push --variable SENDER_ID='your.app.id'
  4. add the platform android
    cordova platform add [email protected]
  5. set ANDROID_HOME
export ANDROID_HOME=/<installation location>/sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
  1. ensure that the correct shelljs version is installed
    npm install [email protected]
  2. add the Mobile SDK plugin
    cordova plugin add https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin
  3. open the Android project in Android studio
  4. keep a look on the console and upgrade gradle if necessary

from salesforcemobilesdk-cordovaplugin.

huminzhi avatar huminzhi commented on August 10, 2024

@sevem Thank you for your help on this thread. @dkaskoun Are you unblocked by @sevem 's suggestion?

from salesforcemobilesdk-cordovaplugin.

dkaskoun avatar dkaskoun commented on August 10, 2024

I'm sorry, I haven't had a chance to retest this yet on Android. I'm trying to get at least the ios version wrapped up by the end of this week, so I may have a chance to try again next week.

from salesforcemobilesdk-cordovaplugin.

Related Issues (20)

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.