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

App store rejection due to usage of private API's which are not exposed via the public iOS SDK #98

Open
ManojAtamai opened this issue Dec 27, 2024 · 9 comments

Comments

@ManojAtamai
Copy link

_Kotlin_ObjCExport_initialize_block_invoke accessed _NSBlock from / System/Library/Frameworks/CoreFoundation.framework/CoreFoundation where NSBlock is a private API.

@ManojAtamai
Copy link
Author

@simago Could you kindly address this issue?

@simago
Copy link
Contributor

simago commented Jan 8, 2025

@ManojAtamai
I built a demo-ios app and checked the symbols, but I couldn't find the NSBlock.
How to check:

  1. Build demo-ios to the simulator with Xcode.
  2. Xcode menu -> Product -> Show Build Folder in Finder.
  3. From the folder displayed in Finder, open Build/Products/Debug-iphonesimulator in Terminal.
  4. Check symbols with the nm command:
$ nm ./SdkSample.app/SdkSample

@simago
Copy link
Contributor

simago commented Jan 8, 2025

I found a description that NSBlock problem had been fixed in very old version of Kotlin-native.
https://github.com/JetBrains/kotlin-native/releases/tag/v0.7.1

@ManojAtamai
Copy link
Author

@simago I am using SDK version 1.10.2. The Data Theorem security tool raised an issue, stating that the private API NSBlock is accessed in the initialization block.

@ManojAtamai
Copy link
Author

@simago I believe the _Kotlin_ObjCExport_initialize_block_invoke method, related to Kotlin's interoperability with Objective-C, is invoking a method that accesses the private API _NSBlock. Could you please cross-check this?

@ManojAtamai
Copy link
Author

ManojAtamai commented Jan 8, 2025

Please find the attachment where we are getting the issue
image (3) (1)

@simago
Copy link
Contributor

simago commented Jan 9, 2025

@ManojAtamai I found a reference to NSBlockin ObjCExport.mm of Kotlin/Native.
Please see lines 326 to 331.

Kotlin/Native adds a method to NSBlock class, but it does not instantiate NSBlock class nor call a class method.

@ManojAtamai
Copy link
Author

@simago Could you please remove the reference to NSBlock so that our security tool does not raise an issue?

@simago
Copy link
Contributor

simago commented Jan 10, 2025

@ManojAtamai ObjCExport.mm is a part of Kotlin, so I can not change it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants