Comments (15)
I've not seen this myself. What version of Xcode are you using?
from dctauth.
Morning,
I'm running 10.8.2 with Xcode 4.5.2, up to date but not beta.
It may be just that I'm not including the library correctly.
Do I just add the DCTAuth folder to my project? I'm a little hazy on the correct method perhaps?
Rob
from dctauth.
Hi Rob,
I think that should work, but it's not advisable. The best way to include it is as a subproject as such:
- Drag the DCTAuth Xcode project into your file list in your application project
- Go to your app Xcode project in the files and go to the build phases tab for your app target
- Add DCTAuth to the "Link Binary with Libraries" section (by clicking the + button)
- You also need to add the following system libraries: Security.framework, libresolv.dylib
Details of a lot of this can be found here: http://www.blog.montgomerie.net/easy-xcode-static-library-subprojects-and-submodules
Hope this helps,
Daniel
from dctauth.
Awesome, thanks, will try and let you know.
from dctauth.
OK, followed the instructions on the link, exceelent btw. Project is included.
When I call
[oauthAccount authenticateWithHandler:^(NSDictionary *responses, NSError *error) { }];
I get the following:
2013-01-18 09:48:51.412 Spearmint[33659:c07] -[NSURL dctAuth_URLByAddingQueryParameters:]: unrecognized selector sent to instance 0xae7ce30
2013-01-18 09:48:51.425 Spearmint[33659:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSURL dctAuth_URLByAddingQueryParameters:]: unrecognized selector sent to instance 0xae7ce30'
*** First throw call stack:
(0x2522012 0x17a1e7e 0x25ad4bd 0x2511bbc 0x251194e 0x15982 0x1582a 0x162cf 0x16442 0x1bc91 0x1b248 0x89ff 0x17b5705 0x240920 0x2408b8 0x301671 0x301bcf 0x300d38 0x27033f 0x270552 0x24e3aa 0x23fcf8 0x2f57df9 0x2f57ad0 0x2497bf5 0x2497962 0x24c8bb6 0x24c7f44 0x24c7e1b 0x2f567e3 0x2f56668 0x23d65c 0x25ed 0x2525)
libc++abi.dylib: terminate called throwing an exception
Any thoughts?
from dctauth.
Ah yeah, you'll need to add -ObjC
to the Other Linker Flags in the build settings of your project. This will bring in the categories I've added in DCTAuth. :)
from dctauth.
Yep that fixed it, top man.
OK, off to play with OAuth...
from dctauth.
Have fun!
What service are you accessing by the way?
from dctauth.
It's under NDA, an internal system for a client.
Question: It's popping out to the browser for the sign in, but it's not returning to the app once auth'd. I can;t see anything different to the demo app in my code. Am I missing setting a callback somewhere?
from dctauth.
OK, cool! :)
You need to set the callbackURL
on the account and this should match your URL scheme for the app that you can see in the plist.
from dctauth.
It might also be worth noting that you can use +[DCTAuth setURLOpener:]
to handle URLs that get pushed to Safari (so if you want to use an internal UIWebView to handle it). If you do this, you still need to set the callbackURL and call to handle it with +[DCTAuth handleURL:]
.
from dctauth.
Awesome, works.
If you don't mind a further question...
The service I'm connecting to requires a signature, signature method and nonce.
Does this get generated for me by the DCAuthRequest or do I have to assemble it from the data I get back from the auth connection? I'm a bit newby on this...
Edit: From looking at the source the signature is generated from the URL given to the account. If I'm sending a request to a slightly different URL, do I need a different account generated?
from dctauth.
If you assign an authorised account to a request, then when you perform the request or get a signedRequest, it should have the correct authentication headers.
from dctauth.
Hmmm. Thats What I thought. Could I send a bit of code via email and get your opinion?
from dctauth.
Sure thing, my email is listed on my profile page: https://github.com/danielctull :)
from dctauth.
Related Issues (6)
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 dctauth.