I feel like Im completely missing the boat here and feel stupid even asking this question but I cant seem to make Xojo set the creator code of an app. No matter what I change my package info file always says APPL??? this app is old enough that it used to have a creator code! But no more. I didnt remove it. Changing the package info field in the shared tab and that doesnt seem to actually do anything.
I know that its ancient and no longer mostly used, but certain things still complain if its not set right. In my app both the PackageInfo file says APPL??? and the CFBundleSignature in the plist file that is created with the app says just ???
Where did my creator code go? And can I still enter one or are all apps now built saying they are ??? ?
I understand they are dead, Im not actually using them for anything myself. I have several users talking to my apps directly with some home brew apps written in old versions of both Obj-c and even xojo from back when it was real basic The apple events that they send are targeted by the creator code and not the bundle ID as is done now days. This seems to still work even in El Capitan if you actually set it. I just want to let people that are sending me apple events from old legacy but still working code of their own to still be able to do so without having to manually go into the bundle and edit my resources each time I release a new version.
I suppose I can script during the build process a defaults write and the copying in of a prepared packageInfo file if thats what Ive got to do. I was just hoping that I had somehow missed a setting somewhere.
App Wrapper also reports this as an error every time I wrap up the app to get it ready for testing… This isnt a problem then? Is it still required that we include the CFBundleSignature key in the plist file and the packageInfo file?
Targeting apple events by creator codes - fun
Haven’t done that in a while since you can use the bundle id instead
I’ve done that to talk to BBEdit
Creator code is literally gone from the IDE because its not used
So you will probably have to set the PkgInfo with a custom code and a build step
[quote=245014:@James Sentman]
App Wrapper also reports this as an error every time I wrap up the app to get it ready for testing… [/quote]
Reports “this” ? Whats “this” ?
That the PkgInfo has no creator code or ???
app wrapper doesnt like the ??? as the value, it tells me this every time I wrap an app. I just compiled an empty project to see if I only have this old dead data in there because these project files are so old that the values are still in there somewhere, but xojo creates the packageInfo file and adds the CFBundleSignature both set to ??? even in a brand new app. Should that just be removed then? At the moment if I add a CFBundleSignature to my additional info.plist file it is NOT carried across to the compiled app but is overridden with the ???. If the IDE stopped adding ??? then perhaps I could add this to my info.plist file and it would come across? Then adding a copy step for the packetInfo file would be easy. Or is there a reason why that needs to be there and set to ??? for new apps still? I would guess that leaving it out entirely would be the thing to do if it was no longer used rather than forcing it to ???.
Interesting as the second document states that the CFBundleSignature should be in the plist.
The message that App Wrapper reports isn’t that helpful; you can add your own code on the Info pane of the application, CFBundleSignature is the key. Just keep it to 4 characters.
In the mean time, I’ll have a poke at Apple’s apps to see what they do.
I could also get App Wrapper to auto generate a 4 char string, based upon the bundle identifier.
Here Apples apps have a unique code in there (sfri, emal, etc)
So it seems Apples unclear advice isn’t that useful or followed by them (how lovely and unsurprising)
I suppose if its set app wrapper could pull CFBundleSignature out & stick it in the pkginfo file
However that wont help folks who want to generate a Mac app from Windows or Linux that has it set unless they wrap the app
I’ll prod Joe & see if he has any flashes of brilliance about this
A copy file step with an 8 byte file set up as “APPLxxxx” where xxxx is the 4 char creator code would suffice on all targets
I just tried it and it does work if you copy to the Contents dir
Interestingly enough this is the first time anyones even mentioned the PkgInfo file since we made this change in 2014
[quote=245252:@Norman Palardy]Here Apples apps have a unique code in there (sfri, emal, etc)
So it seems Apples unclear advice isn’t that useful or followed by them (how lovely and unsurprising)[/quote]
IIRC in the old days, 3rd party devs were prohibited from using lower case characters.
Apple: Do as I say, not as I do.
Point in case, their own apps that ship with the OS do not adhere to the code signing rules!
App Wrapper currently doesn’t know about PkgInfo files (I haven’t told it about them yet), so it only pays attention to the “CFBundleSignature” plist entry.
But it is something that I could teach it about.
I’m thinking right now, that if this field is set to “???” or doesn’t exist, it auto generates it based upon the bundle identifier, as it can be manually added via the “Info” pane of App Wrapper.
I guess the next step is to teach it to make sure the PkgInfo matches.
[quote=245254:@Sam Rowlands]IIRC in the old days, 3rd party devs were prohibited from using lower case characters.
Apple: Do as I say, not as I do.[/quote]
They only reserved all-lowercase creator codes and types. I think that’s a perfectly reasonable trade off given the limitations of the time.
If its hard coded to ??? then what is the package Info field in the shared tab of the build information section of a project? Ive tried putting different things in there but it doesnt seem to change anything. I know there is an application class property that returns that, is that just so you can put some info in there that you might want to retrieve from the app class in runtime?
In my programs I save text file using “Stream.Write MyText” and I set MyFile.MacCreator and MyFile.MacType .
I disabled those lines using ’ .
When I search my creator code in Xojo IDE, it found constant App.MacCreator = “PGsr” (my creator code) and Build Automation.Mac OS X.Creator Code = “PGsr” .
How can I remove them ? And if I wanted to change them ? Usually when we click in the search result list, it bring us to the good place, but not it those case.
Edit : I read the link gaved by Norman and then the Xojo Help File Types. I loose my documents icon after removed the MacCreator of the document file but it came back when I set my application according to the Xojo hep page.