How would you change the default browser programmatically on Mac OSX.
For example from safari to chrome, or chrome to firefox?
Thanks
You should use
LSSetDefaultHandlerForURLScheme(
CFStringRef inURLScheme, CFStringRef inHandlerBundleID)
See also Launch Service Reference Docs.
Use #"http" for the inURLScheme, and figure out the bundle identifiers of Firefox, Chrome etc. to use.
You can also check which are installed using
LSCopyAllHandlersForURLScheme(CFStringRef inURLScheme)
Related
With the release of Safari 12, Safari will no longer support NPAPI plugins. My use case is to be able to launch a java application located on a client from a browser extension which I can currently do in Chrome and Firefox with NativeMessaging. From my reasearch, I do not see a way to do this in Safari 12. The closest I can see is their "Safari App Extension" project but this looks like it requires that you package up your native app with the extension and distribute it through the App Store. I am not at all a Mac developer so I am looking for some advice. Does anyone know if Safari supports my use case?
We can create a extension that will download our dmg app with the native code.And run the dmg app after it is getting downloaded.
Then we can place our extension in the safari extension gallery.
We have implemented it in the similar way where our extension look for the json file which in turns download the DMG app that we have kept in the server.
Building a very straightforward Cocoa app using Xcode 5. The main window is simply a WebView with plugins enabled that attempts to load a page from the Internet with a Flash embed on it.
Sandboxing is disabled and I've double- and triple-checked that plugins are enabled on the webview (both in the nib and programatically.) I've also tried running the app in both 32- and 64-bit modes.
Even navigating the WebView to the Adobe Flash website shows a missing plug-in box. What could cause the WebView object to not have Flash available?
I would guess that it is one of 3 options.
You do not have flash installed at all.
You have flash installed, but do not have the flash plug-in installed.
You have an old version of flash installed, and it has been disabled.
I have verified that it works (on my system) with a very small test:
NSURLRequest * request = [NSURLRequest requestWithURL:[NSURL URLWithString:#"http://www.adobe.com/swf/software/flash/about/flashAbout_info_small.swf"]];
[[self.webView mainFrame]loadRequest:request];
Are you sure the necessary WebView plugins are installed?
Is this only happening on your machine or can you replicate on another as well?
Maybe this post is helpful:
Mac OS/WebView: Why Flash and other plugins are not available when a local page is loaded?
I followed the steps to set up debugging webpage on iOS. It worked. However I see an issue with the inspector - it doesn't let me check the DOM and corresponding CSS. Anyone else has this issue? (Exact same issue when debugging using the simulator.)
Screenshot: http://screencast.com/t/E4fxPQwk14
Resource: https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/DebuggingSafarioniPhoneContent/DebuggingSafarioniPhoneContent.html
Thanks!
UPDATE: WebKit nightly works. Thank you Timothy Hatcher!
You need to use a WebKit nightly, Safari 6.1 or Mavericks to use Web Inspector with iOS 7.
If you don't have access to Mavericks, You can also use Chrome devtools via proxy.
Debug iOS 6+7 Mobile Safari using the Chrome DevTools
I have problem as following. I use a Titanium Studio, build: 3.1.1.201306112235 with SDK 3.1.1 GA (on Windows 7). When I try to run example app as "Mobile Web Preview in Browser", then I saw mobile app in my Firefox (version 21.0) but any actions associated with 'clicks' don't work. Furthermore when I try run the same app in Chrome I see the same behaviour. Only in Internet Explorer app works properly (version 10). Do you have idea why apps from Titanium don't work properly? If you would like to get some more logs just ask.
EDIT: I provide remote access, and reopen page by Firefox in the same version on my colleague's laptop. Then in here browser everything works well. So i have question which settings, on my browser can "freezing" titanium application. Javascript is running, so I don't have idea, what is bad in my configuration.
This sounds like you are making web service calls to a remote host, which violates the same-origin-policy built into recent versions of chrome.
Try opening up chrome with this policy disabled:
chrome.exe --disable-web-security
I am trying to get WebGL running with Opera 12.0 (Mac OS X Lion).
The Opera Website states that WebGL is supported, although if I check it via the WebGL check website, Opera doesn't really seem to work.
Everything I tried is working fine in latest Chrome.
Is there anything I have to change in Opera's prefs to enable WebGL or is it just not supported at all?
Open opera:gpu and see if your video card is block-listed.
If there is a text: Vega backend: Software, it means HW Acceleration got auto disabled because of previous crashes ;) Easiest fix is re-installation. Or separate side-by-side installation.
I have had a similar problem yesterday, now its fixed - and i can see:
http://www.khronos.org/webgl/wiki/Demo_Repository
http://maps3d.svc.nokia.com/webgl/
For google webgl experiments - many of them do not work even in chrome 17.
Make sure that you have webGL enabled in options which are acessible through url:
opera:config
just type webgl in search input