Re: Question about Info.plist's

2020-08-19 Thread Michael Hall via Cocoa-dev


> On Aug 19, 2020, at 10:04 PM, Ben Kennedy  wrote:
> 
> 
>> On 19 Aug 2020, at 7:45 pm, Michael Hall via Cocoa-dev 
>>  wrote:
>> 
>> Something else I’m curious about is doesn’t this somehow invalidate any 
>> application signing that’s been done?
> 
> Code signing happens last, even if you put your shell script phase at the 
> very bottom. (Observe the build output in the Report Navigator.)
> 
> b
> 

Thanks.

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Question about Info.plist's

2020-08-19 Thread Ben Kennedy via Cocoa-dev

> On 19 Aug 2020, at 7:45 pm, Michael Hall via Cocoa-dev 
>  wrote:
> 
> Something else I’m curious about is doesn’t this somehow invalidate any 
> application signing that’s been done?

Code signing happens last, even if you put your shell script phase at the very 
bottom. (Observe the build output in the Report Navigator.)

b

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Question about Info.plist's

2020-08-19 Thread Michael Hall via Cocoa-dev


> On Aug 19, 2020, at 9:04 PM, Michael Hall  wrote:
> 
> 
> I’m not familiar with the Plistbuddy that’s been mentioned. 

I see that is in fact builtin. Wasn’t aware. Something else I’m curious about 
is doesn’t this somehow invalidate any application signing that’s been done?
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Question about Info.plist's

2020-08-19 Thread Michael Hall via Cocoa-dev


> On Aug 19, 2020, at 11:07 AM, Gabriel Zachmann via Cocoa-dev 
>  wrote:
> 
> Question:
> 
> Is there a way to use a key/value that was defined earlier in the plist file
> to define a value for a later key?
> 

Maybe off-topic but this used to be supported for Java applications for pre-set 
variables. I’m not remembering exactly for what . Directories, I think, like 
$APPDIR could be referenced anywhere.

I’m not familiar with the Plistbuddy that’s been mentioned. But I’ve written 
java code to parse, modify and create plist files. If not the bin ones then 
they are XML so a parser for that can be used. It’s been sometimes handy for 
java applications like when Apple’s apps cut over to Oracle ones. I had code 
that could handle simple application conversions or provide a starting 
framework for more complex app’s. 

More off-topic. I was recently looking at that code again. A (java) application 
I sometimes use  had added a nice new Python interface. It didn’t seem to work 
for me because it was trying to use an old python 2, instead of the 3,7.3 I got 
by having Anaconda installed. After some discussion on the app mailing list it 
was mentioned that Anaconda did some things in .bash_profile. 
I found that if I did a Terminal execution of the app like…

/Applications/weka-3-9-3-corretto-jvm.app/Contents/MacOS/JavaAppLauncher

It ran correctly, picking up my current user .bash_profile. Normally OS X 
applications don’t seem to pick this up but get a very stripped down bash 
environment. 

I suspected changes to the PATH environment variable might be all that the new 
app needed. I couldn’t figure out an easy way to change that at execution time. 
So I was thinking of parsing the info.plist and adding LSEnvironment, 
environment variable entries myself for PATH and maybe any other Anaconda 
related. So I would have a script that would do something like…

env | java plistparser

I decided first to try and see if I could use the XCode plist editor to make 
the changes manually. It didn’t work. It seemed like in the past you had to do 
something like duplicate the application to get plist changes to take effect? 
But I didn’t want to get into that. Or it might be that PATH is not an 
environment variable that can be plist changed? I would be sort of curious to 
know if that is the case if anyone knows? 
Anyhow, at that point it seemed easier for my own use simply to have an alias 
in my .bash_profile to the above command line application invocation.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Question about Info.plists

2020-08-19 Thread Alex Zavatone via Cocoa-dev
Here’s the info from my StackOverflow answer.

https://stackoverflow.com/a/55525399/1058199

Over the years, Apple has come up with several manners of changing version and 
build numbers. Many of them are now outdated and poor practice. Changing 
CURRENT_PROJECT_VERSION modifies values within your project's project.pbxproj 
file and if you are running a distributed team, this will cause merge conflicts 
if the other half of the team tries to update and while they were asleep, you 
updated this internal value. If you are using pods, you'll get several more 
merge conflicts per pod that you add to the project. 

So, CURRENT_PROJECT_VERSION?

Don't use it.

Within the info.plist file are these keys. 

CFBundleVersion
CFBundleShortVersionString
Use CFBundleVersion for your app's build number. Use CFBundleShortVersionString 
for your app's version number. 

Use Plistbuddy to do it. 

CFBundleShortVersionString
3.0.7
CFBundleVersion
934


Try the script below.

#!/bin/sh

# To make executable, use: chmod u+x 
Build-Versioning-Scripts/Increment_Build_Number.sh
# to locate your target's info.plist use
# ${PRODUCT_SETTINGS_PATH}

echo ""
echo "Info.plist for target: ${PRODUCT_SETTINGS_PATH}"

buildNum=$(/usr/libexec/Plistbuddy -c "Print CFBundleVersion" 
"${PRODUCT_SETTINGS_PATH}")
echo "Current build #: $buildNum"

if [ -z "$buildNum" ]; then
echo "No build number found in $PRODUCT_SETTINGS_PATH"
exit 2
fi

buildNum=$(expr $buildNum + 1)
echo "Build # incremented to: $buildNum"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNum" 
"$PRODUCT_SETTINGS_PATH"
echo ""
exit 0
By adding this script to your build or archive process on your build machine, 
this will automatically update the app's build number. If you wish to increment 
your app's versionnumber, change CFBundleShortVersionString (Bundle versions 
string, short) in the info.plist manually. 


> On Aug 19, 2020, at 3:07 PM, Alex Zavatone via Cocoa-dev 
>  wrote:
> 
> I have build scripts that do that based on the # of the git checkins.
> 
> I’ll send you the projects.
> 
> 
>> On Aug 19, 2020, at 11:07 AM, Gabriel Zachmann via Cocoa-dev 
>>  wrote:
>> 
>> Question:
>> 
>> Is there a way to use a key/value that was defined earlier in the plist file
>> to define a value for a later key?
>> 
>> Explanation:
>> I have a macOS project with an automatically created "About" window.
>> The plist file has, additionally to all the default stuff, the key 
>> CFBuildNumber (with a value that I increment automatically).
>> 
>> In Xcode, I tried to change "Bundle version" to a value like
>> 
>>  $(CURRENT_PROJECT_VERSION)_$(CFBuildNumber)
>> 
>> However, in the final Info.plist in the app's bundle, this then looks like
>> 
>>   CFBundleVersion
>>   3.1_
>> 
>> Notice the underscore, but the value of CFBuildNumber is gone.
>> "3.1", BTW, is the value I have set under
>> 
>>   Project / Targets / General / Identity / Build
>> 
>> I have tried to change parentheses into curly braces, to no avail.
>> 
>> So, question again: is there a way to use a key/value that was defined 
>> earlier in the plist file
>> to define a value for a later key?
>> I'd like to do that so that the "About" window contains the build number, 
>> too.
>> 
>> Thanks a lot in advance.
>> 
>> 
>> ___
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>> 
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
>> 
>> This email sent to z...@mac.com
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
> 
> This email sent to z...@mac.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Question about Info.plists

2020-08-19 Thread Alex Zavatone via Cocoa-dev
I have build scripts that do that based on the # of the git checkins.

I’ll send you the projects.


> On Aug 19, 2020, at 11:07 AM, Gabriel Zachmann via Cocoa-dev 
>  wrote:
> 
> Question:
> 
> Is there a way to use a key/value that was defined earlier in the plist file
> to define a value for a later key?
> 
> Explanation:
> I have a macOS project with an automatically created "About" window.
> The plist file has, additionally to all the default stuff, the key 
> CFBuildNumber (with a value that I increment automatically).
> 
> In Xcode, I tried to change "Bundle version" to a value like
> 
>   $(CURRENT_PROJECT_VERSION)_$(CFBuildNumber)
> 
> However, in the final Info.plist in the app's bundle, this then looks like
> 
>CFBundleVersion
>3.1_
> 
> Notice the underscore, but the value of CFBuildNumber is gone.
> "3.1", BTW, is the value I have set under
> 
>Project / Targets / General / Identity / Build
> 
> I have tried to change parentheses into curly braces, to no avail.
> 
> So, question again: is there a way to use a key/value that was defined 
> earlier in the plist file
> to define a value for a later key?
> I'd like to do that so that the "About" window contains the build number, too.
> 
> Thanks a lot in advance.
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
> 
> This email sent to z...@mac.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Question about Info.plist's

2020-08-19 Thread Ben Kennedy via Cocoa-dev

> On 19 Aug 2020, at 11:47 am, Gabriel Zachmann via Cocoa-dev 
>  wrote:
> 
> I tried this:
> 
>  plutil -replace CFBundleVersion -string '$(CURRENT_PROJECT_VERSION) 111' 
> qq.plist
> 
> which works -- but what I need to do is something like this:
> 
>  plutil -replace CFBundleVersion -string "\$(CURRENT_PROJECT_VERSION) 
> $build_number" qq.plist

You've changed the escaping and quoting between these two invocations, which 
surely accounts for the difference in behaviour. This should work:

> plutil -replace CFBundleVersion -string "$CURRENT_PROJECT_VERSION 
> $build_number" qq.plist

Bash (which I presume you're invoking the script with) interprets parentheses 
differently from the Xcode preprocessor; it runs the contained string as a 
command and substitutes the output. The build system exports all the build 
settings to the environment, so `CURRENT_PROJECT_VERSION` ends up being as much 
a shell variable as `build_number`.

All that said, by doing this you're going to end up with an ill-formatted 
CFBundleVersion. Per 
https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102364
 :

> The build version number should be a string comprised of three non-negative, 
> period-separated integers with the first integer being greater than zero—for 
> example, 3.1.2. The string should only contain numeric (0-9) and period (.) 
> characters. 

The space breaks this. If you need a compound identifier like this, put it in a 
custom key in the Info.plist.

-ben

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Question about Info.plist's

2020-08-19 Thread Gabriel Zachmann via Cocoa-dev
Thanks a lot for the insights.

> On 19. Aug 2020, at 18:44, Glenn L. Austin  wrote:
> 
> No, you can't use an "earlier" key to create a "later" value - but you can 
> use code to do basically the same thing.
> 
> Or, you can use the same variable that sets your CFBuildNumber to set your 
> CFBundleVersion.
> 

I tried this:

  plutil -replace CFBundleVersion -string '$(CURRENT_PROJECT_VERSION) 111' 
qq.plist

which works -- but what I need to do is something like this:

  plutil -replace CFBundleVersion -string "\$(CURRENT_PROJECT_VERSION) 
$build_number" qq.plist

(where $build_number is a variable in my shell script).

Problem: I get the error message "Illegal variable name."
(I am not even sure whether it is a shell euro message or from plutil...)

I tried more variations, like

   plutil -replace CFBundleVersion -string "\\$\(CURRENT_PROJECT_VERSION\) 111" 
qq.plist

all to no avail ...




smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Question about Info.plist's

2020-08-19 Thread Ben Kennedy via Cocoa-dev


> On 19 Aug 2020, at 9:07 am, Gabriel Zachmann via Cocoa-dev 
>  wrote:
> 
> The plist file has, additionally to all the default stuff, the key 
> CFBuildNumber (with a value that I increment automatically).
> 
> In Xcode, I tried to change "Bundle version" to a value like
> 
>   $(CURRENT_PROJECT_VERSION)_$(CFBuildNumber)

As an aside, it strikes me as a dubious idea to call the latter 
"CFBuildNumber". That sounds like the name of a well-known CoreFoundation key, 
but as far as I can tell, it isn't one. (A Google search for "cfbuildnumber 
site:apple.com" yields only two results for me, one of which is a Tech Note 
that seems to contain errors [1]).

To avoid false inferences or potential confusion, if it were me I would use a 
completely different name for the key, such as "MyProjectBuildNumber" or 
whatever. (But why not just take advantage of the existing 
CFBundleShortVersionString and CFBundleVersion?)

-ben

[1] https://developer.apple.com/library/archive/technotes/tn2259/_index.html:  
Under the heading "What's Next", about a third of the way down, the text seems 
to confuse "CFBundleVersion" with what's actually CFBundleShortVersionString, 
and "CFBuildNumber" with what's actually CFBundleVersion. I've just filed a bug 
report on this: FB8464082.

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Question about Info.plist's

2020-08-19 Thread Marco S Hyman via Cocoa-dev
On Aug 19, 2020, at 11:11 AM, Saagar Jha via Cocoa-dev 
 wrote:
> 
> Which file are you modifying? The one in your source directory? Because the 
> one that goes in the final product doesn’t get copied over until after you’ve 
> lost most control over the build process (it’s done by Xcode after the normal 
> build stages).

My build script generates the values for CFBundleBuildVersion, 
CFBundleShortVersionString, and CFBundleVersion.  It uses PlistBudy to update 
the values.  The plist it updates is

   # Run Script build phases that operate on product files of the target that 
defines
   # them should use the value of this build setting [TARGET_BUILD_DIR].
   #
   INFO_PLIST="${TARGET_BUILD_DIR}/${INFOPLIST_PATH}”

Works a charm.

Marc
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Question about Info.plist's

2020-08-19 Thread Saagar Jha via Cocoa-dev
Which file are you modifying? The one in your source directory? Because the one 
that goes in the final product doesn’t get copied over until after you’ve lost 
most control over the build process (it’s done by Xcode after the normal build 
stages).

> On Aug 19, 2020, at 09:58, Owen Hartnett via Cocoa-dev 
>  wrote:
> 
> You can also use a build script that calls PlistBuddy to alter the contents 
> of a plist called using a Run Script in Build Phases just before Compile 
> Sources.  I used to use one to apply the subversion revision number to the 
> build version, but then I switched to git.
> 
> 
> -Owen
> 
>> On Aug 19, 2020, at 12:44 PM, Glenn L. Austin via Cocoa-dev 
>> mailto:cocoa-dev@lists.apple.com>> wrote:
>> 
>> No, you can't use an "earlier" key to create a "later" value - but you can 
>> use code to do basically the same thing.
>> 
>> Or, you can use the same variable that sets your CFBuildNumber to set your 
>> CFBundleVersion.
>> 
>> --
>> Glenn L. Austin, Computer Wizard and Race Car Driver <><
>> 
>> 
>>> On Aug 19, 2020, at 9:07 AM, Gabriel Zachmann via Cocoa-dev 
>>>  wrote:
>>> 
>>> Question:
>>> 
>>> Is there a way to use a key/value that was defined earlier in the plist file
>>> to define a value for a later key?
>>> 
>>> Explanation:
>>> I have a macOS project with an automatically created "About" window.
>>> The plist file has, additionally to all the default stuff, the key 
>>> CFBuildNumber (with a value that I increment automatically).
>>> 
>>> In Xcode, I tried to change "Bundle version" to a value like
>>> 
>>> $(CURRENT_PROJECT_VERSION)_$(CFBuildNumber)
>>> 
>>> However, in the final Info.plist in the app's bundle, this then looks like
>>> 
>>>  CFBundleVersion
>>>  3.1_
>>> 
>>> Notice the underscore, but the value of CFBuildNumber is gone.
>>> "3.1", BTW, is the value I have set under
>>> 
>>>  Project / Targets / General / Identity / Build
>>> 
>>> I have tried to change parentheses into curly braces, to no avail.
>>> 
>>> So, question again: is there a way to use a key/value that was defined 
>>> earlier in the plist file
>>> to define a value for a later key?
>>> I'd like to do that so that the "About" window contains the build number, 
>>> too.
>>> 
>>> Thanks a lot in advance.
>>> 
>>> 
>>> ___
>>> 
>>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>>> 
>>> Please do not post admin requests or moderator comments to the list.
>>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>> 
>>> Help/Unsubscribe/Update your Subscription:
>>> https://lists.apple.com/mailman/options/cocoa-dev/glenn%40austinsoft.com
>>> 
>>> This email sent to gl...@austinsoft.com
>> 
>> ___
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>> 
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/cocoa-dev/owen%40clipboardinc.com 
>> 
>> 
>> This email sent to o...@clipboardinc.com 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com 
> )
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com 
> 
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/saagar%40saagarjha.com 
> 
> 
> This email sent to saa...@saagarjha.com 
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Question about Info.plist's

2020-08-19 Thread Owen Hartnett via Cocoa-dev
You can also use a build script that calls PlistBuddy to alter the contents of 
a plist called using a Run Script in Build Phases just before Compile Sources.  
I used to use one to apply the subversion revision number to the build version, 
but then I switched to git.


-Owen

> On Aug 19, 2020, at 12:44 PM, Glenn L. Austin via Cocoa-dev 
>  wrote:
> 
> No, you can't use an "earlier" key to create a "later" value - but you can 
> use code to do basically the same thing.
> 
> Or, you can use the same variable that sets your CFBuildNumber to set your 
> CFBundleVersion.
> 
> --
> Glenn L. Austin, Computer Wizard and Race Car Driver <><
> 
> 
>> On Aug 19, 2020, at 9:07 AM, Gabriel Zachmann via Cocoa-dev 
>>  wrote:
>> 
>> Question:
>> 
>> Is there a way to use a key/value that was defined earlier in the plist file
>> to define a value for a later key?
>> 
>> Explanation:
>> I have a macOS project with an automatically created "About" window.
>> The plist file has, additionally to all the default stuff, the key 
>> CFBuildNumber (with a value that I increment automatically).
>> 
>> In Xcode, I tried to change "Bundle version" to a value like
>> 
>>  $(CURRENT_PROJECT_VERSION)_$(CFBuildNumber)
>> 
>> However, in the final Info.plist in the app's bundle, this then looks like
>> 
>>   CFBundleVersion
>>   3.1_
>> 
>> Notice the underscore, but the value of CFBuildNumber is gone.
>> "3.1", BTW, is the value I have set under
>> 
>>   Project / Targets / General / Identity / Build
>> 
>> I have tried to change parentheses into curly braces, to no avail.
>> 
>> So, question again: is there a way to use a key/value that was defined 
>> earlier in the plist file
>> to define a value for a later key?
>> I'd like to do that so that the "About" window contains the build number, 
>> too.
>> 
>> Thanks a lot in advance.
>> 
>> 
>> ___
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>> 
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/cocoa-dev/glenn%40austinsoft.com
>> 
>> This email sent to gl...@austinsoft.com
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/owen%40clipboardinc.com
> 
> This email sent to o...@clipboardinc.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: AddInstanceForFactory: No factory registered for id

2020-08-19 Thread Jens Alfke via Cocoa-dev


> On Aug 19, 2020, at 8:27 AM, Gabriel Zachmann via Cocoa-dev 
>  wrote:
> 
> I would just like for the (error?) message in the log file to go away.

Don't worry about it. There are plenty of Apple subsystems that log warnings in 
normal operation. It would be nice if it didn't happen, but it's not your 
fault. About all you can do is file a bug report.

—Jens
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Question about Info.plist's

2020-08-19 Thread Glenn L. Austin via Cocoa-dev
No, you can't use an "earlier" key to create a "later" value - but you can use 
code to do basically the same thing.

Or, you can use the same variable that sets your CFBuildNumber to set your 
CFBundleVersion.

--
Glenn L. Austin, Computer Wizard and Race Car Driver <><


> On Aug 19, 2020, at 9:07 AM, Gabriel Zachmann via Cocoa-dev 
>  wrote:
> 
> Question:
> 
> Is there a way to use a key/value that was defined earlier in the plist file
> to define a value for a later key?
> 
> Explanation:
> I have a macOS project with an automatically created "About" window.
> The plist file has, additionally to all the default stuff, the key 
> CFBuildNumber (with a value that I increment automatically).
> 
> In Xcode, I tried to change "Bundle version" to a value like
> 
>   $(CURRENT_PROJECT_VERSION)_$(CFBuildNumber)
> 
> However, in the final Info.plist in the app's bundle, this then looks like
> 
>CFBundleVersion
>3.1_
> 
> Notice the underscore, but the value of CFBuildNumber is gone.
> "3.1", BTW, is the value I have set under
> 
>Project / Targets / General / Identity / Build
> 
> I have tried to change parentheses into curly braces, to no avail.
> 
> So, question again: is there a way to use a key/value that was defined 
> earlier in the plist file
> to define a value for a later key?
> I'd like to do that so that the "About" window contains the build number, too.
> 
> Thanks a lot in advance.
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/glenn%40austinsoft.com
> 
> This email sent to gl...@austinsoft.com



signature.asc
Description: Message signed with OpenPGP
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Question about Info.plist's

2020-08-19 Thread Gabriel Zachmann via Cocoa-dev
Question:

Is there a way to use a key/value that was defined earlier in the plist file
to define a value for a later key?

Explanation:
I have a macOS project with an automatically created "About" window.
The plist file has, additionally to all the default stuff, the key 
CFBuildNumber (with a value that I increment automatically).

In Xcode, I tried to change "Bundle version" to a value like

   $(CURRENT_PROJECT_VERSION)_$(CFBuildNumber)

However, in the final Info.plist in the app's bundle, this then looks like

CFBundleVersion
3.1_

Notice the underscore, but the value of CFBuildNumber is gone.
"3.1", BTW, is the value I have set under

Project / Targets / General / Identity / Build

I have tried to change parentheses into curly braces, to no avail.

So, question again: is there a way to use a key/value that was defined earlier 
in the plist file
to define a value for a later key?
I'd like to do that so that the "About" window contains the build number, too.

Thanks a lot in advance.




smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: AddInstanceForFactory: No factory registered for id

2020-08-19 Thread Gabriel Zachmann via Cocoa-dev
>> On Aug 18, 2020, at 10:33 AM, Gabriel Zachmann via Cocoa-dev 
>> mailto:cocoa-dev@lists.apple.com>> wrote:
>> 
>> (I have already experimented with AudioServicesCreateSystemSoundID(), but 
>> failed.)
> 
> In my experience, playing sounds (in macOS apps) only works when using mp3 
> files.

I am happy using NSSound, which does play the aiff file.

I would just like for the (error?) message in the log file to go away.


Best regards, Gabriel




smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com