Posts

Post marked as solved
2 Replies
3.7k Views
I have an app I developed for internal company use outside of xcode (python/pyinstaller based application). The app is a normal double-clickable application with the usual internal structure, as far as I can tell. In order to ease deployment, I figured I'd go ahead and code sign it using my Developer ID, which I did with the following command:codesign --deep -f -s "Developer ID Application" SO2\ Explorer.appWhich ran without complaint. I can then check that it was applied using the command:codesign -dv --strict --verbose=4 SO2\ Explorer.appwhich gives the following output:Executable=/Users/israel/Desktop/SO2 Explorer.app/Contents/MacOS/SO2 Explorer Identifier=edu.alaska.avo.so2explorer Format=app bundle with Mach-O thin (x86_64) CodeDirectory v=20200 size=26842 flags=0x0(none) hashes=833+3 location=embedded VersionPlatform=1 VersionMin=657152 VersionSDK=658176 Hash type=sha256 size=32 CandidateCDHash sha1=d0fd8ca348696e3e8ed218658a4a19de0f0fa346 CandidateCDHash sha256=c45d6c5c00a7dd457a55c37828f3b3953049f8dd Hash choices=sha1,sha256 Page size=4096 CDHash=c45d6c5c00a7dd457a55c37828f3b3953049f8dd Signature size=9012 Authority=Developer ID Application: Israel Brewster (59ED27HUEF) Authority=Developer ID Certification Authority Authority=Apple Root CA Timestamp=Mar 21, 2019 at 2:19:59 PM Info.plist entries=10 TeamIdentifier=59ED27HUEF Sealed Resources version=2 rules=13 files=1222 Internal requirements count=1 size=188which all looks good to me. However, if I check it using the spctl tool:spctl --assess -v --raw SO2\ Explorer.appthe application is rejected:SO2 Explorer.app: rejected (the main executable or Info.plist must be a regular file (no symlinks, etc.)) <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>assessment:authority</key> <dict> <key>assessment:authority:flags</key> <integer>0</integer> <key>assessment:authority:source</key> <string>obsolete resource envelope</string> <key>assessment:authority:weak</key> <true/> </dict> <key>assessment:cserror</key> <integer>-67015</integer> <key>assessment:remote</key> <true/> <key>assessment:verdict</key> <false/> </dict> </plist>And, in fact, if I try to run the app on a machine with gatekeeper enabled, you do get the "can not open this app due to unidentified developer" warning.What's the problem here, and how do I fix it? The first line of output would seem to indicate that it thinks that either the main executable or Info.plist file is not a regular file, but that is not the case - both are regular files:israel$ ls -l SO2\ Explorer.app/Contents/Info.plist -rw------- 1 israel staff 436 Mar 21 14:07 SO2 Explorer.app/Contents/Info.plist israel$ file SO2\ Explorer.app/Contents/Info.plist SO2 Explorer.app/Contents/Info.plist: Apple binary property list israel$ ls -l SO2\ Explorer.app/Contents/MacOS/SO2\ Explorer -rwxr-xr-x 1 israel staff 3471792 Mar 21 14:19 SO2 Explorer.app/Contents/MacOS/SO2 Explorer israel$ file SO2\ Explorer.app/Contents/MacOS/SO2\ Explorer SO2 Explorer.app/Contents/MacOS/SO2 Explorer: Mach-O 64-bit executable x86_64I'm also noting the entry about "obsolete resource envelope", though I don't know if that means anything.Any thoughts? Thanks!
Posted
by ibrewster.
Last updated
.
Post marked as solved
7 Replies
1.7k Views
I have an application I wrote a while ago that uses the ScriptingBridge framework to interact with iTunes, both getting information from iTunes (such as the current player position or track lyrics) as well as controlling iTunes (such as play/pause or previous/next track). With the update to Mac OS X Catlina, and the replacement of iTunes with Music.app, this obviously stopped working. I was hoping updating it would be a simple matter of replacing references to iTunes with references to Music, and inital indications were good: a quick look at the Music.app scripting dictionary revealed many, if not all the same script commands being available, and switching out the app identifiers in my code (and the entitlements file) enabled a succesfull build.Unfortunately, when I ran it, nothing worked. I didn't get any errors - either in the application run log or the system console (for example, I didn't see any sandbox errors indicating that I messed up the entitlements) - but nothing functioned. Digging deeper, I discovered that every command I tried to send to the SBApplication instance returned "nil", or in some cases, a default value such as 0. From what I can tell, however, the SBApplication was initalized correctly. The code I used for initalization is this:Music=[[SBApplication applicationWithBundleIdentifier:@"com.apple.Music"] retain];(Where Music is a MusicApplication * defined on the @interface), and if I do a "po Music" in the debugger prompt I get this:<SBScriptableApplication @0x600000c88810: application "Music" (33039)>Which seems to indicate it is initialized. So that's good. However, if I do, for example, a "po [Music version]" from the debugger, I get nil. "po [Music playpause]" simularly returns nil, which might be correct in that case, but Music.app does NOT play or pause. playerPosition always returns 0. On the other hand, more fundamental commands, like isRunning, quit, and run, do seem to work, indicating that at some level things are working and I do have the correct linkages set up. So what am I missing? What do I need to change to get the app working with Music.app rather than iTunes?
Posted
by ibrewster.
Last updated
.