iOS Preparation
Version Numbering Rules
Adapter Version Numbering
UjuAd SDK adapter version numbers follow a "third-party SDK version + adapter iteration version" naming convention:
- First part: The version of the adapted third-party ad network SDK.
- Second part: The iteration version of the adapter itself.
When integrating, ensure you use the adapter matching your third-party SDK version to avoid functionality issues caused by version mismatches.
Development Environment Requirements
| Item | Requirement |
|---|---|
| iOS Deployment Target | iOS 13.0 and above |
| Swift Version | Swift 5.9 and above |
| Xcode Version | Xcode 15 and above (Xcode 26+ recommended) |
| Development Language | Swift 5 / Swift 6 |
| Architecture | arm64 (device) / arm64 + x86_64 (simulator) |
| Dependency Tools | Xcode / CocoaPods (optional) |
Note: The SDK does not support macOS compilation.
UjuAdCore.xcframeworkis iOS-only.
Note: The SDK only provides Swift public APIs (including Swift-only features such as
struct,Sendableprotocol, and Builder pattern) and does not ship a standalone Objective-C compatibility layer. Pure Objective-C projects must integrate via Swift mixed compilation + a custom@objcwrapper. See FAQ Q17 for details.
SDK Component Relationship
The UjuAd iOS SDK consists of two components, imported on demand:
| Component | Description | Required |
|---|---|---|
UjuAdCore | Core SDK, provides UjuAd Adx bidding + 5 ad formats (splash / rewarded video / interstitial / banner / native) | Required |
UjuAdExt | UjuAd budget package, expanding ad fill sources with more ad sources bidding | Required |
┌─────────────────────────────────────────┐
│ 集成方 App │
├─────────────────────────────────────────┤
│ UjuAdExt(Required) │
│ └── 内部 DSP 适配器(第三方 SDK 已打包)│
│ ↓ 依赖 │
│ UjuAdCore(必选) │
│ ├── 优聚 Adx 竞价 │
│ ├── 配置服务 / 埋点上报 │
│ └── 广告加载 / 渲染 / 展示 │
└─────────────────────────────────────────┘Current Version Capability Boundary
- UjuAdCore (provided): UjuAd Adx ad capabilities, 5 ad formats, filled via UjuAd Adx bidding
- UjuAdExt (provided): UjuAd budget package, expanding ad fill sources with more ad sources bidding
- Third-party ADN aggregation (in development): CSJ / Baidu / YLH / Kuaishou, etc., will be provided in subsequent versions; no integration code changes required after release
Integration Methods
Two integration methods are provided. gRPC-Swift / SwiftProtobuf / SwiftNIO and other third-party dependencies have been statically linked into the xcframework; integrators do not need and should not introduce these dependencies separately.
| Method | Applicable Scenario | Network Dependency | Recommendation |
|---|---|---|---|
| XCFramework | Production environments, out of the box | None | ★★★ |
| CocoaPods | Projects using CocoaPods for dependency management | None | ★★ |
Option 1: XCFramework Integration (Recommended)
Step 1: Obtain the xcframework
Download UjuAdCore-3.4.2.xcframework.zip from Gitee Release UjuAdCore-3.4.2 and extract it. The artifact structure is as follows:
UjuAdCore.xcframework/
├── Info.plist # xcframework 元信息
├── ios-arm64/ # 真机 slice
│ ├── libUjuAdCore-iphoneos.a # 静态库(含 gRPC/Protobuf/NIO 静态链接)
│ └── Headers/ # swiftmodule + C 模块(编译时需要)
│ ├── UjuAdCore.swiftmodule/ # SDK 公开 API 模块
│ │ ├── arm64-apple-ios.swiftmodule
│ │ ├── .swiftdoc
│ │ └── .swiftsourceinfo
│ ├── UjuAdCoreProtos.swiftmodule/ # Proto 模块(SDK 内部依赖,必须打包)
│ ├── GRPC.swiftmodule/ # gRPC 模块(静态链接,集成方无需引入)
│ ├── SwiftProtobuf.swiftmodule/
│ ├── NIO.swiftmodule/
│ └── _AtomicsShims/ # C 模块(swift-atomics 桥接)
├── ios-arm64_x86_64-simulator/ # 模拟器 slice(arm64 + x86_64 双架构)
│ ├── libUjuAdCore-simulator.a
│ └── Headers/
│ └── ...(同上,含 arm64 + x86_64 双架构 swiftmodule)
└── UjuAdCore.version.json # 版本元信息Static Library vs Dynamic Library
UjuAdCore.xcframework is a static library type (.a + Headers), not a dynamic framework (.framework). Static libraries are linked into the host app at compile time and require no embedding (Do Not Embed), with no increase in dyld load time at launch.
.a Filename Note
The static library filename for the device slice is libUjuAdCore-iphoneos.a (with the -iphoneos suffix), and the simulator slice is libUjuAdCore-simulator.a (with the -simulator suffix). When configuring OTHER_LDFLAGS, use the full filename; do not mistakenly write libUjuAdCore.a.
Step 2: Add to Xcode Project
- Drag
UjuAdCore.xcframeworkinto theFrameworks/subdirectory of the project root (create it if it does not exist) - In Xcode, select the project → Target → General tab
- Scroll to the Frameworks, Libraries, and Embedded Content section
- Click the
+button → select Add Other... → Add Files... → selectUjuAdCore.xcframework - Confirm the Embed option is Do Not Embed (static libraries require no embedding)
Step 3: Configure Build Settings
In Target → Build Settings, click + to add the following custom configuration. Each item is required; missing any one will cause compilation errors or runtime crashes:
| Configuration Item | Value | Purpose |
|---|---|---|
SWIFT_ENABLE_EXPLICIT_MODULES | NO | Disables Xcode 26+ explicit modules to ensure .swiftmodule binary files in the xcframework can be read |
SWIFT_INCLUDE_PATHS[sdk=iphoneos*] | $(inherited) $(SRCROOT)/Frameworks/UjuAdCore.xcframework/ios-arm64/Headers | Specifies the swiftmodule search path when compiling for device |
SWIFT_INCLUDE_PATHS[sdk=iphonesimulator*] | $(inherited) $(SRCROOT)/Frameworks/UjuAdCore.xcframework/ios-arm64_x86_64-simulator/Headers | Specifies the swiftmodule search path when compiling for simulator |
OTHER_LDFLAGS[sdk=iphoneos*] | -force_load $(SRCROOT)/Frameworks/UjuAdCore.xcframework/ios-arm64/libUjuAdCore-iphoneos.a | Forces loading of all .o in the static library, preventing generic type metadata from being dead-stripped |
OTHER_LDFLAGS[sdk=iphonesimulator*] | -force_load $(SRCROOT)/Frameworks/UjuAdCore.xcframework/ios-arm64_x86_64-simulator/libUjuAdCore-simulator.a | Same as above, simulator slice |
ENABLE_DEBUG_DYLIB | NO | Disables the Xcode 26 Debug Dylib feature to avoid symbol conflicts across dylib boundaries |
Why is -force_load needed?
The SDK statically links swift-atomics, in which ManagedAtomic<Value> is a generic class marked with @_alwaysEmitIntoClient. This mark causes the type metadata accessor to be incorrectly judged as "unreferenced" and dead-stripped under the static library demand-driven linking mode. At runtime, __allocating_init gets nil metadata → EXC_BAD_ACCESS crash. -force_load forces retention of all .o and is currently the only reliable fix (see FAQ Q12).
Why is SWIFT_INCLUDE_PATHS needed?
UjuAdCore.xcframework is a library type (.a + Headers), and Xcode does not automatically add the Headers directory to the swiftmodule search path. You must specify it explicitly; otherwise compilation reports no such module 'UjuAdCore'.
xcconfig File Configuration (Recommended)
It is recommended to write the Build Settings configuration into a .xcconfig file for easier version management and reuse across multiple Targets:
// UjuAdCore.xcconfig
SWIFT_ENABLE_EXPLICIT_MODULES = NO
ENABLE_DEBUG_DYLIB = NO
SWIFT_INCLUDE_PATHS[sdk=iphoneos*] = $(inherited) $(SRCROOT)/Frameworks/UjuAdCore.xcframework/ios-arm64/Headers
SWIFT_INCLUDE_PATHS[sdk=iphonesimulator*] = $(inherited) $(SRCROOT)/Frameworks/UjuAdCore.xcframework/ios-arm64_x86_64-simulator/Headers
OTHER_LDFLAGS[sdk=iphoneos*] = $(inherited) -force_load $(SRCROOT)/Frameworks/UjuAdCore.xcframework/ios-arm64/libUjuAdCore-iphoneos.a
OTHER_LDFLAGS[sdk=iphonesimulator*] = $(inherited) -force_load $(SRCROOT)/Frameworks/UjuAdCore.xcframework/ios-arm64_x86_64-simulator/libUjuAdCore-simulator.aReference this xcconfig file in Target → Build Settings → Configuration Set.
Step 4: Verify Integration
import UjuAdCore
print("SDK 版本: \(UjuAdCore.shared.getVersion())")
// 输出: SDK 版本: 3.4.2Compile and run. If there are no no such module / undefined symbol errors, the integration is successful.
Integration Checklist:
- [ ]
UjuAdCore.xcframeworkhas been added to Frameworks, Libraries, and Embedded Content - [ ] Embed option is Do Not Embed
- [ ]
SWIFT_ENABLE_EXPLICIT_MODULESis set toNO - [ ]
SWIFT_INCLUDE_PATHSis configured for both device and simulator slices - [ ]
OTHER_LDFLAGSis configured with-force_load(device useslibUjuAdCore-iphoneos.a, simulator useslibUjuAdCore-simulator.a) - [ ]
ENABLE_DEBUG_DYLIBis set toNO - [ ]
import UjuAdCorecompiles successfully - [ ]
UjuAdCore.shared.getVersion()outputs3.4.2
Step 5: Integrate the UjuAdExt Budget Package
If you need to expand ad fill sources (additional DSP adapters), import UjuAdExt:
- Download
UjuAdExt-3.4.2.xcframework.zipfrom Gitee Release UjuAdExt-3.4.2 - After extracting, drag
UjuAdExt.xcframeworkand all bundled third-party SDKs and resources from the zip into the project'sFrameworks/directory, preserving the zip's directory structure - In Build Settings, append (do not overwrite) the swiftmodule path and force_load for UjuAdExt:
// SWIFT_INCLUDE_PATHS 追加 UjuAdExt 的 Headers 目录
SWIFT_INCLUDE_PATHS[sdk=iphoneos*] = $(inherited) $(SRCROOT)/Frameworks/UjuAdCore.xcframework/ios-arm64/Headers $(SRCROOT)/Frameworks/UjuAdExt.xcframework/ios-arm64/Headers
SWIFT_INCLUDE_PATHS[sdk=iphonesimulator*] = $(inherited) $(SRCROOT)/Frameworks/UjuAdCore.xcframework/ios-arm64_x86_64-simulator/Headers $(SRCROOT)/Frameworks/UjuAdExt.xcframework/ios-arm64_x86_64-simulator/Headers
// OTHER_LDFLAGS 追加 UjuAdExt 的 -force_load
OTHER_LDFLAGS[sdk=iphoneos*] = $(inherited) -force_load $(SRCROOT)/Frameworks/UjuAdCore.xcframework/ios-arm64/libUjuAdCore-iphoneos.a -force_load $(SRCROOT)/Frameworks/UjuAdExt.xcframework/ios-arm64/libUjuAdExt-iphoneos.a
OTHER_LDFLAGS[sdk=iphonesimulator*] = $(inherited) -force_load $(SRCROOT)/Frameworks/UjuAdCore.xcframework/ios-arm64_x86_64-simulator/libUjuAdCore-simulator.a -force_load $(SRCROOT)/Frameworks/UjuAdExt.xcframework/ios-arm64_x86_64-simulator/libUjuAdExt-simulator.a- Append
-force_loadfor third-party DSP SDKs under the Vendor directory (critical, missing this causes linker errorsymbol(s) not found):
The third-party DSP SDKs under the Vendor/ directory in the UjuAdExt zip are static libraries (.framework containing .a). Their OC class symbols will be dead-stripped under default linking mode, so explicit -force_load is required:
// 示例:Vendor 目录下两个 DSP 子目录(Adx24 / Adx28)的静态库
// 实际路径以解压后的目录结构为准,逐个 -force_load 每个 .framework 内的二进制
OTHER_LDFLAGS[sdk=iphoneos*] = $(inherited) \
-force_load $(SRCROOT)/Frameworks/UjuAdCore.xcframework/ios-arm64/libUjuAdCore-iphoneos.a \
-force_load $(SRCROOT)/Frameworks/UjuAdExt.xcframework/ios-arm64/libUjuAdExt-iphoneos.a \
-force_load $(SRCROOT)/Frameworks/Vendor/Adx24/<SDKName>.xcframework/ios-arm64*/<SDKName>.framework/<SDKName> \
-force_load $(SRCROOT)/Frameworks/Vendor/Adx28/<SDKName>.xcframework/ios-arm64*/<SDKName>.framework/<SDKName>Must force_load each SDK under Vendor individually
Each .xcframework under the Vendor/ directory must be individually -force_load-ed. Missing any will cause the corresponding DSP's OC class symbols to be undefined (_OBJC_CLASS_$_***). <SDKName> is the actual framework name in the zip, replace according to the extracted directory structure.
- Register adapters in Info.plist (critical, missing this prevents SDK from discovering adapters):
UjuAdExt's internal DSP adapters are registered via Info.plist reflection mechanism. Integrators must add uju_adapter_* keys to Info.plist, with values being the factory class full name (format: UjuAdExt.<FactoryClassName>).
UjuAdExt 3.4.2 includes 2 built-in DSP adapters. Add the following keys to Info.plist as needed:
<key>uju_adapter_adx24</key>
<string>Adx24Adapter.Adx24AdapterFactory</string>
<key>uju_adapter_adx28</key>
<string>Adx28Adapter.Adx28AdapterFactory</string>Must configure Info.plist adapter registration keys
UjuAdExt adapters are not auto-registered; you must configure uju_adapter_* keys in Info.plist for the SDK to discover them via reflection. Missing configuration will cause the SDK startup log to output Info.plist 反射扫描完成,成功注册 0 个第三方适配器, and the corresponding DSPs will not be able to bid.
- Verify integration:
import UjuAdCore
print("UjuAdExt integration successful, version: \(UjuAdCore.shared.getVersion())")After enabling isDebug = true, the SDK startup log should show Info.plist 反射扫描完成,成功注册 N 个第三方适配器 (N is the number of adapters you configured).
Note: UjuAdExt depends on UjuAdCore; you must complete Steps 1-4 of the UjuAdCore integration first. The UjuAdExt swiftmodule path must be appended to
SWIFT_INCLUDE_PATHS(not overwrite it), otherwise the UjuAdCore module will not be found. The third-party DSP SDKs and resources bundled in the zip are included; integrators can simply drag them in following the directory structure, without obtaining them separately.
Option 2: CocoaPods Integration
Step 1: Add the Private Spec Repo
The UjuAd SDK is distributed via a private CocoaPods source. For first-time access, add the spec repo:
pod repo add UjuAdSpecs https://gitee.com/ujuad/iossdk.gitStep 2: Create Podfile
Create a Podfile in the project root directory:
source 'https://gitee.com/ujuad/iossdk.git'
source 'https://cdn.cocoapods.org/'
platform :ios, '13.0'
use_frameworks!
target 'YourApp' do
# 优聚智汇核心 SDK(必选,静态库模式,所有依赖已静态链接)
pod 'UjuAdCore', '~> 3.4.2'
# UjuAd budget package (required, expanding ad fill sources)
pod 'UjuAdExt', '~> 3.4.2'
endsource Description
source 'https://gitee.com/ujuad/iossdk.git'must be declared at the top of the Podfile, used to pull the private podspecsource 'https://cdn.cocoapods.org/'is used to pull other public dependencies- The SDK has statically linked gRPC-Swift / SwiftProtobuf / SwiftNIO internally; do not pod these libraries again
- UjuAdExt automatically depends on UjuAdCore; no need to declare it again (but explicit declaration is recommended for version control)
Step 3: Install Dependencies
pod install
open YourApp.xcworkspacepodspec Auto-configures Build Settings
Under CocoaPods integration, the podspec automatically configures SWIFT_INCLUDE_PATHS, OTHER_LDFLAGS (including -force_load), ENABLE_DEBUG_DYLIB, and other Build Settings; integrators do not need to set them manually.
Step 4: Verify Integration
import UjuAdCore
print(UjuAdCore.shared.getVersion()) // 3.4.2Adapter Architecture
The iOS SDK uses an independent adapter architecture aligned with Android. Each adapter must implement the BaseAdapterFactory protocol and register via UjuAdCore.shared.registerAdapterFactory(_:), or be auto-registered via the Info.plist reflection discovery mechanism.
ADX Self-owned Ad Sources
ADX self-owned ad sources are built into the core library and require no additional registration. The ADX ad platform ID obtained via UjuAdInfo.platformId is uniformly 100.
Info.plist Permissions and Configuration
App Transport Security (ATS)
The SDK uses HTTPS by default and requires no special ATS configuration. To debug with HTTP plaintext:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>Production Recommendation: Remove
NSAllowsArbitraryLoadsand allow HTTPS only.
App Tracking Transparency (ATT)
iOS 14+ requires user authorization to access IDFA. Add the usage description in Info.plist:
<key>NSUserTrackingUsageDescription</key>
<string>我们需要您的许可来提供更精准的广告体验</string>The SDK asynchronously requests ATT authorization during the start() phase; developers can also call ATTrackingManager.requestTrackingAuthorization before start. After user authorization, UjuAdCore.shared.getIDFA() returns the real IDFA. When unauthorized, it returns an empty string (the SDK uses IDFV as a fallback and still works normally).
SKAdNetwork (Optional)
To support SKAdNetwork attribution:
<key>SKAdNetworkItems</key>
<array>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>优聚智汇提供的 SKAdNetwork ID</string>
</dict>
</array>Contact the UjuAd platform to obtain the specific SKAdNetwork ID list.
Host App Integration Notes
When importing UjuAdCore or UjuAdExt, the host app must configure the corresponding dependencies, system frameworks, and Info.plist as shown in the table below. This content is based on the official DemoApp's actual configuration; integrators can use it as a direct reference.
UjuAdCore (Core SDK, Required)
UjuAdCore has already statically linked third-party dependencies such as gRPC-Swift / SwiftProtobuf / SwiftNIO; no additional packages need to be imported.
| Dependency Type | Content | Needs Integrator Action |
|---|---|---|
| Third-party libraries | gRPC-Swift / SwiftProtobuf / SwiftNIO / swift-atomics / swift-crypto | ❌ Already statically linked; do not import again |
| System frameworks | UIKit / Foundation / AVFoundation / CoreMedia / AdSupport / AppTrackingTransparency / StoreKit / CoreLocation | ✅ Auto-linked by Xcode; no manual addition needed |
| System libraries | libz.tbd / libresolv.tbd | ✅ Auto-linked by Xcode |
| Bundle resources | None | — |
Required Build Settings for UjuAdCore:
See Step 3 under Option 1 above, or Method 2: CocoaPods Integration (auto-configured by podspec).
UjuAdExt (UjuAd Budget Package, Required)
UjuAdExt depends on UjuAdCore; you must complete the UjuAdCore integration first. When importing UjuAdExt, the third-party DSP SDKs and resources bundled inside are automatically distributed with the zip; integrators do not need to obtain or configure third-party SDKs separately.
Required Info.plist Configuration
After importing UjuAdExt, the following Info.plist configuration must be added (required by the internal DSP SDK):
| Config Item | Reason | Example |
|---|---|---|
NSAppTransportSecurity.NSAllowsArbitraryLoads | Internal DSP SDK uses HTTP plaintext for ad requests; iOS enforces HTTPS by default and reports -1022 | true |
NSMotionUsageDescription | Internal DSP SDK reads CoreMotion device information | "用于向您提供更优质的广告服务" |
LSApplicationQueriesSchemes | URL Scheme whitelist for target apps of ad jumps by internal DSP SDK | See the complete list below |
SKAdNetworkItems | List of SKAdNetwork IDs required for ad attribution by internal DSP SDK | See the complete list below |
Complete LSApplicationQueriesSchemes List:
<key>LSApplicationQueriesSchemes</key>
<array>
<!-- 微信 -->
<string>wechat</string>
<string>weixin</string>
<!-- 拼多多 -->
<string>pinduoduo</string>
<string>pddopen</string>
<!-- 新浪微博 -->
<string>sinaweibohd</string>
<string>sinaweibo</string>
<string>sinaweibosso</string>
<string>weibosdk</string>
<string>weibosdk2.5</string>
<!-- QQ、Qzone -->
<string>mqqapi</string>
<string>mqq</string>
<string>mqqOpensdkSSoLogin</string>
<string>mqqconnect</string>
<string>mqqopensdkdataline</string>
<string>mqqopensdkgrouptribeshare</string>
<string>mqqopensdkfriend</string>
<string>mqqopensdkapi</string>
<string>mqqopensdkapiV2</string>
<string>mqqopensdkapiV3</string>
<string>mqzoneopensdk</string>
<string>wtloginmqq</string>
<string>wtloginmqq2</string>
<string>mqqwpa</string>
<string>mqzone</string>
<string>mqzonev2</string>
<string>mqzoneshare</string>
<string>wtloginqzone</string>
<string>mqzonewx</string>
<string>mqzoneopensdkapiV2</string>
<string>mqzoneopensdkapi19</string>
<string>mqzoneopensdkapi</string>
<!-- 支付宝 淘宝 -->
<string>alipay</string>
<string>alipays</string>
<string>alipayshare</string>
<string>taobao</string>
<string>tbopen</string>
<string>itaobao</string>
<!-- 天猫 -->
<string>tmall</string>
<string>itmall</string>
<!-- 京东 -->
<string>openapp.jdmobile</string>
<!-- 高德 -->
<string>amapuri</string>
<!-- 大众点评 -->
<string>dianping</string>
<!-- 美团 -->
<string>meituan0000</string>
<string>iMeituan</string>
<!-- 抖音 -->
<string>snssdk1128</string>
<!-- 快手 -->
<string>kwai</string>
<!-- 哔哩哔哩 -->
<string>bilibili</string>
<!-- 今日头条 -->
<string>snssdk141</string>
<!-- 携程 -->
<string>ctrip</string>
<!-- 百度地图 -->
<string>baidumap</string>
<!-- 手机百度 -->
<string>baiduboxapp</string>
<!-- UC浏览器 -->
<string>ucbrowser</string>
<string>uclink</string>
<!-- 优酷 -->
<string>youku</string>
<!-- 知乎 -->
<string>zhihu</string>
<!-- 爱奇艺 -->
<string>qiyi-iphone</string>
<string>iqiyi</string>
</array>Complete SKAdNetworkItems List:
<key>SKAdNetworkItems</key>
<array>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>f7s53z58qe.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>r3y5dwb26t.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>238da6jt44.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>x2jnk7ly8j.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>22mmun2rn5.skadnetwork</string>
</dict>
</array>Special Notes
Does Not Support Apple Silicon Simulator
Some DSP SDKs bundled inside UjuAdExt do not include an arm64 simulator slice. Running on an Apple Silicon Mac simulator will report an architecture mismatch error.
Solution: Set EXCLUDED_ARCHS[sdk=iphonesimulator] = arm64 in Build Settings to exclude the arm64 architecture when compiling for the simulator, automatically using x86_64 (Rosetta runtime). Device compilation is not affected.
-ObjC Linker Flag
The DSP SDKs bundled inside UjuAdExt are Objective-C static libraries containing Category extensions. For XCFramework integration, add -ObjC to OTHER_LDFLAGS to correctly load OC Categories:
OTHER_LDFLAGS = $(inherited) -ObjCFor CocoaPods integration, the podspec already auto-configures it; no manual addition is required.
UjuAdExt Build Settings Append
After importing UjuAdExt, SWIFT_INCLUDE_PATHS and OTHER_LDFLAGS must append (not overwrite) the UjuAdExt Headers path and force_load. See Step 5: Integrate UjuAdExt Budget Package above.
Dependency Overview
宿主 App
│
├── UjuAdExt(Required)
│ └── 内部 DSP 适配器(第三方 SDK 已打包,集成方无需单独获取)
│ ↓ 依赖
│ UjuAdCore(必选)
│ ├── 优聚 Adx 竞价引擎
│ ├── 配置服务 / 埋点上报
│ └── 广告加载 / 渲染 / 展示
│ (gRPC-Swift / SwiftProtobuf / SwiftNIO 已静态链接,无需引入)
│
└── Info.plist 配置
├── UjuAdCore:ATT / ATS / SKAdNetwork(可选)
└── UjuAdExt:+ NSAllowsArbitraryLoads / NSMotionUsageDescription / LSApplicationQueriesSchemes / SKAdNetworkItemsappKey Description
UjuAdInitConfig.appKey is actually the RSA public key assigned by the UjuAd backend (consistent with Android), used for server-side communication encryption and signature verification.
- Obtain the RSA public key from the UjuAd developer backend
- Pass it as-is; do not modify or truncate it
- Misusing it as a regular string will affect the encryption chain
Next Steps
After completing the preparation, continue reading:
