UIWebview unable to access camera or photos
up vote
0
down vote
favorite
I have an app with a Storyboard scene. In the storyboard scene I have a UIWebView. In the storyboard scene I have a UIWebView. My code is as follows:
@IBOutlet weak var webView: UIWebView!
override func viewDidLoad() {
super.viewDidLoad()
let url = URL(string: “http://www.somepage.com”)
let urlRquest = URLRequest(url: url!)
webView.loadRequest(urlRquest)
}
The user is able to navigate and click on links in the UIWebView. I run into an issue when that web view requests access to the camera or stored photos.
iOS presents a standard control at the bottom of the view with the following options:
Take Photo or Video
Photo Library
Browse
Cancel
Once the user selects ANY of the options the webview disappears and I get the following error:
<UIImagePickerController: 0x1071ae400> on <MyApp.WebViewVC: 0x10e924ae0> whose view is not in the window hierarchy!
- I am not able to use WKWebView in this particular app.
- I have verified that the proper permissions are requested in the plist file and I am able to access photo album and camera within the app and have requested permissions before calling the web view.
- I did not implement any of the UIImagePickerControllerDelegate functions as this is a UIWebView requesting access.
uiwebview
add a comment |
up vote
0
down vote
favorite
I have an app with a Storyboard scene. In the storyboard scene I have a UIWebView. In the storyboard scene I have a UIWebView. My code is as follows:
@IBOutlet weak var webView: UIWebView!
override func viewDidLoad() {
super.viewDidLoad()
let url = URL(string: “http://www.somepage.com”)
let urlRquest = URLRequest(url: url!)
webView.loadRequest(urlRquest)
}
The user is able to navigate and click on links in the UIWebView. I run into an issue when that web view requests access to the camera or stored photos.
iOS presents a standard control at the bottom of the view with the following options:
Take Photo or Video
Photo Library
Browse
Cancel
Once the user selects ANY of the options the webview disappears and I get the following error:
<UIImagePickerController: 0x1071ae400> on <MyApp.WebViewVC: 0x10e924ae0> whose view is not in the window hierarchy!
- I am not able to use WKWebView in this particular app.
- I have verified that the proper permissions are requested in the plist file and I am able to access photo album and camera within the app and have requested permissions before calling the web view.
- I did not implement any of the UIImagePickerControllerDelegate functions as this is a UIWebView requesting access.
uiwebview
Found my answer here after further research: stackoverflow.com/questions/25942676/…
– xdeleon
Nov 20 at 23:02
suspicious point i am not able to use WKWebview for this app. what issue did you face ? for your problem best solution is wkwebview.
– Shauket Sheikh
Nov 21 at 3:36
My app needs to support iOS 10-12. I also need to access the cookies of the embedded browser/view. WKWebView did not implement support for cookie access until iOS 11 as noted here: stackoverflow.com/questions/33156567/… . With UIWebView I can access cookies as documented here: stackoverflow.com/questions/771498/… . While I agree it’s preferable to use WKWebViewI noted that I can’t use it “in this particular app” but did not put the particulars as I was trying to keep my question specific.
– xdeleon
Nov 21 at 19:16
There is way to sync cookies i am using wkwebview and syncing cookies till ios 8
– Shauket Sheikh
Nov 22 at 1:26
as for your issue, can you read this doc they have fix for this error. pinkstone.co.uk/…
– Shauket Sheikh
Nov 22 at 1:59
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have an app with a Storyboard scene. In the storyboard scene I have a UIWebView. In the storyboard scene I have a UIWebView. My code is as follows:
@IBOutlet weak var webView: UIWebView!
override func viewDidLoad() {
super.viewDidLoad()
let url = URL(string: “http://www.somepage.com”)
let urlRquest = URLRequest(url: url!)
webView.loadRequest(urlRquest)
}
The user is able to navigate and click on links in the UIWebView. I run into an issue when that web view requests access to the camera or stored photos.
iOS presents a standard control at the bottom of the view with the following options:
Take Photo or Video
Photo Library
Browse
Cancel
Once the user selects ANY of the options the webview disappears and I get the following error:
<UIImagePickerController: 0x1071ae400> on <MyApp.WebViewVC: 0x10e924ae0> whose view is not in the window hierarchy!
- I am not able to use WKWebView in this particular app.
- I have verified that the proper permissions are requested in the plist file and I am able to access photo album and camera within the app and have requested permissions before calling the web view.
- I did not implement any of the UIImagePickerControllerDelegate functions as this is a UIWebView requesting access.
uiwebview
I have an app with a Storyboard scene. In the storyboard scene I have a UIWebView. In the storyboard scene I have a UIWebView. My code is as follows:
@IBOutlet weak var webView: UIWebView!
override func viewDidLoad() {
super.viewDidLoad()
let url = URL(string: “http://www.somepage.com”)
let urlRquest = URLRequest(url: url!)
webView.loadRequest(urlRquest)
}
The user is able to navigate and click on links in the UIWebView. I run into an issue when that web view requests access to the camera or stored photos.
iOS presents a standard control at the bottom of the view with the following options:
Take Photo or Video
Photo Library
Browse
Cancel
Once the user selects ANY of the options the webview disappears and I get the following error:
<UIImagePickerController: 0x1071ae400> on <MyApp.WebViewVC: 0x10e924ae0> whose view is not in the window hierarchy!
- I am not able to use WKWebView in this particular app.
- I have verified that the proper permissions are requested in the plist file and I am able to access photo album and camera within the app and have requested permissions before calling the web view.
- I did not implement any of the UIImagePickerControllerDelegate functions as this is a UIWebView requesting access.
uiwebview
uiwebview
asked Nov 20 at 0:32
xdeleon
513513
513513
Found my answer here after further research: stackoverflow.com/questions/25942676/…
– xdeleon
Nov 20 at 23:02
suspicious point i am not able to use WKWebview for this app. what issue did you face ? for your problem best solution is wkwebview.
– Shauket Sheikh
Nov 21 at 3:36
My app needs to support iOS 10-12. I also need to access the cookies of the embedded browser/view. WKWebView did not implement support for cookie access until iOS 11 as noted here: stackoverflow.com/questions/33156567/… . With UIWebView I can access cookies as documented here: stackoverflow.com/questions/771498/… . While I agree it’s preferable to use WKWebViewI noted that I can’t use it “in this particular app” but did not put the particulars as I was trying to keep my question specific.
– xdeleon
Nov 21 at 19:16
There is way to sync cookies i am using wkwebview and syncing cookies till ios 8
– Shauket Sheikh
Nov 22 at 1:26
as for your issue, can you read this doc they have fix for this error. pinkstone.co.uk/…
– Shauket Sheikh
Nov 22 at 1:59
add a comment |
Found my answer here after further research: stackoverflow.com/questions/25942676/…
– xdeleon
Nov 20 at 23:02
suspicious point i am not able to use WKWebview for this app. what issue did you face ? for your problem best solution is wkwebview.
– Shauket Sheikh
Nov 21 at 3:36
My app needs to support iOS 10-12. I also need to access the cookies of the embedded browser/view. WKWebView did not implement support for cookie access until iOS 11 as noted here: stackoverflow.com/questions/33156567/… . With UIWebView I can access cookies as documented here: stackoverflow.com/questions/771498/… . While I agree it’s preferable to use WKWebViewI noted that I can’t use it “in this particular app” but did not put the particulars as I was trying to keep my question specific.
– xdeleon
Nov 21 at 19:16
There is way to sync cookies i am using wkwebview and syncing cookies till ios 8
– Shauket Sheikh
Nov 22 at 1:26
as for your issue, can you read this doc they have fix for this error. pinkstone.co.uk/…
– Shauket Sheikh
Nov 22 at 1:59
Found my answer here after further research: stackoverflow.com/questions/25942676/…
– xdeleon
Nov 20 at 23:02
Found my answer here after further research: stackoverflow.com/questions/25942676/…
– xdeleon
Nov 20 at 23:02
suspicious point i am not able to use WKWebview for this app. what issue did you face ? for your problem best solution is wkwebview.
– Shauket Sheikh
Nov 21 at 3:36
suspicious point i am not able to use WKWebview for this app. what issue did you face ? for your problem best solution is wkwebview.
– Shauket Sheikh
Nov 21 at 3:36
My app needs to support iOS 10-12. I also need to access the cookies of the embedded browser/view. WKWebView did not implement support for cookie access until iOS 11 as noted here: stackoverflow.com/questions/33156567/… . With UIWebView I can access cookies as documented here: stackoverflow.com/questions/771498/… . While I agree it’s preferable to use WKWebViewI noted that I can’t use it “in this particular app” but did not put the particulars as I was trying to keep my question specific.
– xdeleon
Nov 21 at 19:16
My app needs to support iOS 10-12. I also need to access the cookies of the embedded browser/view. WKWebView did not implement support for cookie access until iOS 11 as noted here: stackoverflow.com/questions/33156567/… . With UIWebView I can access cookies as documented here: stackoverflow.com/questions/771498/… . While I agree it’s preferable to use WKWebViewI noted that I can’t use it “in this particular app” but did not put the particulars as I was trying to keep my question specific.
– xdeleon
Nov 21 at 19:16
There is way to sync cookies i am using wkwebview and syncing cookies till ios 8
– Shauket Sheikh
Nov 22 at 1:26
There is way to sync cookies i am using wkwebview and syncing cookies till ios 8
– Shauket Sheikh
Nov 22 at 1:26
as for your issue, can you read this doc they have fix for this error. pinkstone.co.uk/…
– Shauket Sheikh
Nov 22 at 1:59
as for your issue, can you read this doc they have fix for this error. pinkstone.co.uk/…
– Shauket Sheikh
Nov 22 at 1:59
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53384573%2fuiwebview-unable-to-access-camera-or-photos%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Found my answer here after further research: stackoverflow.com/questions/25942676/…
– xdeleon
Nov 20 at 23:02
suspicious point i am not able to use WKWebview for this app. what issue did you face ? for your problem best solution is wkwebview.
– Shauket Sheikh
Nov 21 at 3:36
My app needs to support iOS 10-12. I also need to access the cookies of the embedded browser/view. WKWebView did not implement support for cookie access until iOS 11 as noted here: stackoverflow.com/questions/33156567/… . With UIWebView I can access cookies as documented here: stackoverflow.com/questions/771498/… . While I agree it’s preferable to use WKWebViewI noted that I can’t use it “in this particular app” but did not put the particulars as I was trying to keep my question specific.
– xdeleon
Nov 21 at 19:16
There is way to sync cookies i am using wkwebview and syncing cookies till ios 8
– Shauket Sheikh
Nov 22 at 1:26
as for your issue, can you read this doc they have fix for this error. pinkstone.co.uk/…
– Shauket Sheikh
Nov 22 at 1:59