Rectangle 27 6

I still have this issue but what has solved it for me is when I run Safari in Private Mode. Dunno why, might be chaching-related. Not a nice solution but will do as long as the problem persist.

These are the versions: - iOS Simulator Version 7.0 (463.9.4) - Safari Version 6.0.5 (8536.30.1)

That did the trick for me too, i.e. enable Private Browsing via Safari drop-down menu. I'm using a physical iPad, connected to an OS X VirtualBox VM. Although I'm doing this while debugging a local webapp, i.e. on an internal IP on port 3000.

So I cannot remember why the solution above did not work in the long run for me.. But what I did (which by the way I see as a more suitable solution) was that I downloaded Webkit nightly build (nightly.webkit.org), which runs on Mac OS, no need for Private mode anymore. If you have problem starting the webkit-app try download a build that is a couple of datestamps back in time. Let me know if the issue is solved with 'normal' Safari.

Sign up for our newsletter and get our top new questions delivered to your inbox (see an example).

debugging - How do I fix the safari 6 web inspector so that it works w...

ios debugging safari mobile-safari remote-debugging
Rectangle 27 1

You need cookies to be enabled in your Safari

This issue is exactly what I had to deal with before. So, to have it fixed, the author just needs to make sure that cookies are enabled in Safari.

debugging - How do I fix the safari 6 web inspector so that it works w...

ios debugging safari mobile-safari remote-debugging
Rectangle 27 37

With the release of iOS 6, Apple released Remote Web Inspector for their Mobile Safari, and this is huge. Basically you have all the features and power of Web Inspector in regular Safari, for your mobile apps, including Phonegap apps.

I've used weinre but this tool makes it obsolete for newer versions of iOS (unfortunately not for old versions of iOS, non-iOS devices, or if you're on Windows) since its a full-featured debugger with breakpoints and everything.

  • A Mac with Safari 6+
  • Either a USB-attached iOS 6+ device or xCode 4.5+ running an iOS 6+ simulator

In Safari 6+ for Mac, access your page from the Develop menu. You can enable Develop menu in Safari's Advanced Preferences if its not showing up.

(Also, if you read about a "secret private interface" or iWebInspector somewhere, these are also made obsolete.)

this blows any other solution out of the water - SUPER easy! Thx!!

I want to debug chrome on iOS, not Safari :/

yes but it's not always simple to use it in some situations

Is there a way to debug JavaScript in the iPhone/iOS Safari browser? -...

javascript iphone browser
Rectangle 27 6

For web development and testing on the iOS Simulator (Safari):

Really? Hmm.... it looked like it was working for me

@AdrianFlorescu this is a solution for debugging web development on iOS Safari, but I think the question was pertaining to iOS app development.

Does not work on Safari 9.0.3 with remote debugger. "Disable caches" has no effect either.

This setting does nothing for me (does not actually clear cache on mobile safari)

Yeah. Looks like it doesn't clean the iOS cache anymore. I guess it did in the past...

ios - Is there a quicker / better way to clear the iPhone Simulator ca...

ios iphone xcode ios-simulator
Rectangle 27 6

For web development and testing on the iOS Simulator (Safari):

Really? Hmm.... it looked like it was working for me

@AdrianFlorescu this is a solution for debugging web development on iOS Safari, but I think the question was pertaining to iOS app development.

Does not work on Safari 9.0.3 with remote debugger. "Disable caches" has no effect either.

This setting does nothing for me (does not actually clear cache on mobile safari)

Yeah. Looks like it doesn't clean the iOS cache anymore. I guess it did in the past...

ios - Is there a quicker / better way to clear the iPhone Simulator ca...

ios iphone xcode ios-simulator
Rectangle 27 1

You will need to either register as an Apple Developer to use the simulator and use the web inspector to debug.

You can try the following link for more information.

safari - How can I reproduce website crash on iOS 6.1 - Stack Overflow

ios safari ios6.1
Rectangle 27 1

You will need to either register as an Apple Developer to use the simulator and use the web inspector to debug.

You can try the following link for more information.

safari - How can I reproduce website crash on iOS 6.1 - Stack Overflow

ios safari ios6.1
Rectangle 27 0

With the release of iOS 6, Apple released remote Web Inspector for their Mobile Safari in conjunction with Mac Safari 6, and this is huge. Basically you have all the features and power of Web Inspector in regular Safari, for your mobile apps, including Phonegap apps. Here's how it works, Requires xCode 4.5+ running an iOS 6+ simulator (or an iOS 6+ device), and Safari 6+.

  • In Safari 6+ (From Mac), access ios Simulator or ios device from the Develop menu. You can enable Develop menu in Safari's Advanced Preferences.
  • Now You can debug the app using Web Inspector.

iphone - Could you tell be debug process in Phonegap iOS application? ...

iphone ios ipad cordova
Rectangle 27 0

Using Safari's Developer menu to open the iPhone Simulator in Web Inspector shows that the

<ion-side menu side=left" ..

has a z-index: 0 even when the side menu is open. Changing the z-index: 1 immediately made the projects appear. However, this is not a fix, just an explanation of the problem.

It would appear that, on iOS at least, that when (and only when) the left side menu is open, the z-index needs to be 1 for the ion-content containing the projects to appear.

There is no explicit reference to z-index in the IonicTodo code itself. This may be a bug in the ionic framework.

Note that I have put a fork of the ionic-todo code updated to 1.0.0-beta.6 at

If someone figures this bug out, I will update it accordingly.

angularjs - Ionic guide's Todo app not showing projects on iOS version...

angularjs mobile cordova ionic-framework
Rectangle 27 0

I tried private mode, which gave me a slight improvement but Bjrn Christensson answer above is what worked for me.

This allows me to view CSS and also tap to inspect nodes on the iPad. These 2 things did not work with the use private answer above.

debugging - How do I fix the safari 6 web inspector so that it works w...

ios debugging safari mobile-safari remote-debugging
Rectangle 27 0

Firstly, Update your browser and secondly open Firefox Inspector and then run your application.

Safari Web Inspector doesn't debug JavaScript in iOS 7 Simulator - Sta...

javascript ios safari ios-simulator web-inspector
Rectangle 27 0

From a WWDC 2014 session 512 "web_inspector_and_modern_javascript", you have to create a .entitlements file with these keys. It's about at 22:48 min in the video.

Safari Web Inspector not working with iOS Simulator - Stack Overflow

ios safari safari-web-inspector
Rectangle 27 0

I tried private mode, which gave me a slight improvement but Bjrn Christensson answer above is what worked for me.

This allows me to view CSS and also tap to inspect nodes on the iPad. These 2 things did not work with the use private answer above.

debugging - How do I fix the safari 6 web inspector so that it works w...

ios debugging safari mobile-safari remote-debugging
Rectangle 27 0

If you have the Xcode developer tools installed on your Mac, you can attach the Safari Web Inspector to the iPad Simulator, like this:

  • Change the hardware mode in the simulator to iPad
  • Open the Settings app on the simulator, go to Safari > Advanced and set Web Inspector to On
  • Follow the instructions under the Web Inspector switch: open the desired web page in Safari in the iPad Simulator, and also open the desktop version of Safari on the Mac. Go to the Develop > iPad Simulator menu in Safari and choose the appropriate page

Now you'll have a Web Inspector window that is attached to the web page in the iPad Simulator, with full power to debug the web page.

I used this to find the bad HTML markup I mentioned in the comment. When I used the Web Inspector to fix that markup (find the HTML element in the Resource tab or use the hand icon to select the element in the simulator window, then right click the element and choose Edit as HTML), and then also changed the style attribute for that div I mentioned to have min-width: 1002px;, the page looked OK in the iPad Simulator for me. The change to 1002px is based on one of the parent elements, <div id="wrapper">, having width: 1002px defined in the CSS. The wider min-width of 1124px probably caused the page width problem.

Thanks for the help, @esker. It was the wrapper div afterall. Also, thanks for the heads up on Xcode

html - Why are these two pages displaying differently on ipad? - Stack...

html ios css ipad
Rectangle 27 0

I have run into this. The only way i get the simulator to come up in web inspector is if i have a physical device attached. Then i see them both in the list to choose from.

debugging - How do I fix the safari 6 web inspector so that it works w...

ios debugging safari mobile-safari remote-debugging
Rectangle 27 0

I take it all back. Your problem is not with view layout. I believe your problem is that the web content you're loading into your web view has a border (or padding or margin) around it. You may find Debugging Web Content on iOS useful. It explains how to use the Web Inspector in Safari (on your Mac) to debug the content in a UIWebView running on the simulator or a device. I think if you inspect the video element in your web content, you will discover that it is not flush with the top and left margins of the viewport.

I would guess that the navigation bar height isn't set correctly when you're looking at it in viewDidLoad. That is too soon to be checking the frames of views you've just created.

An iOS app spends its time in a run loop that looks like this:

while (1) {
    Event phase: process one event (e.g. touch event, timer firing, local or push notification, etc.)
    Layout phase: update the frames of new views and views with added or removed subviews
    Draw phase: draw the contents of views that need to be drawn
    Wait for the next event to arrive
}

When you add views to the view hierarchy, they are scheduled to be laid out during the layout phase. It is not until the layout phase completes that you can rely on new views to have their proper frames.

You can tap into the layout phase by writing a subclass of UIView (or a subclass of any other view class as necessary) and overriding its layoutSubviews method. Or you can implement the viewDidLayoutSubviews method in a view controller. I recommend using a UIView subclass and overriding layoutSubviews, but you may find it more expedient to just implement viewDidLayoutSubviews:

- (void)viewDidLayoutSubviews {
    [super viewDidLayoutSubviews];
    [self layoutWebView];
}

- (void)layoutWebView {
    CGRect frame = self.view.bounds;
    CGFloat navBarHeight = self.navigationBar.frame.size.height;
    frame.origin.y = navBarHeight;
    frame.size.height -= navBarHeight;
    self.webView.frame = frame;
}

Alternatively, if your deployment target is iOS 6 or later, you can use auto layout to pin the bottom edge of the navigation bar to the top edge of the web view. Put this in viewDidLoad:

[self.view addLayoutConstraints:[NSLayoutConstraint
    constraintsWithVisualFormat:@"|V:[_navigationBar][_webView]|"
    options:0 metrics:nil
    views:NSDictionaryOfVariableBindings(_navigationBar, _webView)]];

Now, what I think is specifically happening in your app is you're specifying a height of 50 when you create your UINavigationBar, but a UINavigationBar wants a height of 44. So in the layout phase, the navigation bar resizes itself to 44 points tall. Since you aren't doing anything to fix your web view's frame during layout, the web view remains 50 points below the top edge of your top-level view, leaving a gap of 6 points. So you could just change the height of the navigation bar to 44 when you create it. ;^)

I've changed the height of UINavigationBar to 44. I've also changed the code to use layoutConstraint. But this time the UIWebView doesn't show at all. I can hear the sound of the video playing in the web view so I think it is a layout issue.

I don't know why you would separate the views using ->=0- in your visual format. That allows any amount of separation between the views, and is ambiguous, so auto layout is allowed to leave a gap between the views. The visual format I suggested tells auto layout that the edges of the views must not have a gap between them.

I've tried adding nothing as well as ->=0- but none of them works for me.

Also, you should probably set translatesAutoresizingMaskIntoConstraints to NO on both the navigation bar and the web view. I would expect you to be getting auto layout warnings in your console if you're not doing that.

Also you need to set horizontal constraints on the web view like you do for the navigation bar.

ios - Cannot close the gap between UIWebView and a UINavigationBar - S...

ios ipad uiwebview uinavigationbar uicontrol
Rectangle 27 0

I still have this issue but what has solved it for me is when I run Safari in Private Mode. Dunno why, might be chaching-related. Not a nice solution but will do as long as the problem persist.

These are the versions: - iOS Simulator Version 7.0 (463.9.4) - Safari Version 6.0.5 (8536.30.1)

That did the trick for me too, i.e. enable Private Browsing via Safari drop-down menu. I'm using a physical iPad, connected to an OS X VirtualBox VM. Although I'm doing this while debugging a local webapp, i.e. on an internal IP on port 3000.

So I cannot remember why the solution above did not work in the long run for me.. But what I did (which by the way I see as a more suitable solution) was that I downloaded Webkit nightly build (nightly.webkit.org), which runs on Mac OS, no need for Private mode anymore. If you have problem starting the webkit-app try download a build that is a couple of datestamps back in time. Let me know if the issue is solved with 'normal' Safari.

debugging - How do I fix the safari 6 web inspector so that it works w...

ios debugging safari mobile-safari remote-debugging
Rectangle 27 0

I have run into this. The only way i get the simulator to come up in web inspector is if i have a physical device attached. Then i see them both in the list to choose from.

debugging - How do I fix the safari 6 web inspector so that it works w...

ios debugging safari mobile-safari remote-debugging