Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid private api on Mac App Store #804

Merged
merged 2 commits into from
Oct 22, 2024
Merged

Conversation

Coeur
Copy link
Contributor

@Coeur Coeur commented Oct 21, 2024

No description provided.

@nmoinvaz
Copy link
Member

I'm not sure APPLE makes sense since these files are for Apple platform.

@nmoinvaz
Copy link
Member

nmoinvaz commented Oct 21, 2024

I think we need something like this which is by default ON.

cmake_dependent_option(MZ_BUILD_FOR_APPSTORE "Build without macOS private APIs" ON "APPLE" OFF)

Or MZ_TARGET_APPSTORE.

@Coeur
Copy link
Contributor Author

Coeur commented Oct 22, 2024

OK. Quick question @nmoinvaz, since you need those declarations for a private project: do you want GCM on all Apple platforms (including iOS)?

  • if yes, I'll use MZ_TARGET_APPSTORE to replace TARGET_OS_IPHONE
  • if no, I'll combine MZ_TARGET_APPSTORE with !TARGET_OS_IPHONE so that GCM only builds for macOS.

@nmoinvaz
Copy link
Member

if no, I'll combine MZ_TARGET_APPSTORE with !TARGET_OS_IPHONE so that GCM only builds for macOS.

This one.

Thank you!

@Coeur
Copy link
Contributor Author

Coeur commented Oct 22, 2024

Actually, I prefer to default it to 0 1 for all platforms, as it would be hard to see more users interested in a non-distributable version of minizip instead of a distributable version of minizip.

[edit: arf, I inverted 0 and 1]

@nmoinvaz nmoinvaz added the encryption Encryption/decryption issue label Oct 22, 2024
@nmoinvaz nmoinvaz merged commit b908eee into zlib-ng:develop Oct 22, 2024
28 checks passed
@nmoinvaz nmoinvaz added the build system Build system and script changes label Oct 22, 2024
@Coeur Coeur deleted the coeur/gcm branch October 23, 2024 03:29
/* Avoid use of private API for iOS, Apple does not allow it on App Store. Zip format doesn't need GCM. */
#if !TARGET_OS_IPHONE
#ifndef MZ_TARGET_APPSTORE
#define MZ_TARGET_APPSTORE 0
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I should have defaulted it to 1, @nmoinvaz .
Can you add a commit to flip the default value?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build system Build system and script changes encryption Encryption/decryption issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants