Comments (9)
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.
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.
@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.
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.
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.
from swiftlysalesforce.
@NanostuffsTech try using the access token as session ID with the 'front door' URL per my earlier post.
from swiftlysalesforce.
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.
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)
- Composite resources support HOT 2
- MyRecords() func assumes object has 'ownerId' column HOT 8
- Login migration path for Swift Apps HOT 6
- Support for Anonymous Apex? HOT 7
- Error in fields array: Protocol 'Encodable' as a type cannot conform to the protocol itself HOT 7
- salesforce.search() replacement? in 9.0 HOT 2
- 'group by' count() soql fails in 9.0 HOT 26
- WebAuthenticator.swift:50:30: 'shared' is unavailable in application extensions for iOS HOT 1
- keyNotFound "id" error on simple query HOT 7
- Query with date predicate fail HOT 8
- Minor doc bug HOT 1
- Is there another way to perform salesforce.nextResultPage in V10? HOT 6
- Update links in README.md so they point to latest code version
- Adding SwiftlySalesforce to new project adds V8.0 (master) HOT 4
- Add ability to save files to SFDC & share via Chatter/Slack
- Implementation in ipad Swift Playground. AuthenticationError HOT 3
- README OATH screenshot needs refresh HOT 1
- Unable to use a custom domain to log in HOT 1
- Remove cancel button login HOT 5
- Support for <upsert>
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swiftlysalesforce.