Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

SDKを手動で追加する

fan-n-kunimoto edited this page Jun 28, 2023 · 16 revisions

1.プロジェクトへの nendSDK 追加

Xcode 上で対象プロジェクトに "NendAd.xcframework" と "NendAdResource.bundle" をドラッグ&ドロップします。
image

ダイアログの表示で必要に応じて任意の設定(※)を選び「Finish」をクリックします。
image

追加が完了すると Xcode のファイルリストに右図のように表示されます。

※ 既にプロジェクトフォルダ配下に "NendAd.xcframework" 及び "NendAdResource.bundle" を移動させたものに対して参照設定を追加する場合には、ファイルをコピーする必要がないため、“Copy items if needed” にチェックを入れる必要はありません。

2.フレームワークとライブラリの追加

必須フレームワークとライブラリ

nendSDK の利用には、

  • AdSupport.framework
  • Security.framework
  • ImageIO.framework
  • AVFoundation.framework
  • CoreMedia.framework
  • SystemConfiguration.framework
  • WebKit.framework
  • AVKit.framework
  • StoreKit.framework
  • libxml2.tbd

の追加が必要です。

オプションのフレームワーク

以下のフレームワークを追加することで、広告配信により詳細な情報を使用することが可能となります。

  • AppTrackingTransparency.framework

左側のプロジェクトナビゲーターから、プロジェクトをクリックして
TARGETS>General>Link Frameworks With Libraries 項目を開きます。

image

「+」をクリックし 追加できるライブラリの一覧を開いて 下記の Framework と Library を追加してください。

  • AdSupport.framework
  • Security.framework
  • ImageIO.framework
  • AVFoundation.framework
  • CoreMedia.framework
  • SystemConfiguration.framework
  • WebKit.framework
  • AVKit.framework
  • StoreKit.framework
  • libxml2.tbd

3.リンカフラグの追加

左側のプロジェクトナビゲーターから、プロジェクトをクリックして TARGETS>Build Setting>Other Linker Flags 項目を開き、-ObjCを追加します。

image

4.ビルド

任意のswift(またはObjective-C)ファイルに以下のimport文を記述し、一旦ビルド (Clean Build Folder)します。 エラーが発生せずにビルドが成功すれば、正常に SDK が追加できています。

Swift
import NendAd
1
Objective-C
@import NendAd;
1

※この時点でエラーが発生する場合は、Link Frameworks With Libraries の内容を再度確認してください。

日本語

nendSDK iOS について

SDKの組み込み

広告の表示

全般設定

導入サポート


English

About nendSDK iOS

SDK Implementation

Display Ads

Global Settings

Supports

Clone this wiki locally