How to disable Node-Inspector Notifications from Chrome - node-inspector

I started using node-inspector in Chrome and now cannot turn off the notifications I said OK to the first time.
How to do that please ?

Go to Chrome Preferences .. and
Search for "notifications"
Click Content Settings
Scroll down to Notifications
Click Manage Exceptions for that category

Related

Cordova - Safari iPhone remote inspection disconnects

I'm using the Safari Web Inspector to remote debug a Cordova app I'm building. Previously this has worked like a charm, but now I've run into an issue. After launching the inspector, after a couple of seconds it seems like the web inspector disconnects from the device. The inspector is still open, but the inspector wont update, and elements on the device wont be highlighted anymore when hovered in the inspector (this works for the first couple of seconds). I'm able to get it running for a couple of seconds again by closing the inspector and launching it again.
I've tried debugging using Chrome and ios_webkit_debug_proxy instead, which doesn't disconnect. However, this has other issues which makes it a none viable solution.
I've tried using Safari Technology Preview (11.0 R35) as well as the current stable version of Safari (10.1.2), but the issue occurs in both of them. I've also tried switching the lightning cable and USB-port on my computer, which doesn't make any difference.
I found that the following error is logged (using the Console app) when the inspector seems to disconnect:
RWIServiceLockdownConnection: Disconnecting because we failed to read a message from webinspectord. This could mean almost anything.
This does seem to have something to do with Cordova, since the error doesn't occur when I inspect a regular page Mobile Safari page.
What could cause this, and how do I resolve it?
Try setting a global hotkey:
Go to System Preferences -> Keyboard -> Shortcuts -> App Shortcuts.
Add a hotkey, whatever keys you want (e.g. Cmd + Alt + I) and match that hotkey to your cordova’s main html file (e.g. index.html).
Launch Cordova App.
Open Safari WI & close it.
Re-launch Safari WI with quick hotkey shortcut set above.
Close & re-open cordova app, Safari WI should keep debugging.
Also, as stated in comments, try keeping Xcode open.

How to enable "Allow Remote Automation" in Safari programmatically

I am using macOS Sierra 10.12.4 with safari version 10.1
I need to enable the Allow Remote Automation option in Develop tab in Safari programmatically.
I can run the below command which changes the com.apple.Safari.plist file in the ~/Library/Preferences and that enables the Develop menu perfectly.
`defaults write com.apple.Safari IncludeDevelopMenu -bool true`
However I did not find any option to enable the "Allow Remote Automation"
Any idea which plist contains that info?
It is not possible to toggle the setting using the method you described.
Starting in Safari 11, you can force safaridriver to authenticate by using the --enable command line option. After authenticating, this menu item will be set. This will also cache the authentication for the rest of your login session. Subsequent invocations of safaridriver (say, by the Selenium libraries) will not need further setup.
It can also be done using AppleScript if it is not possible by modifying the plist. To do that, first enable develop from Safari preferences and then choose Allow Remote Automation from the Develop menu.
Here is the AppleScript that I wrote to enable Allow Remote Automation (this covers both the steps mentioned above).
tell application "Safari" to activate
delay 2
tell application "System Events"
tell application process "Safari"
keystroke "," using command down
set frontmost to true
tell window 1
click button "Advanced" of toolbar 1
delay 2
set theCheckbox to checkbox 4 of group 1 of group 1 of it
tell theCheckbox
if not (its value as boolean) then click theCheckbox
end tell
delay 2
keystroke "w" using command down
delay 2
end tell
tell menu bar item "Develop" of menu bar 1
click
delay 2
click menu item "Allow Remote Automation" of menu 1
delay 2
end tell
end tell
end tell
tell application "Safari" to quit
Note: Here I enabled develop menu from safari preferences only if it is unchecked.
Hope this helps..

show option to change to airplane mode in IOS

I heard that apple prevent from programmers to toggle airplane mode on and off, there is option to pop up message to the user then he will decide what he want to do? if yes how could I do it?
Check if there is a network connection, if there is none
Present the user with an alert with options such as Cancel and Open Settings, if the user chooses to open the settings app
Navigate to Settings app. See this to see how to open Settings app from your app: Opening the Settings app from another app

"Safari cannot open the page because the address is invalid" message appears when I try to launch my app from a website

Device : iPhone 5 / iOS 9.3
I have an iOS app which I need to launch from a website. I was able to do it via custom URL scheme.
When I click the "Open App" button in the website, an alert dialog appears that says "Safari wants to open MyApp" with OK & Cancel buttons.
Clicking OK : everything is just fine. The app gets launched from the website perfectly.
Clicking Cancel : First time, it just dismisses preventing the app being launched, which is correct.
When I click on the "Open App" button once again from the website, I expect the same "Safari wants to launch MyApp" alert dialog to appear once again, which is not happening.
Instead, it shows a dialog that says "Cannot Open Page - Safari cannot open the page because the address is invalid" with an OK button.
My assumption was, every time when you click on that link in the website (that can launch the app via custom url scheme), I should be prompted with "safari wants to open MyApp" alert dialog all the time.
What am I missing here ? Appreciate your help in advance.
It's a known behavior.
If you tap on facebook://feeds:
And open it then Safari won't blacklist the facebook scheme for that Safari tab. You would be allowed to open facebook://profile, facebook://feeds, facebook://settings, etc. on that tab
However if you click on 'Cancel' then you're no longer able to able any url with that scheme for that tab only ie you won't be able to open facebook://profile, because it's been blacklisted for that tab.
What should you do?
Open a new tab and try again. It would no longer be blacklisted for that tab.
It would have been much better though if Apple prompted its user with options like:
Deny once. Deny Always. Allow Always
But I'm guessing if they did that then they'd have to provide alternate ways for the user to customize behavior per host/scheme. Obviously Apple doesn't want to allow that.
I met the same problem when using Google Tag Manager in my code. Try the javascript event for opening the app instead of using the href of the tag a.
I was getting a similar error, fixed it by allowing "Installing App" in restriction(Settings->General->Restriction), enable the toggle button. It is by default enabled but I restricted it in past by disabling the toggle button.
Hope this helps anyone.
I just fixed the same problem on an iphone. Go to settings> General> Restrictions> Safari. Make sure it is "allowed" or turned on (swipe to green). Exit out of settings and retry. It should work.

Diawi- Only possible from safari

I am getting an error on one of device that "Only possible from Safari" while i am opening the diawi generated link in safari. i have 12 devices registered in my developer account. Diawi generated link is working fine in 11 out of 12 devices.I have cross checked UDID, povisioning profile, build everything that is possible to resolve this issue. Enclosing a screenshot-
Image Link
If you're using IOS 13+, tap the 'aA' button on the left of the address bar and select request mobile website option.
If not please check following things,
Open Settings
Navigate to Safari > Advanced
Enable Web Inspector
Enable JavaScript
Switch back to Safari and load a web page
You need to run the page in mobile mode.
for iOS 13+, Tap the AA (left-hand side of Diawi address) and Request to Mobile Website.
You might be getting this error due to Javascript being disabled in Safari.
Navigate to Settings > Safari > Advanced
If Javascript is disabled , Enable that and reload the link in Safari.
else try disabling and enabling javascript.

Resources