SimpleAuth
SimpleAuth copied to clipboard
Nil argument to NSCFString
Seeing this issue when attempting to use the Instagram provider:
WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: <NSInvalidArgumentException> -[__NSCFString hasPrefix:]: nil argument
Fairly positive I'm using the library correctly (Obviously using my real consumer key and secret):
SimpleAuth.configuration()["instagram"] = [
"consumer_key": "<CONSUMER_KEY>",
"consumer_secret": "<CONSUMER_SECRET>"
]
SimpleAuth.authorize("instagram") { responseObject, error in
print( \(responseObject))
}
The view controller that should show the web view pointed at the Instagram login page is presenting but not loading. The crash seems to happen in the -isTargetRedirectURL:
method specifically on the line that calls -hasPrefix:
.
Would appreciate any help on this issue.