Re: Building for 10.12

2022-03-20 Thread Sandor Szatmari via Cocoa-dev
G

> On Mar 20, 2022, at 17:04, Gabriel Zachmann via Cocoa-dev 
>  wrote:
> 
> 
>> 
>>> My question now is: why did Xcode not warn me about that function, even 
>>> though the deployment target was set to 10.12 ?
>>The deployment target not a compiler setting. It is more of a runtime 
>> thing.  So if you set the deployment target to 13.0 it will not launch on 
>> macOS 12, for
> 
> Oh, I see. That explains a lot.
> 
>> example.  The SDK is what determines what API are (not) available. So if you 
>> were building against the 10.12 SDK you would have gotten a compiler error.
> 
> Sorry for asking (again?): how would I do that?
> How do I install old SDK's on current Xcode / macOS?
> 

You used to have to manually copy the SDKs into the Xcode app (where the SDKs 
are stored) then you have to edit a plist inside the app to let Xcode know what 
the min SDK is… not sure if this still works… but that should give you enough 
info to google an example or something… don’t mean to be vague, but I don’t 
have my work comp here to look at the paths and file locs… but you should be 
able to find an example 

> How would I tell Xcode to use those old SDK's?
> Is there an easy switch back and forth?
They show up in the Xcode UI… you will have access to all SDKs you put in the 
app…

Again not sure if this solution still works…. Good luck

Sandor
> 
> Best regards, Gabriel
> 
> 
> ___
> 
> 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/admin.szatmari.net%40gmail.com
> 
> This email sent to admin.szatmari@gmail.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: Building for 10.12

2022-03-20 Thread Alex Zavatone via Cocoa-dev
Isn’t it as simple as setting the minimum build version to 10.12?

> On Mar 18, 2022, at 9:47 AM, Gabriel Zachmann via Cocoa-dev 
>  wrote:
> 
> I am trying to build my app for macOS 10.12 (Sierra).
> 
> First of all, is it correct that I need to build it for "My Mac" , not do a 
> niversal build (Any Mac)?
> 
> Second, I have been switching the scheme to build for "My Mac", but when I 
> archive it to notarize it and export it, I still get a universal app.
> What gives?
> 
> BTW: I have sent such a build to a beta tester using 10.12, but he gets the 
> error message 
>   "cannot be opened because of a problem".
> 
> 
> Thanks a lot in advance.
> Gab.
> 
> ___
> 
> 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: Building for 10.12

2022-03-20 Thread Gabriel Zachmann via Cocoa-dev
>> My question now is: why did Xcode not warn me about that function, even 
>> though the deployment target was set to 10.12 ?
>   The deployment target not a compiler setting. It is more of a runtime 
> thing.  So if you set the deployment target to 13.0 it will not launch on 
> macOS 12, for

Oh, I see. That explains a lot.

> example.  The SDK is what determines what API are (not) available. So if you 
> were building against the 10.12 SDK you would have gotten a compiler error.

Sorry for asking (again?): how would I do that?
How do I install old SDK's on current Xcode / macOS?
How would I tell Xcode to use those old SDK's?
Is there an easy switch back and forth?

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


Re: Building for 10.12

2022-03-20 Thread Rob Petrovec via Cocoa-dev

> On Mar 20, 2022, at 11:41 AM, Quincey Morris 
>  wrote:
> 
> (Resending because I forgot to cc the list)
> 
> On Mar 20, 2022, at 08:09, Gabriel Zachmann via Cocoa-dev 
>  wrote:
>> 
>> Apparently, this caused it:
>> 
>> Symbol not found: _AVAudioSessionInterruptionNotification
>> 
>> Yes, I am using that function, and yes, it seems to be available only on 
>> macOS 11 and higher.
> 
> AVAudioSession doesn’t exist on macOS, in any version. I see that the 
> documentation page for AVAudioSessionInterruptionNotification lists it 
> incorrectly as supported on macOS 11+, but I can’t find anything in the SDK 
> headers to suggest where that incorrect information came from.
Wow, good catch.  


> The real question is how the macOS target compiled at all. Can you shed any 
> light on how you got as far as linking, with an unknown 
> _AVAudioSessionInterruptionNotification symbol in your target?
The header, in the 12.2 SDK, doesn’t list macOS as one of the available 
OSs for that constant, so Quincey is right. It shouldn’t have compiled for 
macOS.

OS_EXPORT NSNotificationName const  AVAudioSessionInterruptionNotification 
API_AVAILABLE(ios(6.0), watchos(2.0), tvos(9.0));

—Rob


___

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: Building for 10.12

2022-03-20 Thread Quincey Morris via Cocoa-dev
(Resending because I forgot to cc the list)

On Mar 20, 2022, at 08:09, Gabriel Zachmann via Cocoa-dev 
mailto:cocoa-dev@lists.apple.com>> wrote:
> 
> Apparently, this caused it:
> 
> Symbol not found: _AVAudioSessionInterruptionNotification
> 
> Yes, I am using that function, and yes, it seems to be available only on 
> macOS 11 and higher.

AVAudioSession doesn’t exist on macOS, in any version. I see that the 
documentation page for AVAudioSessionInterruptionNotification lists it 
incorrectly as supported on macOS 11+, but I can’t find anything in the SDK 
headers to suggest where that incorrect information came from.

The real question is how the macOS target compiled at all. Can you shed any 
light on how you got as far as linking, with an unknown 
_AVAudioSessionInterruptionNotification symbol in your target?
___

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: Building for 10.12

2022-03-20 Thread Rob Petrovec via Cocoa-dev


> On Mar 20, 2022, at 9:09 AM, Gabriel Zachmann  wrote:
> 
> I have now the crash report.
> 
> Apparently, this caused it:
> 
>  Symbol not found: _AVAudioSessionInterruptionNotification
> 
> Yes, I am using that function, and yes, it seems to be available only on 
> macOS 11 and higher.
> 
> My question now is: why did Xcode not warn me about that function, even 
> though the deployment target was set to 10.12 ?
The deployment target not a compiler setting. It is more of a runtime 
thing.  So if you set the deployment target to 13.0 it will not launch on macOS 
12, for example.  The SDK is what determines what API are (not) available. So 
if you were building against the 10.12 SDK you would have gotten a compiler 
error.


> How can I prevent things like that happening in the future?
Use the correct SDK for the OS builds you want to support.  There are 
macros you can use to block off areas of code that require specific OS 
versions.  For example:
#include 
#if defined(__MAC_10_12) && __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_12
// code that requires the 10.12 or later SDK
#endif

—Rob



___

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: Building for 10.12

2022-03-20 Thread Gabriel Zachmann via Cocoa-dev
I have now the crash report.

Apparently, this caused it:

  Symbol not found: _AVAudioSessionInterruptionNotification

Yes, I am using that function, and yes, it seems to be available only on macOS 
11 and higher.

My question now is: why did Xcode not warn me about that function, even though 
the deployment target was set to 10.12 ?
How can I prevent things like that happening in the future?

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