我是新手为Apple Mail应用程序创建插件,我想为OSX创建Apple Mail插件.
我在Xcode中的"Installer Plug-in"(应用程序插件 - >安装程序插件)下创建了一个项目,但我不能像简单的iOS应用程序那样调试该项目.
可能吗?
如果可能的话请帮助我.
我想制作苹果邮件插件,但我什么都不知道!
我也在堆栈上找到了这个问题,但没有得到适当的帮助我也看看 如何创建Apple邮件插件
堆栈溢出但不满意答案.
感谢您的任何建议或帮助.
我创建了一个邮件插件,并在外发邮件的"发送"按钮旁添加"按钮",

现在我想从我的按钮发送传出的邮件,我也写了这样的AppleScript
activate application "Mail"
tell application "System Events"
tell application process "Mail"
log "foo"
tell menu bar 1
tell menu bar item "Message"
tell menu "Message"
click menu item "Send"
end tell
end tell
end tell
end tell
end tell
Run Code Online (Sandbox Code Playgroud)
这个脚本在Applescript编辑器中工作,但不是从我的按钮点击工作
我也在Xcode中执行applescript
NSURL* url = [NSURL fileURLWithPath:path];
NSDictionary* errors = [NSDictionary dictionary];
NSAppleScript* appleScript = [[NSAppleScript alloc] initWithContentsOfURL:url error:&errors];
[appleScript executeAndReturnError:&errors];
Run Code Online (Sandbox Code Playgroud)
执行脚本后我得到错误: -
NSAppleScriptErrorAppName = "System Events";
NSAppleScriptErrorBriefMessage = "Can't get menu bar 1 of application process \"Mail\". Invalid …Run Code Online (Sandbox Code Playgroud) 可能重复:
NSString保留Count
是否有可能任何对象的保留计数为负值?
我有这个代码
NSString *str = [[NSString alloc] initWithString:@"Hello World"];
NSLog(@"String Retain Count: %i", [str retainCount]);
Run Code Online (Sandbox Code Playgroud)
这将返回保留计数 -1.
为什么会这样?
我也是这样做的
NSString *str = [[NSString alloc] init]
Run Code Online (Sandbox Code Playgroud)
仍然是保留计数中的返回负值.
这是怎么回事?
请帮忙了解这件事!!!!!
apple-mail ×3
ios ×3
xcode ×3
plugins ×2
applescript ×1
debugging ×1
iphone ×1
macos ×1
objective-c ×1
retaincount ×1