macOS - lsappinfo 命令

版权声明:本文为博主原创文章,转载请附上本文链接地址。from : https://blog.csdn.net/lovechris00 https://blog.csdn.net/lovechris00/article/details/84875167

lsappinfo


一、查看lsappinfo 的手册

man lsappinfo

结果同如下界面:

http://www.manpagez.com/man/8/lsappinfo/


二、命令示例


1、lsappinfo list

在终端输入命令:

$ lsappinfo

效果同

~ $ lsappinfo list

会出现当前所有启动的应用;

可以看到每个应用的 bundleID,bundle地址,执行地址,线程号,应用类型,版本号


 1) "loginwindow" ASN:0x0-0x2002: 
    bundleID="com.apple.loginwindow"
    bundle path="/System/Library/CoreServices/loginwindow.app"
    executable path="/System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow"
    pid = 105 type="UIElement" flavor=3 Version="1791.4.8" fileType="APPL" creator="lgnw" Arch=x86_64 
    checkin time = 2018/10/07 17:04:08 ( 19 days, 23 hours, 32 minutes, 20.695 seconds ago )

 2) "便笺" ASN:0x0-0x11011: 
    bundleID="com.apple.Stickies"
    bundle path="/Applications/Stickies.app"
    executable path="/Applications/Stickies.app/Contents/MacOS/Stickies"
    pid = 24789 type="Foreground" flavor=3 Version="" fileType="APPL" creator="notz" Arch=x86_64 
    parentASN="loginwindow" ASN:0x0-0x2002: 
    launch time =  2018/10/09 22:40:59 ( 17 days, 17 hours, 55 minutes, 29.4313 seconds ago )
    checkin time = 2018/10/09 22:41:00 ( 17 days, 17 hours, 55 minutes, 28.336 seconds ago )
    launch to checkin time: 1.09529 seconds

 3) "Safari 浏览器" ASN:0x0-0x12012: 
    bundleID="com.apple.Safari"
    bundle path="/Applications/Safari.app"
    executable path="/Applications/Safari.app/Contents/MacOS/Safari"
    pid = 24794 type="Foreground" flavor=3 Version="13605.1.33.1.2" fileType="APPL" creator="sfri" Arch=x86_64 
    parentASN="loginwindow" ASN:0x0-0x2002: 
    launch time =  2018/10/09 22:40:59 ( 17 days, 17 hours, 55 minutes, 29.3966 seconds ago )
    checkin time = 2018/10/09 22:41:01 ( 17 days, 17 hours, 55 minutes, 27.8749 seconds ago )
    launch to checkin time: 1.5217 seconds

 4) "终端" ASN:0x0-0x13013: (in front) 
    bundleID="com.apple.Terminal"
    bundle path="/Applications/Utilities/Terminal.app"
    executable path="/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal"
    pid = 24795 type="Foreground" flavor=3 Version="404" fileType="APPL" creator="????" Arch=x86_64 
    parentASN="loginwindow" ASN:0x0-0x2002: 
    launch time =  2018/10/09 22:40:59 ( 17 days, 17 hours, 55 minutes, 29.3668 seconds ago )
    checkin time = 2018/10/09 22:41:56 ( 17 days, 17 hours, 54 minutes, 32.869 seconds ago )
    launch to checkin time: 56.4978 seconds

....


2、 lsappinfo front

获取最前方的应用

~ $ lsappinfo front
ASN:0x0-0x66b66b:

关于 ASN (app-specifier number)

There are different ways to  indicate  what  application  the  commands
       operate  on,  collectively called the app-specifier. This may be one of
       the following.

       o   "ASN:0xAAAA:0xBBBB:" where AAAA and BBBB  are  the  values  for  an
           application ASN.

       o   "0xBBBB" where BBBB are the values from the lower part of an appli-
           cation ASN for which the upper part of the ASN is 0x0

       o   "#" where # is a decimal value above 10, representing the  applica-
           tion with the pid #

       o   "name" where name is the display name of a running application

       o   "bundleid" where bundleid is the bundle id of a running application

       o   "me" the asn of the lsappinfo tool

文档中所有 app-specifier 的参数,传应用对用的 ASN 即可,如:lsappinfo info ASN:0x0-0x4b84b8


3、lsappinfo metainfo


~ $ lsappinfo metainfo
    sessionID=100008
    applicationCount=137
    visibleApplicationCount=18
    hiddenApplicationCount=0
    unhiddenApplicationCount=18
    applicationListSeed=4795
    visibleApplicationListSeed=8966
    frontApplicationSeed=4160
    debugLevel=[ NULL ] 
    uidsInSession = ( 501)
    pidsInSession = ( 82, 109, 245, 533, 545, 551, 612, 650, 946, 947, 948, 956, 962, 964, 995, 999, 1003, 1005, 1013, 1038, 1443, 1629, 1630, 1953, 1954, 1955, 5036, 5053, 6753, 10847, 11670, 11737, 11783, 11784,762, 80756, 87037, 87040, 87309, 87310, 87598, 87654, 87975, 88425, 88779, 89724, 89725, 89728, 89793, 92316, 92522, 92683, 92697, 92698, 92920, 92921, 92924, 93657, 94203, 94319, 94716, 95659, 96743, 96748, 96752, 96753, 98001)
    presentationMode="Normal"
    presentationOptions=0
    systemProcess=ASN:0x0-0x2002:
    sessionLauncherASN=ASN:0x0-0x2002:
    bringForwardOrder = "终端" ASN:0x0-0x66b66b:  "Safari 浏览器" ASN:0x0-0x19a19a:  "Typora" ASN:0x0-0x661661:  "网易云音乐" ASN:0x0-0x4b84b8:  "YXNote2" ASN:0x0-0x563563:  "访达" ASN:0x0-0x29029:  "Xcode" ASN:0x0-0x60d60d:   "App Store" ASN:0x0-0x605605: "便笺" ASN:0x0-0xa20a2:  "Sourcetree" ASN:0x0-0x1c61c6:  "安装器" ASN:0x0-0x39f39f:  

4、lsappinfo sharedmemory

数据结构与上面类似,偏向于 共享内存方向的信息

Last login: Fri Dec  7 14:47:35 on ttys002
~ $ lsappinfo sharedmemory
Shared memory page information:
 base address=0x0x1003cd000
 version=260
 size=16384
 sessionID=100008
 lockCount=0
 debug log level=5
 frontASNSeed=4263
 menuBarOwnerASNSeed=3499
 applicationListSeed=4807
 pendingApplicationListSeed=100
 visibleApplicationListSeed=9084
 applicationInformationSeed=33046
 frontASN="终端" ASN:0x0-0x66b66b: 
 menuBarOwnerASN="终端" ASN:0x0-0x66b66b: 
 systemProcessASN="loginwindow" ASN:0x0-0x2002: 
 systemLauncherASN=ASN:0x0-0x0: 
 nextAppToBringForwardASNLowHalf=ASN:0x0-0x0: 
 expectedFrontASNLowerHalf=ASN:0x0-0x0: 
 systemUIPresentationMode=0 "Normal" systemUIPresentationOptions=0
 launchProgress=0 
 launchProgessUserActivityCount=0
 processes = #140
{ 
    "loginwindow" ASN:0x0-0x2002:  flags=64e0 uielement wouldBeTerminatedByTAL  visibleIndex=0 pid=109 seed=533, 
    "Installer Progress" ASN:0x0-0x5005:  flags=64e0 uielement wouldBeTerminatedByTAL  visibleIndex=0 pid=82 seed=531, 
    "通知中心" ASN:0x0-0xe00e:  flags=64e0 uielement wouldBeTerminatedByTAL  visibleIndex=0 pid=533 seed=529, 
    "SSMenuAgent" ASN:0x0-0x10010:  flags=44e0 uielement  visibleIndex=0 pid=551 seed=522, 
    "Wi-Fi" ASN:0x0-0x12012:  flags=44e0 uielement  visibleIndex=0 pid=545 seed=522, 
    "ViewBridgeAuxiliary" ASN:0x0-0x19019:  flags=4090 bg-only  visibleIndex=0 pid=650 seed=549, 
    "程序坞" ASN:0x0-0x27027:  flags=40e0 uielement  visibleIndex=0 pid=946 seed=528, 
    "SystemUIServer" ASN:0x0-0x28028:  flags=64e0 uielement wouldBeTerminatedByTAL  visibleIndex=0 pid=947 seed=529, 
    "访达" ASN:0x0-0x29029:  flags=44c0 fg  visibleIndex=5 pid=948 seed=561, 
    "Safari 浏览器" ASN:0x0-0x19a19a:  flags=40c0 fg  visibleIndex=2 pid=73117 seed=573, 
    "Safari Networking" ASN:0x0-0x19c19c:  flags=a0 uielement  visibleIndex=0 pid=73122 seed=518, 
    "Safari Storage" ASN:0x0-0x1a01a0:  flags=a0 uielement  visibleIndex=0 pid=73129 seed=518, 
    "Sourcetree" ASN:0x0-0x1c61c6:  flags=60c0 fg wouldBeTerminatedByTAL  visibleIndex=18 pid=47908 seed=565, 
    "“Safari”网页内容" ASN:0x0-0x1ef1ef:  flags=c4e0 uielement  visibleIndex=0 pid=49944 seed=584, 
 
}



5、lsappinfo processList


~ $ lsappinfo processList
ASN:0x0-0x2002-"loginwindow": ASN:0x0-0x5005-"Installer_Progress": ASN:0x0-0xe00e-"通知中心": ASN:0x0-0x10010-"SSMenuAgent": ASN:0x0-0x12012-"Wi-Fi": ASN:0x0-0x19019-"ViewBridgeAuxiliary": ASN:0x0-0x27027-"程序坞": ASN:0x0-0x28028-"SystemUIServer": ASN:0x0-0x29029-"访达": ASN:0x0-0x2a02a-"com.apple.dock.extra": ASN:0x0-0x2b02b-"聚焦": ASN:0x0-0x2c02c-"com.apple.CoreSimulator.CoreSimulatorService": ASN:0x0-0x31031-"AirPlayUIAgent": ASN:0x0-0x2ec2ec-"“Safari”网页内容": ASN:0x0-0x2f22f2-"“Safari”网页内容": ASN:0x0-0x39f39f-"安装器": ASN:0x0-0x3a53a5-"“Safari”网页内容": ASN:0x0-0x3c93c9-"NEAccessHelper": ASN:0x0-0x3d93d9-"Docker": ASN:0x0-0x3eb3eb-"“Safari”网页内容": ASN:0x0-0x3ec3ec-"“Safari”网页内容": ASN:0x0-0x3ed3ed-"“Safari”网页内容": ASN:0x0-0x425425-"OSDUIHelper": ASN:0x0-0x426426-"“Safari”网页内容": ASN:0x0-0x43d43d-"照片代理": 

Safari 会对应多个 ASN,每个网页内容的进程对应一个ASN


6、lsappinfo visibleProcessList

展示可以看到的进程列表对应的 ASN 列表,展示数据结构同上。

顺序为按窗口从前到后。


7、lsappinfo find

~ $ lsappinfo find kLSDisplayNameKey=网易云音乐
ASN:0x0-0x4b84b8-"网易云音乐":

使用bundleID 查询

如果应用没有启动在,不会显示结果

~ $ lsappinfo find bundleid=com.apple.iWork.Pages

~ $ lsappinfo find bundleid=com.apple.iWork.Pages
ASN:0x0-0x674674-"Pages_文稿":

使用方法: lsappinfo find [ key=value ]+

其中,key 的值可以看文章最下方的 key-values 部分


8、lsappinfo listen


~ $ lsappinfo listen +all forever
Notification: kLSNotifyApplicationInformationKeyChanged time=12/07/2018 06:52:47.176 dataRef={ "ChangeCount"=532, "LSASN"=ASN:0x0-0x66b66b:, "LSKeyBeingChanged"="NSCanQuitQuietlyAndSafelyKey", "LSPreviousValue"=true, "NSCanQuitQuietlyAndSafelyKey"=false } affectedASN="终端" ASN:0x0-0x66b66b:  context=0x0 sessionID=186a8 notificationID=0x7f9cf7f002a0

Notification: kLSNotifyFrontApplicationPresentationModeChanged time=+8.62865s  dataRef={ "LSASN"=ASN:0x0-0x19a19a:, "LSFrontASN"=ASN:0x0-0x19a19a:, "LSOtherASN"=ASN:0x0-0x66b66b:, "LSPreviousValue"="Normal", "UIPresentationMode"="Normal", "UIPresentationOptions"=-2147483648 } affectedASN="Safari 浏览器" ASN:0x0-0x19a19a:  context=0x0 sessionID=186a8 notificationID=0x7f9cf7f002a0

Notification: kLSNotifyPresentationModeChangedBecauseFrontApplicationChanged time=+0.000223041s  dataRef={ "LSASN"=ASN:0x0-0x19a19a:, "LSFrontASN"=ASN:0x0-0x19a19a:, "LSOtherASN"=ASN:0x0-0x66b66b:, "LSPreviousValue"="Normal", "UIPresentationMode"="Normal", "UIPresentationOptions"=-2147483648 } affectedASN="Safari 浏览器" ASN:0x0-0x19a19a:  context=0x0 sessionID=186a8 notificationID=0x7f9cf7f002a0


Notification: kLSNotifyMenuBarLost time=+2.30074e-05s  dataRef={ "LSASN"=ASN:0x0-0x19a19a:, "LSMenuBarOwnerApplicationSeed"=3471, "LSOtherASN"=ASN:0x0-0x66b66b: } affectedASN="终端" ASN:0x0-0x66b66b:  context=0x0 sessionID=186a8 notificationID=0x7f9cf7f002a0


Notification: kLSNotifyBecameFrontmost time=+5.05493s  dataRef={ "ApplicationType"="Foreground", "CFBundleIdentifier"="com.netease.163music", "LSASN"=ASN:0x0-0x4b84b8:, "LSFrontApplicationSeed"=4237, "LSMenuBarOwnerApplicationSeed"=3473, "LSMenuBarOwnerASN"=ASN:0x0-0x4b84b8:, "LSOtherASN"=ASN:0x0-0x66f66f: } affectedASN="网易云音乐" ASN:0x0-0x4b84b8:  context=0x0 sessionID=186a8 notificationID=0x7f9cf7f002a0

9、lsappinfo info

info    [-only    information-item-key]    [-app     app-specifier]
           [-long][app-specifier]

获取应用全部信息


~ $ lsappinfo info ASN:0x0-0x4b84b8
"网易云音乐" ASN:0x0-0x4b84b8: 
    bundleID="com.netease.163music"
    bundle path="/Applications/NeteaseMusic.app"
    executable path="/Applications/NeteaseMusic.app/Contents/MacOS/NeteaseMusic"
    pid = 74153 type="Foreground" flavor=3 Version="636" fileType="APPL" creator="????" Arch=x86_64 
    parentASN="程序坞" ASN:0x0-0x27027: 
    launch time =  2018/12/05 19:48:03 ( 1 days, 19 hours, 15 minutes, 26.4243 seconds ago )
    checkin time = 2018/12/05 19:48:05 ( 1 days, 19 hours, 15 minutes, 24.1792 seconds ago )
    launch to checkin time: 2.24509 seconds



获取应用部分信息

~ $ lsappinfo info -only  kCFBundleNameKey ASN:0x0-0x4b84b8: 
"CFBundleName"="NeteaseMusic"

获取更多的信息

Last login: Fri Dec  7 14:58:41 on ttys001
~ $ lsappinfo info -long ASN:0x0-0x60d60d:
"Ada Source"="Ada Source"
"Anything"="Anything"
"AppleScript Script Suite"="AppleScript Script Suite"
"AppleScript Script Terminology"="AppleScript Script Terminology"
"ApplicationType"="Foreground"
"Archived Debug Symbols"="Archived Debug Symbols"
"ASCII Property List"="ASCII Property List"
"Assembly Source"="Assembly Source"
"Binary Property List"="Binary Property List"
"Bourne-Again Shell Script"="Bourne-Again Shell Script"
"BuildMachineOSBuild"="17E148"
"BundleIdentifierLowerCase"="com.apple.dt.xcode"
"C Header Source"="C Header Source"
"C Precompiled Header Source"="C Precompiled Header Source"
"C Shell Script"="C Shell Script"
"C Source"="C Source"
"C++ Header Source"="C++ Header Source"
"C++ Precompiled Header Source"="C++ Precompiled Header Source"
"C++ Source"="C++ Source"
"CanBecomeFrontmost"=true
"CFBundleDevelopmentRegion"="English"
"CFBundleDisplayName"="Xcode"
"CFBundleDocumentTypes"=( { "CFBundleTypeExtensions"=( "*"), "CFBundleTypeName"="Anything", "CFBundleTypeOSTypes"=( "****"), "CFBundleTypeRole"="Viewer" }, { "CFBundleTypeExtensions"=( "mlkitmodel", "mlmodel"), "CFBundleTypeIconFile"="com.apple.coreml.model", "CFBundleTypeName"="CoreML Machine Learning Model", "CFBundleTypeRole"="Viewer", "LSIsAppleDefaultForType"=true, "LSItemContentTypes"=( "com.apple.coreml.model"), "LSTypeIsPackage"=false }, { "CFBundleTypeExtensions"=( "xcprocessorusagepoint"), "CFBundleTypeIconFile"="processorusagepoint", "CFBundleTypeName"="Processor Usage Point File", "CFBundleTypeRole"="Editor", "LSIsAppleDefaultForType"=true, "LSItemContentTypes"=( "com.apple.dt.document.xcprocessorusagepoint"), "LSTypeIsPackage"=1 }, { "CFBundleTypeExtensions"=( "xcprocessorusagelog"), "CFBundleTypeIconFile"="processorusagepoint", "CFBundleTypeName"="Processor Usage Log File", "CFBundleTypeRole"="Editor", "LSIsAppleDefaultForType"=true, "LSItemContentTypes"=( "com.apple.dt.document.xcprocessorusagelog"), "LSTypeIsPackage"=0 })
"CFBundleExecutable"="Xcode"
"CFBundleExecutablePath"="/Applications/Xcode.app/Contents/MacOS/Xcode"
"CFBundleExecutablePathDeviceID"=16777224
"CFBundleExecutablePathINode"=3275900
"CFBundleHelpBookFolder"="Xcode.help"
"CFBundleHelpBookName"="com.apple.dt.Xcode.help"
"CFBundleIconFile"="Xcode"
"CFBundleIdentifier"="com.apple.dt.Xcode"
"CFBundleInfoDictionaryVersion"="6.0"
"CFBundleName"="Xcode"
"CFBundleNameLowerCase"="xcode"
"CFBundleNumericVersion"=0
"CFBundlePackageType"="APPL"
"CFBundleShortVersionString"="9.3.1"
"CFBundleSignature"="????"
"CFBundleSupportedPlatforms"=( "MacOSX")
"CFBundleVersion"="14154.1"
"ChangeCount"=534
"Compiled Core Data Model"="Compiled Core Data Model"
"Core Data Mapping Model"="Core Data Mapping Model"
"Core Data Model"="Core Data Model"
"Developer Profile"="Developer Profile"
"Developer Provisioning Profile"="Developer Provisioning Profile"
"Documentation Set"="Documentation Set"
"DTCompiler"="com.apple.compilers.llvm.clang.1_0"
"DTPlatformBuild"="9E499"
"DTPlatformVersion"="GM"
"DTSDKBuild"="17E158"
"DTSDKName"="macosx10.13internal"
"DTXcode"="0930"
"DTXcodeBuild"="9E499"
"DVTPlugInCompatibilityUUID"="EE23884D-A5C0-4163-94CF-DBBF3A5ED8D6"
"Flavor"=3
"Fortran Source"="Fortran Source"
"Hidden"=false
"Interface Builder NIB Document"="Interface Builder NIB Document"
"Interface Builder XIB Document"="Interface Builder XIB Document"
"Java Class"="Java Class"
"Java Source"="Java Source"
"Korn Shell Script"="Korn Shell Script"
"Lex Source"="Lex Source"
"LSApplicationCategoryType"="public.app-category.developer-tools"
"LSApplicationHasRegistered"=true
"LSApplicationHasSignalledItIsReady"=true
"LSApplicationReadyToBeFrontableKey"=true
"LSApplicationWouldBeTerminatedByTALKey"=false
"LSArchitecture"="x86_64"
"LSASN"=ASN:0x0-0x60d60d:
"LSBundlePath"="/Applications/Xcode.app"
"LSBundlePathDeviceID"=16777224
"LSBundlePathINode"=2948310
"LSBundlePathLastComponentLowerCaseKey"="xcode.app"
"LSCheckInTime*"=2018/12/07 10:23:39
"LSDisplayName"="Xcode"
"LSEnvironment"={ "MallocNanoZone"="0" }
"LSExecutableFileName"="Xcode"
"LSExecutableFilenameLowerCaseKey"="xcode"
"LSExecutableFormat"="LSExecutableMachOFormat"
"LSLaunchDLabel"="com.apple.dt.Xcode.12956"
"LSLaunchedByLaunchServices"=true
"LSLaunchedHidden"=false
"LSLaunchedWithLaunchD"=true
"LSLaunchEventRecordTime"=1839177878938013
"LSLaunchTime"=2018/12/07 10:23:39
"LSMinimumSystemVersion"="10.13.2"
"LSParentASN"=ASN:0x0-0x27027:
"LSWantsAttention"=false
"LSWantsToComeForwardAtRegistrationTimeKey"=true
"Makefile"="Makefile"
"Markdown Document"="Markdown Document"
"Metal Shader Source"="Metal Shader Source"
"Mig Definition"="Mig Definition"
"nasm Assembly Source"="nasm Assembly Source"
"NSAppleScriptEnabled"=true
"NSCanQuitQuietlyAndSafelyKey"=true
"NSContactsUsageDescription"="Xcode can pair your contacts with Source Control users for enhanced collaboration."
"NSExtensionSDK"={ "com.apple.dt.Xcode.extension.source-editor"={ "CFBundlePackageType"="XPC!", "NSExtension"={ "NSExtensionAttributes"={ "NSExtensionPointName"="com.apple.dt.Xcode.extension.source-editor", "NSExtensionVersion"="1.0" }, "NSExtensionContextClass"="XCExtensionServiceContext", "NSExtensionContextHostClass"="XCExtensionHostContext", "NSExtensionPrincipalClass"="XCExtensionPrincipalClass", "NSExtensionProtocol"="NSObject", "PrincipalClass"="NSObject", "Subsystems"=( "XCExtensionSubsystem") }, "NSExtensionPointIdentifier"="com.apple.dt.Xcode.extension.source-editor", "XPCService"={ "_AdditionalSubServices"={ "apple-extension-service"=true }, "_LaunchWatchdogTimeOut"=180, "JoinExistingSession"=true, "RunLoopType"="NSRunLoop", "ServiceType"="Application" } } }
"NSHumanReadableCopyright"="Copyright © 1999–2018 Apple Inc. All rights reserved."
"NSMainNibFile"="MainMenu"
"NSPrincipalClass"="IDEApplication"
"NSServices"=( { "NSMenuItem"={ "default"="Open Quickly in Xcode" }, "NSMessage"="openQuickly", "NSPortName"="Xcode", "NSRestricted"=false, "NSSendTypes"=( "NSStringPboardType") }, { "NSMenuItem"={ "default"="Find in Xcode" }, "NSMessage"="batchFind", "NSPortName"="Xcode", "NSRestricted"=false, "NSSendTypes"=( "NSStringPboardType") })
"NSSupportsAutomaticGraphicsSwitching"=true
"NSSupportsAutomaticTermination"=true
"NSSupportsSuddenTermination"=true
"Objective-C Source"="Objective-C Source"
"Objective-C++ Source"="Objective-C++ Source"
"OSAScriptingDefinition"="Xcode.sdef"
"Pascal Source"="Pascal Source"
"Perl Source"="Perl Source"
"pid"=24183
"Property List"="Property List"
"Python Source"="Python Source"
"Rez Source"="Rez Source"
"Rich Text Document"="Rich Text Document"
"Rich Text Document with Attachments"="Rich Text Document with Attachments"
"Ruby Source"="Ruby Source"
"Script"="Script"
"Scripting Definition"="Scripting Definition"
"Shell Script"="Shell Script"
"Source Code"="Source Code"
"Strings File"="Strings File"
"Stringsdict File"="Stringsdict File"
"Symbol Export"="Symbol Export"
"Tenex C Shell Script"="Tenex C Shell Script"
"Text Document"="Text Document"
"UIPresentationMode"="Normal"
"UIPresentationOptions"=0
"UTExportedTypeDeclarations"=( { "UTTypeConformsTo"=( "com.apple.package"), "UTTypeDescription"="GPU Trace", "UTTypeIdentifier"="com.apple.gputools.gputrace", "UTTypeTagSpecification"={ "public.filename-extension"=( "gputrace") } }, { "UTTypeConformsTo"=( "public.data"), "UTTypeDescription"="SpriteKit Serialized Data", "UTTypeIdentifier"="com.apple.spritekit.serialized", "UTTypeTagSpecification"={ "public.filename-extension"=( "sks") } }, { "UTTypeConformsTo"=( "public.3d-content", "public.data"), "UTTypeDescription"="Geometry Definition File Format", "UTTypeIdentifier"="public.geometry-definition-format", "UTTypeTagSpecification"={ "public.filename-extension"=( "obj") } }, { "UTTypeConformsTo"=( "public.3d-content", "public.data"), "UTTypeDescription"="Standard Tesselated Geometry File Format", "UTTypeIdentifier"="public.standard-tesselated-geometry-format", "UTTypeTagSpecification"={ "public.filename-extension"=( "stl") } }, { "UTTypeConformsTo"=( "public.3d-content", "public.data"), "UTTypeReferenceURL"="http://developer.apple.com/tools/xcode/", "UTTypeTagSpecification"={ "public.filename-extension"=( "docset") } }, { "UTTypeConformsTo"=( "public.xml"), "UTTypeDescription"="XML Localization Interchange File Format", "UTTypeIconFile"="XLIFF_Icon.icns", "UTTypeIdentifier"="org.oasis-open.xliff", "UTTypeReferenceURL"="http://docs.oasis-open.org/xliff/xliff-core/xliff-core.html", "UTTypeTagSpecification"={ "public.filename-extension"=( "xliff", "xlf"), "public.mime-type"=( "application/x-xliff+xml") } })
"Versioned Core Data Model"="Versioned Core Data Model"
"Xcode Configuration Settings"="Xcode Configuration Settings"
"Xcode DVT Plug-in"="Xcode DVT Plug-in"
"Xcode IDE Plug-in"="Xcode IDE Plug-in"
"Xcode Project"="Xcode Project"
"Xcode Project Data"="Xcode Project Data"
"Xcode Scheme"="Xcode Scheme"
"Xcode Snapshot"="Xcode Snapshot"
"Xcode User Settings"="Xcode User Settings"
"Xcode Workspace"="Xcode Workspace"
"XML Document"="XML Document"
"XML Property List"="XML Property List"
"Yacc Source"="Yacc Source"
"Zsh Script"="Zsh Script"
~ $ 


三、key-values

Keys



kCFBundleNameKey
kLSASNKey
kLSASNToBringForwardAtNextApplicationExitKey
kLSAllowedToBecomeFrontmostKey
kLSApplicationBackgroundOnlyTypeKey
kLSApplicationBackgroundPriorityKey
kLSApplicationCountKey
kLSApplicationDesiresAttentionKey,
kLSApplicationForegroundPriorityKey
kLSApplicationForegroundTypeKey
kLSApplicationHasRegisteredKey
kLSApplicationHasSignalledItIsReadyKey
kLSApplicationInStoppedStateKey
kLSApplicationInThrottledStateAfterLaunchKey
kLSApplicationInformationSeedKey
kLSApplicationIsHiddenKey
kLSApplicationListSeedKey
kLSApplicationReadyToBeFrontableKey
kLSApplicationTypeKey
kLSApplicationTypeToRestoreKey
kLSApplicationUIElementTypeKey
kLSApplicationVersionKey
kLSApplicationWasTerminatedByTALKey
kLSApplicationWouldBeTerminatedByTALKey
kLSArchitectureKey
kLSBundleIdentifierLowerCaseKey
kLSBundlePathDeviceIDKey
kLSBundlePathINodeKey
kLSBundlePathKey
kLSCheckInTimeKey
kLSDebugLevelKey
kLSDisplayNameKey
kLSExecutableFormatCFMKey
kLSExecutableFormatKey
kLSExecutableFormatMachOKey
kLSExecutableFormatPoundBangKey
kLSExecutablePathDeviceIDKey
kLSExecutablePathINodeKey
kLSExecutablePathKey
kLSExitStatusKey
kLSFileCreatorKey
kLSFileTypeKey
kLSFlavorKey
kLSFrontApplicationSeedKey
kLSHiddenApplicationCountKey
kLSLaunchTimeKey
kLSLaunchedByLaunchServicesKey
kLSLaunchedByLaunchServicesThruForkExecKey
kLSLaunchedByLaunchServicesThruLaunchDKey
kLSLaunchedByLaunchServicesThruSessionLauncherKey
kLSLaunchedInQuarantineKey
kLSMenuBarOwnerApplicationSeedKey
kLSModifierLaunchedForPersistenceKey
kLSModifierRefConKey
kLSNotifyBecameFrontmostAnotherLaunchKey
kLSNotifyBecameFrontmostFirstActivationKey
kLSNotifyLaunchRequestLaunchModifiersKey
kLSOriginalExecutablePathDeviceIDKey
kLSOriginalExecutablePathINodeKey
kLSOriginalExecutablePathKey
kLSOriginalPIDKey
kLSPIDKey
kLSParentASNKey
kLSParentASNWasInferredKey
kLSPersistenceSuppressRelaunchAtLoginKey
kLSPreviousASNKey
kLSPreviousPresentationModeKey
kLSPreviousValueKey
kLSRecordingAppleEventsKey
kLSRequiresCarbonKey
kLSRequiresClassicKey
kLSSessionIDKey
kLSShellExecutablePathKey
kLSUIDsInSessionKey
kLSUIPresentationModeAllHiddenValue
kLSUIPresentationModeAllSuppressedValue
kLSUIPresentationModeContentHiddenValue
kLSUIPresentationModeContentSuppressedValue
kLSUIPresentationModeKey
kLSUIPresentationModeNormalValue
kLSUIPresentationOptionsKey
kLSUnhiddenApplicationCountKey
kLSVisibleApplicationCountKey
kLSVisibleApplicationListSeedKey
kLSWantsToComeForwardAtRegistrationTimeKey
           
           
launchedThrottled
allowedtobecomefrontmost
applicationTypeToRestore
applicationWasTerminatedByTAL
applicationtype
arch
asn
bundleid
bundlelastcomponent
bundlename
bundlenamelc
bundlepath
changecount
creator
debuglevel
displayname
execpath
executablepath
filecreator
filename
filetype
hidden
isconnectedtowindowserver
isready
isregistered
isstopped
isthrottled
launchedForPersistence
launchedinquarantine
name
parentasn
pid
presentationmode
presentationoptions
psn
recordingAppleEvents
session
shellpath
supressRelaunch
version



Values



       In numerous places a key can be set to a value. The format of value can
       be any of the following

       o   "string" A string, surrounded by double quotes.

       o   numeric-digits   |  -numeric-digits  |  numeric-digits.numeric-dig-
           its[E]numeric-digits A numeric value, either an integer type  or  a
           double floating point type.

       o   $hex-digits A numeric value given by the hex value hex-digits.

       o   "ASN:0xAAAA:0xBBBB:" An ASN, where AAAA and BBBB are the values for
           an application ASN.

       o   App:str An ASN, where str matches one of the  application-specifier
           formats.

       o   ( [[str,] str] ) A CFArrayRef, where each str is converted as if it
           were a key value.

       o   true The kCFBooleanTrue value.

       o   false The kCFBooleanFalse value.

       o   null The kCFNull value.

       o   Any of the application information item, or launch modifier strings
           The  equivalent,  exported  LaunchServices  CFStringRef key for the
           item or launch modifier.

猜你喜欢

转载自blog.csdn.net/lovechris00/article/details/84875167