Issue Description:
After upgrading the iOS SDK, the app may be flagged during App Store upload because an API name used in the app matches the name of an Apple private API.
This typically happens when calling the no-parameter preview API, often through a customer-defined wrapper around the Agora SDK.
Platform/SDK:
iOS, Agora RTC SDK 4.x
Error Message (optional):
App Store upload warning or rejection due to detection of an API name that matches an Apple private API.
Root Cause:
The issue occurs because the no-parameter startPreview API name may be detected by App Store scanning as matching a private API name.
To avoid this scan conflict, use the startPreview API that includes a video source parameter.
Step by Step Solution:
1. Find the no-parameter preview call:
Locate where the app or customer-defined wrapper calls the no-parameter startPreview method.
2. Replace it with the parameterized API:
Replace the no-parameter preview call with the version that specifies the video source:
[self.agoraRtc startPreview:AgoraVideoSourceTypeCamera];
3. Rebuild the iOS app:
Rebuild the app after updating the preview API call.
4. Upload the new build:
Upload the new build to App Store Connect again.
Recommended Change:
Replace the no-parameter preview call with:
[self.agoraRtc startPreview:AgoraVideoSourceTypeCamera];
Prevention/Best Practice:
Avoid using the no-parameter startPreview method in iOS apps submitted to the App Store. Use the parameterized preview API with AgoraVideoSourceTypeCamera to prevent App Store private API scan conflicts.