คู่มือการผสานรวม iOS SDK ขั้นพื้นฐาน
ส่วนนี้ประกอบด้วยข้อมูลเกี่ยวกับวิธีการผสานรวม Pushwoosh SDK เข้ากับแอปพลิเคชัน iOS ของคุณ
สิ่งที่ต้องมีก่อน
Anchor link toในการผสานรวม Pushwoosh iOS SDK เข้ากับแอปของคุณ คุณจะต้องมีสิ่งต่อไปนี้:
ขั้นตอนการผสานรวม
Anchor link to1. การติดตั้ง
Anchor link toคุณสามารถผสานรวม Pushwoosh SDK เข้ากับแอปพลิเคชันของคุณได้โดยใช้ Swift Package Manager หรือ CocoaPods
Swift Package Manager
Anchor link toในส่วน Package Dependencies ให้เพิ่มแพ็กเกจต่อไปนี้:
https://github.com/Pushwoosh/Pushwoosh-XCFramework
หากต้องการใช้ Pushwoosh iOS SDK ตรวจสอบให้แน่ใจว่าได้เพิ่มเฟรมเวิร์กสี่ตัวต่อไปนี้ไปยัง target ของแอปของคุณเมื่อทำการผสานรวมผ่าน Swift Package Manager:
PushwooshFramework
PushwooshCore
PushwooshBridge
PushwooshLiveActivities

CocoaPods
Anchor link toเปิด Podfile
ของคุณและเพิ่ม dependency:
# ยกเลิกการคอมเมนต์บรรทัดถัดไปเพื่อกำหนดแพลตฟอร์มส่วนกลางสำหรับโปรเจกต์ของคุณ# platform :ios, '9.0'
target 'MyApp' do # คอมเมนต์บรรทัดถัดไปหากคุณไม่ต้องการใช้ dynamic frameworks use_frameworks!
pod 'PushwooshXCFramework'
end
จากนั้นในเทอร์มินัล ให้รันคำสั่งต่อไปนี้เพื่อติดตั้ง dependencies:
pod install
2. Capabilities
Anchor link toหากต้องการเปิดใช้งาน Push Notifications ในโปรเจกต์ของคุณ คุณต้องเพิ่ม capabilities บางอย่าง
ในส่วน Signing & Capabilities ให้เพิ่ม capabilities ต่อไปนี้:
Push Notifications
Background Modes
หลังจากเพิ่ม capability นี้แล้ว ให้เลือกช่องสำหรับRemote notifications
หากคุณต้องการใช้ Time Sensitive Notifications (iOS 15+) ให้เพิ่ม capability ของ Time Sensitive Notifications
ด้วย
3. โค้ดสำหรับเริ่มต้น
Anchor link toAppDelegate
Anchor link toเพิ่มโค้ดต่อไปนี้ลงในคลาส AppDelegate ของคุณ:
import SwiftUIimport PushwooshFramework
@mainstruct MyApp: App { // ลงทะเบียน AppDelegate เป็น UIApplicationDelegate @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
var body: some Scene { WindowGroup { ContentView() } }}
class AppDelegate: NSObject, UIApplicationDelegate, PWMessagingDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // โค้ดสำหรับเริ่มต้น // ตั้งค่า delegate แบบกำหนดเองสำหรับการจัดการพุช Pushwoosh.sharedInstance().delegate = self
// ลงทะเบียนเพื่อรับการแจ้งเตือนแบบพุช Pushwoosh.sharedInstance().registerForPushNotifications()
return true }
// จัดการโทเค็นที่ได้รับจาก APNS func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { Pushwoosh.sharedInstance().handlePushRegistration(deviceToken) }
// จัดการข้อผิดพลาดในการรับโทเค็น func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) { Pushwoosh.sharedInstance().handlePushRegistrationFailure(error) }
// สำหรับการแจ้งเตือนแบบพุชเบื้องหลัง (silent push) func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { Pushwoosh.sharedInstance().handlePushReceived(userInfo) completionHandler(.noData) }
// ทำงานเมื่อได้รับการแจ้งเตือนแบบพุช func pushwoosh(_ pushwoosh: Pushwoosh, onMessageReceived message: PWMessage) { print("onMessageReceived: ", message.payload!.description) }
// ทำงานเมื่อผู้ใช้แตะที่การแจ้งเตือน func pushwoosh(_ pushwoosh: Pushwoosh, onMessageOpened message: PWMessage) { print("onMessageOpened: ", message.payload!.description) }}
struct ContentView: View { var body: some View { Text("Pushwoosh with SwiftUI") .padding() }}
import PushwooshFramework
@UIApplicationMainclass AppDelegate: UIResponder, UIApplicationDelegate, PWMessagingDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { //โค้ดสำหรับเริ่มต้น //ตั้งค่า delegate แบบกำหนดเองสำหรับการจัดการพุช ในกรณีนี้คือ AppDelegate Pushwoosh.sharedInstance().delegate = self;
//ลงทะเบียนเพื่อรับการแจ้งเตือนแบบพุช Pushwoosh.sharedInstance().registerForPushNotifications()
return true }
//จัดการโทเค็นที่ได้รับจาก APNS func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { Pushwoosh.sharedInstance().handlePushRegistration(deviceToken) }
//จัดการข้อผิดพลาดในการรับโทเค็น func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) { Pushwoosh.sharedInstance().handlePushRegistrationFailure(error); }
// สำหรับการแจ้งเตือนแบบพุชเบื้องหลัง (silent push) func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { Pushwoosh.sharedInstance().handlePushReceived(userInfo) completionHandler(.noData) }
//อีเวนต์นี้จะทำงานเมื่อได้รับการแจ้งเตือนแบบพุช func pushwoosh(_ pushwoosh: Pushwoosh, onMessageReceived message: PWMessage) { print("onMessageReceived: ", message.payload!.description) }
// ทำงานเมื่อผู้ใช้แตะที่การแจ้งเตือน func pushwoosh(_ pushwoosh: Pushwoosh, onMessageOpened message: PWMessage) { print("onMessageOpened: ", message.payload!.description) }}
#import <PushwooshFramework/PushwooshFramework.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { //-----------ส่วนของ PUSHWOOSH-----------
// ตั้งค่า delegate แบบกำหนดเองสำหรับการจัดการพุช ในกรณีนี้คือ AppDelegate [Pushwoosh sharedInstance].delegate = self;
//ลงทะเบียนเพื่อรับการแจ้งเตือนแบบพุช! [[Pushwoosh sharedInstance] registerForPushNotifications];
return YES;}
//จัดการโทเค็นที่ได้รับจาก APNS- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { [[Pushwoosh sharedInstance] handlePushRegistration:deviceToken];}
//จัดการข้อผิดพลาดในการรับโทเค็น- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error { [[Pushwoosh sharedInstance] handlePushRegistrationFailure:error];}
// สำหรับการแจ้งเตือนแบบพุชเบื้องหลัง (silent push)- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { [[Pushwoosh sharedInstance] handlePushReceived:userInfo]; completionHandler(UIBackgroundFetchResultNoData);}
//อีเวนต์นี้จะทำงานเมื่อได้รับการแจ้งเตือนแบบพุช- (void)pushwoosh:(Pushwoosh *)pushwoosh onMessageReceived:(PWMessage *)message { NSLog(@"onMessageReceived: %@", message.payload);}
//อีเวนต์นี้จะทำงานเมื่อผู้ใช้แตะที่การแจ้งเตือน- (void)pushwoosh:(Pushwoosh *)pushwoosh onMessageOpened:(PWMessage *)message { NSLog(@"onMessageOpened: %@", message.payload);}
@end
Info.plist
Anchor link toใน Info.plist
ของคุณ:
- ตั้งค่าคีย์
Pushwoosh_APPID
เป็น Pushwoosh Application Code ของคุณ - ตั้งค่าคีย์
Pushwoosh_API_TOKEN
เป็น Pushwoosh Device API Token
4. การติดตามการส่งข้อความ
Anchor link toPushwoosh รองรับการติดตามเหตุการณ์การส่งการแจ้งเตือนแบบพุชผ่าน Notification Service Extension
เพิ่ม Notification Service Extension
Anchor link to- ใน Xcode เลือก File > New > Target…
- เลือก Notification Service Extension แล้วกด Next
- ป้อนชื่อ target แล้วกด Finish
- เมื่อได้รับแจ้งให้เปิดใช้งาน ให้กด Cancel
Dependencies สำหรับ Notification Service Extension (สำหรับ CocoaPods เท่านั้น)
Anchor link toหมายเหตุ: หากคุณใช้ Swift Package Manager เพื่อจัดการ dependencies คุณสามารถข้ามขั้นตอนนี้ได้ เนื่องจาก dependencies จะถูกเพิ่มโดยอัตโนมัติ
เปิด Podfile
ของคุณและเพิ่ม dependency สำหรับ target:
# ยกเลิกการคอมเมนต์บรรทัดถัดไปเพื่อกำหนดแพลตฟอร์มส่วนกลางสำหรับโปรเจกต์ของคุณ# platform :ios, '9.0'
target 'MyApp' do # คอมเมนต์บรรทัดถัดไปหากคุณไม่ต้องการใช้ dynamic frameworks use_frameworks!
pod 'PushwooshXCFramework'
end
target 'MyAppNotificationExtension' do use_frameworks!
pod 'PushwooshXCFramework'
end
รันคำสั่งต่อไปนี้ในเทอร์มินัลเพื่ออัปเดต dependencies:
pod update
เพิ่ม Pushwoosh SDK ไปยัง Notification Service Extension
Anchor link toโค้ดนี้ช่วยให้คุณสามารถดักจับและประมวลผลการแจ้งเตือนภายใน notification extension ของคุณได้
import UserNotificationsimport PushwooshFramework
class NotificationService: UNNotificationServiceExtension {
var contentHandler: ((UNNotificationContent) -> Void)? var bestAttemptContent: UNMutableNotificationContent?
override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) { // Pushwoosh ********** PWNotificationExtensionManager.shared().handle(request, contentHandler: contentHandler) // ********************
self.contentHandler = contentHandler bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent)
if let bestAttemptContent = bestAttemptContent { // แก้ไขเนื้อหาการแจ้งเตือนที่นี่... contentHandler(bestAttemptContent) } }
override func serviceExtensionTimeWillExpire() { // ถูกเรียกก่อนที่ extension จะถูกยกเลิกโดยระบบ // ใช้โอกาสนี้ในการส่งมอบเนื้อหาที่แก้ไข "ดีที่สุด" ของคุณ มิฉะนั้น payload ของพุชดั้งเดิมจะถูกใช้ if let contentHandler = contentHandler, let bestAttemptContent = bestAttemptContent { contentHandler(bestAttemptContent) } }
}
#import "PWNotificationExtensionManager.h"
@interface NotificationService : UNNotificationServiceExtension
@end
@implementation NotificationService
- (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler { // Pushwoosh ********** [[PWNotificationExtensionManager sharedManager] handleNotificationRequest:request contentHandler:contentHandler]; //*********************}
@end
Info.plist
Anchor link toใน Info.plist
ของ Notification Service Extension ให้เพิ่ม:
Pushwoosh_APPID
- Application Code ของคุณ
5. รันโปรเจกต์
Anchor link to- บิลด์และรันโปรเจกต์
- ไปที่ Pushwoosh Control Panel และ ส่งการแจ้งเตือนแบบพุช
- คุณควรจะเห็นการแจ้งเตือนในแอป
การผสานรวม Pushwoosh iOS ขั้นสูง
Anchor link toณ จุดนี้ คุณได้ผสานรวม SDK เรียบร้อยแล้วและสามารถส่งและรับการแจ้งเตือนแบบพุชได้ ตอนนี้ เรามาดูฟังก์ชันการทำงานหลักกัน
การแจ้งเตือนแบบพุช
Anchor link toใน Pushwoosh SDK มี callbacks สองตัวที่ออกแบบมาเพื่อจัดการการแจ้งเตือนแบบพุช:
onMessageReceived
: เมธอดนี้จะถูกเรียกเมื่อได้รับการแจ้งเตือนแบบพุชonMessageOpened
: เมธอดนี้จะถูกเรียกเมื่อผู้ใช้โต้ตอบกับ (เปิด) การแจ้งเตือน
Callbacks เหล่านี้ช่วยให้นักพัฒนาสามารถจัดการการรับและการโต้ตอบของผู้ใช้กับการแจ้งเตือนแบบพุชภายในแอปพลิเคชันของตนได้
import PushwooshFramework
class AppDelegate: NSObject, UIApplicationDelegate, PWMessagingDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { Pushwoosh.sharedInstance().delegate = self; }
func pushwoosh(_ pushwoosh: Pushwoosh, onMessageOpened message: PWMessage) { if let payload = message.payload { print("onMessageOpened: \(payload)") } }
func pushwoosh(_ pushwoosh: Pushwoosh, onMessageReceived message: PWMessage) { if let payload = message.payload { print("onMessageReceived: \(payload)") } }}
#import <PushwooshFramework/PushwooshFramework.h>
@interface AppDelegate () <PWMessagingDelegate>
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [[Pushwoosh sharedInstance] setDelegate:self]; return YES;}
- (void)pushwoosh:(Pushwoosh *)pushwoosh onMessageOpened:(PWMessage *)message { if (message.payload) { NSLog(@"onMessageOpened: %@", message.payload); }}
- (void)pushwoosh:(Pushwoosh *)pushwoosh onMessageReceived:(PWMessage *)message { if (message.payload) { NSLog(@"onMessageReceived: %@", message.payload); }}@end
การกำหนดค่าผู้ใช้
Anchor link toด้วยการมุ่งเน้นไปที่พฤติกรรมและความชอบของผู้ใช้แต่ละราย คุณสามารถนำเสนอเนื้อหาที่ปรับให้เหมาะกับแต่ละบุคคล ซึ่งจะนำไปสู่ความพึงพอใจและความภักดีของผู้ใช้ที่เพิ่มขึ้น
import PushwooshFramework
class Registration {
func afterUserLogin(user: User) { let pushwoosh = Pushwoosh.sharedInstance() // ตั้งค่า ID ผู้ใช้ if let userId = user.userId { pushwoosh.setUserId(userId) }
// ตั้งค่าอีเมลผู้ใช้ if let userEmail = user.email { pushwoosh.setEmail(userEmail) }
// การตั้งค่าข้อมูลผู้ใช้เพิ่มเติมเป็นแท็กสำหรับ Pushwoosh if let age = user.userDetails.age, let name = user.userDetails.userName, let lastLogin = user.userDetails.lastLoginDate { pushwoosh.setTags([ "age": age, "name": name, "last_login": lastLogin ]) } }}
#import <PushwooshFramework/PushwooshFramework.h>
@implementation Registration
- (void)afterUserLogin:(User *)user { Pushwoosh *pushwoosh = [Pushwoosh sharedInstance];
// ตั้งค่า ID ผู้ใช้ if (user.userId) { [pushwoosh setUserId:user.userId]; }
// ตั้งค่าอีเมลผู้ใช้ if (user.email) { [pushwoosh setEmail:user.email]; }
// การตั้งค่าข้อมูลผู้ใช้เพิ่มเติมเป็นแท็กสำหรับ Pushwoosh if (user.userDetails.age && user.userDetails.userName && user.userDetails.lastLoginDate) { NSDictionary *tags = @{ @"age": user.userDetails.age, @"name": user.userDetails.userName, @"last_login": user.userDetails.lastLoginDate }; [pushwoosh setTags:tags]; }}
@end
Tags
Anchor link toTags คือคู่ของคีย์-ค่าที่กำหนดให้กับผู้ใช้หรืออุปกรณ์ ช่วยให้สามารถแบ่งกลุ่มตามคุณลักษณะต่างๆ เช่น ความชอบหรือพฤติกรรม ทำให้สามารถส่งข้อความที่ตรงเป้าหมายได้
import PushwooshFramework
class UpdateUser { func afterUserUpdateProfile(user: User) { let pushwoosh = Pushwoosh.sharedInstance()
// ตั้งค่ารายการหมวดหมู่ที่ชื่นชอบ pushwoosh.setTags(["favorite_categories" : user.getFavoriteCategories()])
// ตั้งค่าข้อมูลการชำระเงิน pushwoosh.setTags([ "is_subscribed": user.isSubscribed(), "payment_status": user.getPaymentStatus(), "billing_address": user.getBillingAddress() ]) }}
#import <PushwooshFramework/PushwooshFramework.h>
@implementation UpdateUser
- (void)afterUserUpdateProfile:(User *)user { Pushwoosh *pushwoosh = [Pushwoosh sharedInstance];
// ตั้งค่ารายการหมวดหมู่ที่ชื่นชอบ [pushwoosh setTags:@{@"favorite_categories" : user.getFavoriteCategories}];
// ตั้งค่าข้อมูลการชำระเงิน NSDictionary *tags = @{ @"is_subscribed": @(user.isSubscribed), @"payment_status": user.getPaymentStatus, @"billing_address": user.getBillingAddress }; [pushwoosh setTags:tags];}
@end
Events
Anchor link toEvents คือการกระทำหรือเหตุการณ์ที่เกิดขึ้นโดยผู้ใช้ภายในแอป ซึ่งสามารถติดตามเพื่อวิเคราะห์พฤติกรรมและกระตุ้นให้เกิดข้อความหรือการกระทำที่สอดคล้องกันได้
import PushwooshFramework
class Registration {
func afterUserLogin(user: User) { if let userName = user.getUserName(), let lastLogin = user.getLastLoginDate() { PWInAppManager.shared().postEvent("login", withAttributes: [ "name": userName, "last_login": lastLogin ]) } }
func afterUserPurchase(user: User, product: Product) { let pushwoosh = Pushwoosh.sharedInstance()
// ติดตามเหตุการณ์การซื้อ PWInAppManager.shared().postEvent("purchase", withAttributes: [ "product_id": product.getId(), "product_name": product.getName(), "price": product.getPrice(), "quantity": product.getQuantity() ])
// ตั้งค่าแท็กผู้ใช้ let lastPurchaseDate = Date().timeIntervalSince1970 let lifetimeSpend = getCurrentLifetimeSpend() + product.getPrice()
pushwoosh.setTags([ "last_purchase_date": lastPurchaseDate, "lifetime_spend": lifetimeSpend ]) }}
#import <PushwooshFramework/PushwooshFramework.h>#import <PushwooshFramework/PWInAppManager.h>
@implementation Registration
- (void)afterUserLogin:(User *)user { NSString *userName = [user getUserName]; NSDate *lastLogin = [user getLastLoginDate];
if (userName && lastLogin) { [[PWInAppManager sharedManager] postEvent:@"login" withAttributes:@{ @"name": userName, @"last_login": lastLogin }]; }}
- (void)afterUserPurchase:(User *)user product:(Product *)product { Pushwoosh *pushwoosh = [Pushwoosh sharedInstance];
// ติดตามเหตุการณ์การซื้อ [[PWInAppManager sharedManager] postEvent:@"purchase" withAttributes:@{ @"product_id": [product getId], @"product_name": [product getName], @"price": @([product getPrice]), @"quantity": @([product getQuantity]) }];
// ตั้งค่าแท็กผู้ใช้ NSTimeInterval lastPurchaseDate = [[NSDate date] timeIntervalSince1970]; double lifetimeSpend = /* ดึงยอดใช้จ่ายตลอดอายุการใช้งานปัจจุบัน */ + [product getPrice];
NSDictionary *tags = @{ @"last_purchase_date": @(lastPurchaseDate), @"lifetime_spend": @(lifetimeSpend) };
[pushwoosh setTags:tags];}
@end
Rich Media
Anchor link toRich Media หมายถึงเนื้อหาเชิงโต้ตอบและมัลติมีเดีย เช่น รูปภาพ วิดีโอ หรือ HTML ที่ใช้ในการแจ้งเตือนและข้อความในแอปเพื่อเพิ่มการมีส่วนร่วมของผู้ใช้
import PushwooshFramework
class ViewController: UIViewController, PWRichMediaPresentingDelegate {
override func viewDidLoad() { super.viewDidLoad() let richMediaConfiguration = PWModalWindowConfiguration.shared()
PWRichMediaManager.shared().delegate = self richMediaConfiguration.configureModalWindow(with: .PWModalWindowPositionBottom, present: .PWAnimationPresentFromBottom, dismiss: .PWAnimationDismissDown) }
func richMediaManager(_ richMediaManager: PWRichMediaManager!, shouldPresent richMedia: PWRichMedia!) -> Bool { print("Rich media will be presented with: \(richMedia.pushPayload!)") return true }
func richMediaManager(_ richMediaManager: PWRichMediaManager!, didPresent richMedia: PWRichMedia!) { print("Rich media has been presented with: \(richMedia.pushPayload!)") }
func richMediaManager(_ richMediaManager: PWRichMediaManager!, didClose richMedia: PWRichMedia!) { print("Rich media has been closed with: \(richMedia.pushPayload!)") }
func richMediaManager(_ richMediaManager: PWRichMediaManager!, presentingDidFailFor richMedia: PWRichMedia!, withError error: (any Error)!) { print("Failed to present rich media with: \(richMedia.pushPayload!). Error: \(error.localizedDescription)") }}
#import "ViewController.h"#import <PushwooshFramework/PushwooshFramework.h>#import <PushwooshFramework/PWRichMediaManager.h>#import <PushwooshFramework/PWModalWindowConfiguration.h>
@interface ViewController () <PWRichMediaPresentingDelegate>
@end
@implementation ViewController
- (void)viewDidLoad { [super viewDidLoad];
[[PWRichMediaManager sharedManager] setDelegate:self]; [[PWModalWindowConfiguration shared] configureModalWindowWith:PWModalWindowPositionBottom presentAnimation:PWAnimationPresentFromBottom dismissAnimation:PWAnimationDismissDown];}
- (BOOL)richMediaManager:(PWRichMediaManager *)richMediaManager shouldPresentRichMedia:(PWRichMedia *)richMedia { NSLog(@"Rich media will be presented with: %@", richMedia.pushPayload); return YES;}
- (void)richMediaManager:(PWRichMediaManager *)richMediaManager didPresentRichMedia:(PWRichMedia *)richMedia { NSLog(@"Rich media has been presented with: %@", richMedia.pushPayload);}
- (void)richMediaManager:(PWRichMediaManager *)richMediaManager didCloseRichMedia:(PWRichMedia *)richMedia { NSLog(@"Rich media has been closed with:: %@", richMedia.pushPayload);}
- (void)richMediaManager:(PWRichMediaManager *)richMediaManager presentingDidFailForRichMedia:(PWRichMedia *)richMedia withError:(NSError *)error { NSLog(@"Failed to present rich media with: %@. Error: %@", richMedia.pushPayload, error.localizedDescription);}
@end
การแก้ไขปัญหา
Anchor link toหากคุณพบปัญหาใดๆ ระหว่างขั้นตอนการผสานรวม โปรดดูที่ส่วน การสนับสนุนและชุมชน