Polyv Mobile SDK Xcode 16 Adaptation Guide
2025-04-29
Apple requires that starting April 24, 2025, all apps uploaded to App Store Connect must be built with Xcode 16 or later and use the iOS 18, iPadOS 18, tvOS 18, visionOS 2 or later SDK.
[Official Documentation Link]
https://developer.apple.com/news/upcoming-requirements/?id=02212025a
If not adapted, your app may face:
Rejection during App Store submission
Compatibility issues with iOS 18 and other latest OS versions
Many customers have integrated Polyv live streaming, on-demand, or multi-scene SDKs. How to adapt to the Xcode 16 SDK version? What issues might be caused by not adapting to Xcode 16?
Currently, the Polyv Mobile SDK has been adapted to iOS 18. This article introduces the technical experience of adapting the Polyv Mobile SDK to Xcode 16.
1. Known Issues with Unadapted SDKs
Issue 1
Bitcode-related errors
When submitting an app to the App Store using Xcode 16, you may encounter the following error:
The following issues occurred while distributing your application.
Asset validation failed Invalid Executable. The executable 'YourApp.app/Frameworks/YourSDK.framework/YourSDK' contains bitcode. (ID: 12345678-1234-1234-1234-123456789012)
[Root Cause]
Xcode 16 has completely removed support for bitcode, while our older SDK versions still contain bitcode. When you attempt to submit your app, App Store Connect will reject binary files that include bitcode.
[Actual Case]
A customer using Polyv Mobile SDK version 5.x experienced normal builds with Xcode 15, but after upgrading to Xcode 16, the app submission was rejected with the following error log:
Asset validation failed Invalid Executable. The executable 'ClientApp.app/Frameworks/PLVIJKPlayer.framework/PLVIJKPlayer' contains bitcode.
[Bitcode Error Example]

Issue 2
maskView property name conflict causing crashes on iOS 18
On iOS 18, if your SDK or app defines a property with the same name as the maskView property of the UIView class, it will trigger an assertion and cause the app to crash.
[Root Cause]
iOS 18 adds an assertion check for UIView.maskView. In previous iOS versions, developers might have defined a property named maskView in custom view classes, which conflicts with the property of the same name in UIKit's UIView class.
On iOS 18, when the system attempts to access the maskView property of UIView, it checks for property name conflicts. If a conflict is found, it triggers an assertion and causes the app to crash.
[Crash Manifestation]
When the app runs on an iOS 18 device, it will crash. The crash log will show content similar to the following:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Set `maskView` on <CustomView: 0x12345678> is not allowed.'
Or display an assertion failure message:
Assertion failed: (![self respondsToSelector:@selector(maskView)] || [self.class instancesRespondToSelector:@selector(maskView)]), function -[UIView maskView], file /Library/Caches/com.apple.xbs/Sources/UIKitCore/UIKit-5023.100.106/UIView.m, line 13954.
[Affected Code Example]
// 在SDK或应用中的自定义视图类
@interface customView : UIView
@property (nonatomic, strong, readonly) UIView *maskView; // 与UIKit中UIView的属性同名
@end
@implementation customView
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {[self addSubview:self.maskView];}
return self;
}
- (UIView *)maskView {
if (!_maskView) {
_maskView = [[UIView alloc] init];
_maskView.backgroundColor = [UIColor clearColor];
// 其他配置...
}
return _maskView;
}
@end
[Solution]
Rename the maskView property in your business code to a different name, for example, customMaskView:
@interface customView : UIView
// 修改为不同的名称以避免与UIKit冲突
@property (nonatomic, strong, readonly) UIView *customMaskView;
@end
@implementation customView
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self addSubview:self.customMaskView];
}
return self;
}
- (UIView *)customMaskView {
if (!_customMaskView) {
_customMaskView = [[UIView alloc] init];
_customMaskView.backgroundColor = [UIColor clearColor];
// 其他配置...
}
return _customMaskView;
}
@end
[Notes]
This issue only occurs on iOS 18 and later versions, but it is recommended to adapt for all versions.
If your SDK or app uses third-party libraries, ensure those libraries have also been adapted for iOS 18 and check if they have the same maskView property name conflict.
2. Polyv Mobile SDK Adaptation Technical Guide
Step 1
Update to an Xcode 16 compatible SDK
1. Polyv Mobile On-Demand SDK
- Help Center URL: https://help.polyv.net/#/vod/ios/
- GitHub URL: https://github.com/polyv/polyv-ios-vod-sdk
- Recommended SDK version for Xcode 16 adaptation: 2.23.0 and above. Default reference resolves PLVIJKPlayer 0.15.0 bitcode issue.
- Minimum SDK version for Xcode 16 adaptation: 2.22.2. This version only resolves the internal
maskViewproperty name conflict in the SDK; requires upgrading PLVIJKPlayer to version 0.15.0. - If integrating both the multi-scene SDK and the on-demand SDK, please refer to section 5 of this unit.
2. Mobile On-Demand Player SDK
- Help Center URL: https://help.polyv.net/index.html#/vod/ios_player_sdk/
- GitHub URL: https://github.com/polyv/polyv-ios-media-player-sdk-demo
- Recommended SDK version for Xcode 16 adaptation: 2.5.0 and above. Default reference resolves PLVIJKPlayer 0.15.0 bitcode issue and
maskViewproperty name conflict. - If integrating both the multi-scene SDK and the on-demand player SDK, please refer to section 5 of this unit.
3. Mobile Multi-Scene SDK
- Help Center URL: https://help.polyv.net/#/live/ios/
- GitHub URL: https://github.com/polyv/polyv-ios-livescenes-sdk-demo
- Recommended SDK version for Xcode 16 adaptation: 1.24.0 and above. Default reference resolves PLVIJKPlayer 0.15.0 bitcode issue.
- Minimum SDK version for Xcode 16 adaptation: 1.20.0. This version modifies the Demo's use of the
maskViewproperty name conflict. - This SDK does not use the
maskViewproperty name internally; the issue only exists in the Demo layer. If not upgrading, you can directly modify the Demo layer source code. - If integrating both the multi-scene SDK and on-demand related SDKs, please refer to section 5 of this unit.
4. Mobile Webview SDK
- Help Center URL: https://help.polyv.net/#/live/webview/
- GitHub URL: https://github.com/polyv/polyv-ios-webview-demo
- Recommended SDK version for Xcode 16 adaptation: 3.2.3 and above.
5. Integrating Both Multi-Scene SDK and On-Demand Related SDKs
- On-Demand SDK version 2.23.0 and above, in addition to the default upgrade of PLVIJKPlayer reference, also involves optimizing internal HttpDNS behavior and upgrading PLVAliHttpDNS to version 3.2.0. However, Multi-Scene SDK version 1.24.0 and below, and On-Demand Player SDK version 2.5.0 and below still use PLVAliHttpDNS version 1.10.x, which will cause SDK conflicts.
- To avoid conflicts caused by the PLVAliHttpDNS upgrade, you can choose to reference the PLVAliHttpDNS 1.10.x version: control the On-Demand SDK version to 2.22.2-2.22.4, the On-Demand Player SDK version to 2.5.0, and the Multi-Scene SDK version to 1.20.0-1.24.0. We will subsequently release Multi-Scene SDK and On-Demand Player SDK versions adapted to the PLVAliHttpDNS upgrade.
- When integrating both the Multi-Scene SDK and On-Demand related SDKs, you need to upgrade PLVIJKPlayer to version 0.15.0 to resolve the bitcode issue and the
maskViewproperty name conflict. - If you have any issues related to references, please contact Polyv customer service promptly. We are dedicated to resolving your issues.
Step 2
Handle Bitcode Issues in Existing Frameworks
If you encounter bitcode errors related to any framework (including third-party frameworks):
Navigate to the framework directory:
cd path/to/Framework.framework
Check if the framework contains bitcode:
otool -l Framework | grep __LLVM | wc -l
If the result is not 0, remove the bitcode:
xcrun bitcode_strip -r Framework -o Framework
The above are the issues and instructions related to the Polyv Mobile SDK Xcode 16 adaptation. If you have any questions, please contact the technical consultant in the Polyv service group. For demo demonstrations or cooperation inquiries, please scan the QR code below.
Add Polyv Technical Consultant
Get a Customized Solution
