// pass arguments Not Working
let url = NSURL(fileURLWithPath:
"/Volumes/DATA/Dev/cppPlayground/cmake-build-debug/cppPlayground"
, isDirectory: false) as URL
let configuration = NSWorkspace.OpenConfiguration()
var aStr = [String]()
aStr.append("1st")
aStr.append("2nd")
configuration.arguments = aStr
NSWorkspace.shared.openApplication(at: url,
	 configuration: configuration,
	 completionHandler: nil)
https://developer.apple.com/documentation/appkit/nsworkspace/3172700-openapplication
I try to open another cpp app that has main method ' int main(int argc, char **argv) '
and pass arguments.
but it was failed.
app was open successful but arguments was empty.
// Working But deprecated.
let task = Process()
task.arguments = ["test test", "2nd Argument", "3rd"]
task.launchPath = "/Volumes/DATA/Dev/cppPlayground/cmake-build-debug/cppPlayground"
task.launch()
this code was work. but available macOS 10.0–10.13.
is there something wrong?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hello I trying to imeplement Sign in With apple on Desktop version(include macOS).
So, I request HTTP url that 'https://appleid.apple.com/auth/authorize?client_id=com.gcp2.crossplay.pe&nonce=xprodse8n2i&redirect_uri=https://www.google.com/testaaaa&response_mode=query&response_type=code'.
On macOS not showing apple id webpage, just show native UI like bellow.
My WKNavigationDelegate dosen't response when click after cancel button.
(void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler;
(void)webView:(WKWebView *)webView didCommitNavigation:(WKNavigation *)navigation;
(void)webView:(WKWebView *)webView didFailNavigation:(WKNavigation *)navigation withError:(NSError *)error;
(void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation withError:(NSError *)error;
(void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation;
is any way handle this situation?
Topic:
App & System Services
SubTopic:
Core OS
Tags:
macOS
Sign in with Apple
Sign in with Apple REST API