Ionic2 & salesforce mobile sdk plugin


#1

hi guys,
did any of you succeeded in impl ionic2 (3.0.0) & SalesforceMobileSDK plugin?? i just want the OAuth2 flow (login screen etc…).
i saw this tutorial http://coenraets.org/blog/2016/12/sample-application-with-ionic-2-and-salesforce/ which is the only one out there in WildWildWest but it’s not working and trying to install the plugin causes conflicts.


#2

So tell us what is “not working” and what “conflicts” it causes. Maybe we can help.


#3

after adding the plugin (no ionic native impl) via: cordova plugin add https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin

i got this build error :

and when i’m forcing the installation using --force i can’t build an apk


#4

What does it change in config.xml if you --force?
This doesn’t really seem to be caused by Ionic though. Did you look at the Github issues of the plugin?
Does this also happen if you start a “blank” project with Ionic and only add this plugin?


#5

That is the typical Salesforce Mobile SDK behaviour :wink:

Best praxis:

  • install ios or android platform
  • install the salesforce sdk (always with force)
  • the apk you can only build via Android Studio

Android studio: You have to import via Gradle and accept all updates.

Then it will work.