iOS Preparation
Upgrading to UjuAdExt 4.0 (current version)
Starting with 4.0 the UjuAdExt pod is an umbrella that aggregates standalone budget-source adapter components (UjuAdxNNAdapter 2.0.x, each carrying its own third-party SDK and resources). CocoaPods customers only change the version constraint to '~> 4.0' and run pod update — nothing else changes. XCFramework manual integrators download the per-adapter component zips from the Gitee releases (adapter registration is auto-discovered; Info.plist keys are optional). See the changelog and the Chinese Quick Start for the full step-by-step (this page's step 5 refresh is in progress).
Version Numbering Rules
Adapter Version Numbering
The version numbering rules for UjuAd SDK adapter components are as follows:
- UjuRevToBidAdapter: version aligned with the adapted ToBid SDK version (e.g.
5.7.5for ToBid-iOS 5.7.5); upgrading requires a paired release - UjuRevGromoreAdapter: pairs with UjuAdCore (currently
3.5.3, requires UjuAdCore3.5.3) - UjuCsjAdapter: independent iteration version (currently
1.0.0)
When integrating, use the paired versions specified in the documentation to avoid functionality issues caused by version mismatches.
Development Environment Requirements
| Item | Requirement |
|---|---|
| iOS Deployment Target | iOS 15.0 and above (unified to 15.0 since 3.4.3) |
| Supported OS Versions | iOS 15.0 and above, forward-compatible with the latest iOS releases (including iOS 26 / iOS 27 / iOS 27.1, see FAQ Q20; iPhone Duo foldable adaptation since 3.4.6, see FAQ Q21) |
| 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 (simulator, 4.1.1+; iOS 26.5+/27 runtimes — Intel Mac simulators not supported, see the simulator note below) |
| Dependency Tools | Xcode / CocoaPods (optional) |
Note: The SDK does not support macOS compilation.
UjuAdCore.xcframeworkis iOS-only.
Simulator Note (4.1.1+ policy): simulator slices of every component are arm64-only — iOS 26.5 / iOS 27 simulator runtimes are arm64-only themselves (no Rosetta), so Apple Silicon Mac simulators work out of the box; Intel Mac simulators (x86_64 / Rosetta) are not supported. UjuAdx28Adapter ships device slices only: apps including it cannot build/run on the simulator — exclude that component for simulator debugging or use a real device. This affects simulator debugging only — on-device runs and App Store distribution are unaffected. See FAQ Q20.
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 required components (core + budget package), plus three optional adapter 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 |
UjuRevGromoreAdapter | GroMore reverse aggregation adapter; integrates the UjuAd ADN into CSJ GroMore as a "custom ad network" | Optional |
UjuRevToBidAdapter | ToBid reverse aggregation adapter; integrates the UjuAd ADN into Sigmob ToBid | Optional |
UjuCsjAdapter | CSJ ADN adapter; the UjuAd SDK schedules CSJ ads | Optional |
Integration order overview (two required components — neither can be skipped; complete in order ① → ②):
| Order | Component | Required? | Section |
|---|---|---|---|
| ① | UjuAdCore (core SDK) | Required | Option 1 Steps 1–4 / Option 2 Podfile |
| ② | UjuAdExt (budget package; bundles all third-party DSP sources, SDK binaries and resources) | Required | Option 1 Step 5 / Option 2 Podfile |
| ③ | Optional adapters (CSJ / GroMore / ToBid) | As needed | Their respective guides |
UjuAdExt is a required component, not an optional enhancement
With UjuAdCore alone you only get UjuAd Adx's own inventory and fill rates will be significantly limited. UjuAdExt bundles all third-party DSP source adapters plus the Vendor/ third-party SDKs and resource bundles — skipping it means giving up most of your budget sources. In Option 1, Steps 1–4 only cover UjuAdCore; make sure you also complete Step 5 (UjuAdExt).
Current Version Capability Boundary (Core 3.6.1 / Ext 4.1.1 / Adapters 2.0.5; components in this group must be upgraded as a set — do not mix with older versions)
- UjuAdCore (provided): UjuAd Adx ad capabilities, 5 ad formats, filled via UjuAd Adx bidding; since 3.5.x — automatic circuit-breaker protection against budget-source crashes and return-on-timeout behavior for ad loading
- UjuAdExt 4.1.1 + budget-source adapter components (Adx24/28/33 at 2.0.5, Adx36 at 1.0.1; provided): budget-source adapters ship as standalone components (UjuAdxNNAdapter) automatically aggregated by the umbrella component (the list follows platform assignment and actual package contents); Mac runtime is handled automatically (see the changelog); simulator slices are arm64-only (usable on iOS 26.5+/27 simulators; Intel Mac simulator builds are not supported; UjuAdx28Adapter ships device slices only) — see FAQ Q20
- ADN platform adapters (provided): CSJ (UjuCsjAdapter 1.0.3); other platforms (Baidu / YLH / Kuaishou, etc.) will be provided in subsequent versions; no integration code changes required after release
- Reverse aggregation adapters (provided): UjuRevGromoreAdapter 3.5.3 (CSJ GroMore) / UjuRevToBidAdapter 5.7.5 (Sigmob ToBid)
Upgrading from Earlier Versions
Integrators on older versions only need to check the deltas below — no need to redo the full integration flow.
Upgrading to UjuAdExt 4.1 (current version)
| Item | Notes |
|---|---|
| CocoaPods | Change the UjuAdExt constraint in your Podfile to '~> 4.0' and run pod update UjuAdExt — nothing else to change (linker configuration is injected automatically by each adapter component's podspec, identical to 3.x) |
| Code adaptation (the only note) | UjuAdCore 3.5.x removed the rsaPublicKey parameter from UjuAdInitConfig.create — delete that argument from existing call sites (appKey now serves as the encryption envelope); projects that never passed it need zero code changes |
| Manual (XCFramework) | Clean up the old monolithic package first, then integrate per the new structure (full cleanup checklist in the Chinese FAQ): remove the old UjuAdExt.xcframework, the old neutral-named Vendor/ libraries (AdxNN_Core series — symbol-identical to the new components' original-named third-party libraries; keeping both causes duplicate symbol), old -force_load entries and old bundle references; then download the adapter component zips per Step 5 (adapter registration supports auto-discovery; manual Info.plist registration is no longer required) |
| UjuAdCore version | The 4.1.x train pairs with UjuAdCore 3.6.1 (upgraded together with the train via the umbrella pod update UjuAdExt); the 4.1.0 attachments have been retired (delivery-package assembly fix — see the changelog), customers on 4.1.0 should upgrade to 4.1.1 as a group; 4.0.1~4.0.2 customers please upgrade to this train as a group; 3.5.0 has been retired |
| Mac runtime | When the app runs on Apple Silicon Mac via "Designed for iPhone/iPad", incompatible budget sources are skipped automatically (no-fill fallback, expected behavior, iPhone / iPad unaffected — see the FAQ) |
| Xcode 26.4~26.6 hosts | Use the Compat line (swap the pod names as a group — see the FAQ); the mainline Swift module requires Xcode 27+ |
| Fill confirmation | If fill changes after upgrading, verify against the adapter components actually present in your project and contact the UjuAd platform to check the placement's budget-source configuration |
Upgrading from older versions
- UjuAdExt ≤ 3.5.7: complete the historical budget-source migration first (see the Chinese FAQ), then upgrade to 4.0
- dSYM history (3.5.4~3.5.9 shipped function-level stubs): see FAQ Q19 for the full-dSYM retro-package and handling
- Very old versions (early 3.4.x): error-code semantics and integration settings changed several times — check them release by release in the changelog or contact support
Integration Methods
Two integration methods are provided. Third-party network/serialization dependencies (e.g. SwiftProtobuf) 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)
Steps 1–4 of this option cover UjuAdCore and Step 5 covers UjuAdExt — both are required components. Complete all steps through Step 6 (verification) before considering the integration done.
Step 1: Obtain the xcframework
Download UjuAdCore-3.6.1.xcframework.zip from Gitee Release UjuAdCore-3.6.1 and extract it. The artifact structure is as follows:
UjuAdCore.xcframework/
├── Info.plist # xcframework 元信息
├── ios-arm64/ # 真机 slice
│ ├── libUjuAdCore-iphoneos.a # 静态库(网络/序列化依赖已静态链接)
│ └── Headers/ # swiftmodule(编译时需要;4.1.x 起仅 3 个模块)
│ ├── UjuAdCore.swiftmodule/ # SDK 公开 API 模块
│ │ ├── arm64-apple-ios.swiftmodule
│ │ ├── .swiftdoc
│ │ └── .swiftsourceinfo
│ ├── UjuAdCoreProtos.swiftmodule/ # Proto 模块(SDK 内部依赖,必须打包)
│ └── SwiftProtobuf.swiftmodule/ # 序列化模块(静态链接,集成方无需引入)
├── ios-arm64_x86_64-simulator/ # 模拟器 slice(4.1.1 起 arm64 单架构,目录名沿用历史双架构名)
│ ├── libUjuAdCore-simulator.a
│ └── Headers/
│ └── ...(同上,arm64-apple-ios-simulator 架构 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.aTo reference this xcconfig file:
- Drag
UjuAdCore.xcconfiginto the Xcode project navigator (no need to check any Target membership) - Click the blue project icon at the top of the left panel (the Project, not the Target)
- Select the Info tab in the center editor and locate the Configurations section
- Expand Debug and Release, and select
UjuAdCore.xcconfigin the dropdown for your App Target row (both configurations must be set)
CocoaPods note: If the project uses CocoaPods, the Target-level configuration file is already occupied by
Pods-XXX.debug/release.xcconfig. In this case, attach the custom xcconfig at the Project level (the row above the Target rows in the Configurations section), or merge the settings via apost_installhook in the Podfile.
Step 4: Verify Integration
import UjuAdCore
print("SDK 版本: \(UjuAdCore.shared.getVersion())")
// Output: SDK version: 3.6.1Compile 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.6.1
Step 5: Integrate the UjuAdExt Budget Package (required, do not skip)
UjuAdExt already bundles third-party DSP SDKs — do NOT re-import
UjuAdExt 3.6.2 ships with all currently supported third-party DSP SDKs included (under the Vendor/ subdirectory). Integrators must NOT separately import these same third-party SDKs via CocoaPods or manual integration. Doing so will cause:
- Linker
duplicate symbolerrors (duplicate OC class / protocol definitions) - Resource bundle conflicts (duplicate same-name
.bundleloads, runtime crashes) - Same SDK initialized twice, causing ad request anomalies
If your existing project already imports the same third-party SDKs, remove them first (delete the corresponding Podfile dependencies, delete manually-imported frameworks and bundles), and keep only the version bundled with UjuAdExt.
Import the UjuAdExt budget package (a required component; it bundles DSP budget sources — with UjuAdCore alone you only get UjuAd Adx's own inventory and fill rates will be significantly limited):
Upgrading to the 4.1.1 train
The budget-package distribution changed to standalone adapter components in 4.0. Manual (XCFramework) integrators now download per-adapter zips from the "per-adapter onboarding" table in the Chinese Quick Start (UjuAdx24Adapter / UjuAdx28Adapter / UjuAdx33Adapter 2.0.5, UjuAdx36Adapter 1.0.1, each carrying its own third-party SDK and resources); the whole group must be upgraded together with UjuAdCore 3.6.1. The 4.1.0 attachments have been retired (delivery-package assembly fix — upgrade to 4.1.1 directly). Simulator slices are arm64-only and UjuAdx28Adapter ships device slices only (see FAQ Q20). Hosts on Xcode 26.4~26.6 should use the Compat line (see FAQ Q23). Earlier artifact downloads (≤ 4.0.3) have been retired.
:::
Manual (XCFramework) integration in the 4.0 era: extract each adapter component zip, drag UjuAdxNNAdapter.xcframework together with its sibling Vendor/ directory into Frameworks/, and follow the per-adapter -force_load / SWIFT_INCLUDE_PATHS recipes in the Chinese Quick Start "per-adapter onboarding" section (the linked page is fully maintained in Chinese; copy the configuration blocks from there verbatim). CocoaPods integrators need none of these manual steps.
Adapter 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 the required network/serialization third-party dependencies (e.g. SwiftProtobuf); 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 |
LSApplicationQueriesSchemes List (20 entries — do not exceed 50):
iOS enforces a 50-entry cap on
LSApplicationQueriesSchemes; entries beyond the first 50 are silently ignored by the system. This list was trimmed by binary evidence (57 → 20): only schemes actually referenced by the shipped component binaries are kept, grouped by number of referencing components. The other 37 entries previously listed (the full QQ/Qzone family, Weibo variants, Alipay variants, etc.) have zero references in any shipped binary and were removed. When merging with your own whitelist: take the union and stay within 50 entries, keeping the first group below (referenced by multiple components) with priority; add your own campaign-related schemes within the remaining budget.
<key>LSApplicationQueriesSchemes</key>
<array>
<!-- Group 1: referenced by 2+ components (keep with priority when merging your own whitelist) -->
<string>weixin</string>
<string>pinduoduo</string>
<string>taobao</string>
<string>tmall</string>
<string>kwai</string>
<string>youku</string>
<!-- Group 2: referenced by a single component -->
<string>sinaweibo</string>
<string>dianping</string>
<string>snssdk1128</string>
<string>bilibili</string>
<string>ctrip</string>
<string>ucbrowser</string>
<string>zhihu</string>
<string>qiyi-iphone</string>
<string>pddopen</string>
<string>mqq</string>
<string>alipay</string>
<string>tbopen</string>
<string>openapp.jdmobile</string>
<string>baiduboxapp</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
Simulator Architecture Policy (4.1.1 and later)
Simulator slices of every component (UjuAdCore / budget-source adapters) are arm64-only — iOS 26.5+/27 simulator runtimes are arm64-only themselves, so Apple Silicon Mac simulators work out of the box; Intel Mac simulators (x86_64 / Rosetta) are not supported. UjuAdx28Adapter ships device slices only (apps including it cannot build/run on the simulator — exclude that component for simulator debugging or use a real device).
- XCFramework manual integration: no settings needed on Apple Silicon simulators; to get an explicit "architecture not supported" error on other setups you may set
EXCLUDED_ARCHS[sdk=iphonesimulator*] = x86_64in the App Target's Build Settings - CocoaPods integration: injected automatically by the podspec on the App Target side; for the Pods project side, set
EXCLUDED_ARCHS[sdk=iphonesimulator*] = x86_64via thepost_installhook in Option 2
-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 竞价引擎
│ ├── 配置服务 / 埋点上报
│ └── 广告加载 / 渲染 / 展示
│ (SwiftProtobuf 等依赖已静态链接,无需引入)
│
└── 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:
