Git Product home page Git Product logo

Comments (9)

NanostuffsTech avatar NanostuffsTech commented on June 6, 2024

So basically I don't want to use any API rather I want to open URL to show content. Let me know if that's possible and how?

from swiftlysalesforce.

mike4aday avatar mike4aday commented on June 6, 2024

Hi @NanostuffsTech - not sure I understand what you're trying to do, but it sounds like you are building a web app, not a native iOS app. Is that correct? If so, then it would be better to build your app within Salesforce1. Can you share more details?

from swiftlysalesforce.

mike4aday avatar mike4aday commented on June 6, 2024

@NanostuffsTech maybe this will help: you can use the "front door" URL (in some cases) to pass a session ID to a web view: https://help.salesforce.com/articleView?id=000193348&language=en_US&type=1

from swiftlysalesforce.

NanostuffsTech avatar NanostuffsTech commented on June 6, 2024

Not really, it's native application only. What I'm trying to do is, login to Salesforce using Swiftly Salesforce and then show my own URL of chatter field which we can goto after logging in. But right now what is happening, it's allowing me to login through Safari but when I open my own web view in my controller, it shows me again login page when I try to open chatter field.

So what I want is my web view should use same session as of safari. So that other URL which I'm opening wont take me to login page but will directly open chatter field page. Let meknow if you need any more clarificaiton.

from swiftlysalesforce.

mike4aday avatar mike4aday commented on June 6, 2024

Hi @NanostuffsTech: I don't understand what you mean by "open a Chatter field" - but I believe I understand the larger question, i.e. how to pass a session ID to a web view that's loading a protected Salesforce URL. Is that correct? If so, then this might work:

  • Authenticate user via Swiftly Salesforce - once authenticated, you can access the current session ID at salesforce.authManager.authData?.accessToken

  • Redirect the user to your app (don't forget to register the redirect URL's scheme with iOS)

  • Use the session ID with the Salesforce 'front door' URL to load your web view -- note that the web view will have to follow redirects and store the session cookie provided by Salesforce

Does this help? Can you share the URL you're trying to load in the web view?

from swiftlysalesforce.

NanostuffsTech avatar NanostuffsTech commented on June 6, 2024

from swiftlysalesforce.

mike4aday avatar mike4aday commented on June 6, 2024

@NanostuffsTech try using the access token as session ID with the 'front door' URL per my earlier post.

from swiftlysalesforce.

TrupK avatar TrupK commented on June 6, 2024

Hello,
I have tried with 'front door' by using access token. But it's still not working for me. Any other solustion? Acutually whenever I'm trying to access TaskStore.shared.cache, I'm getting this nil. I'm not getting where and why this gets set to nil. Will this impact while calling url?

Thanks.

from swiftlysalesforce.

mike4aday avatar mike4aday commented on June 6, 2024

Hi @TrupK - in what way is it not working?

Here's a related post: http://salesforce.stackexchange.com/questions/50368/how-to-integrate-salesforce-page-to-native-ios-app

And note also that your connected app has to allow web scope to enable web page access: https://help.salesforce.com/articleView?id=remoteaccess_oauth_scopes.htm&type=0

from swiftlysalesforce.

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.