Meet Group Activities

RSS for tag

Discuss the WWDC21 session Meet Group Activities.

Posts under wwdc21-10183 tag

11 Posts

Post

Replies

Boosts

Views

Activity

Problems Notifications Firebase
I've followed Apple's suggestions to implement push notifications with Firebase, but I can't get notifications. I have created the APNS key in firebase and I have activated the notifications in the app. In Siginig & Capabilities I have added "Push Notification" "Background Modules" activating Remote notifiactions. This is the code in AppDelegate: import UIKit import FirebaseCore import FirebaseMessaging @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool{ //Firebase FirebaseApp.configure() // Push Notifications UNUserNotificationCenter.current().delegate = self let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound] UNUserNotificationCenter.current() .requestAuthorization( options: authOptions, completionHandler: {_, _ in}) application.registerForRemoteNotifications() Messaging.messaging().subscribe(toTopic:"topic_general") return true } } extension AppDelegate: UNUserNotificationCenterDelegate{ // Push Notifications Mostrar aunque el movil este activo / Segundo Plano func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandle: @escaping (UNNotificationPresentationOptions) -> Void){ completionHandle([.alert, .badge, .sound]) } }
1
0
818
Apr ’22
exec format error while running C++ CGI on browser
Getting the following error while running C++ CGI on browser Error msg in log Mon Jan 10 14:10:56.092728 2022] [cgi:error] [pid 9743] [client ::1:56104] AH01215: (8)Exec format error: exec of '/usr/local/var/www/cgi-bin/web01.cgi' failed: /usr/local/var/www/cgi-bin/web01.cgi [Mon Jan 10 14:10:56.093580 2022] [cgi:error] [pid 9743] [client ::1:56104] End of script output before headers: web01.cgi Regards
0
0
730
Jan ’22
SharePlay in-app navigation
when is it appropriate to listen for activity sessions if my app has multiple screens? Lets say I have an app Main Screen -> List of videos Screen -> Player screen Few cases that I would like to combine: Two people on a call, both have app closed: If I start session inside Player, other participant will open an app on main screen how do I navigate it to the player initially? Should I start listening for activity session on the main screen already and then if session is observed I need to set navigation stack and join session side player when it opens? Two people on a call, both have app opened and watching different contents: If I start session inside Player, other participant will replace it's current playing item with one that is shared how to combines this two cases with one implementation? Or SharePlay is not meant to be leading you right to the player screen when shareplay starts, and users should open same content manually before shareplaying?
1
0
1.1k
Dec ’21
Activity communication issue in Apple Share Play
Hi, Currently I'm working on Share Play. And I struggled a lot on the issue that: In some cases, we need to share what other user(s) is(are) doing, so I made a custom event to share with all participants. But when 2 (or more) users send the activities with custom event at the same (or very similar) time, looks like groupSession ignores other users activities. Is there any way to solve this problem? or any idea to handle this situation? I just used same code with Apple's sample project. (sink completion is not called for other users activity sometimes) groupSession.$activity.sink { [weak self] activity in                     // Set the movie to enqueue it in the player.                     self?.enqueuedMovie = activity.movie                 }.store(in: &subscriptions)
1
0
910
Dec ’21
Detect if app is launched/openend by a SharePlay session
When a user is in a Facetime call and accepted the SharePlay request, I want to push a specific ViewController. So I thought it would be same as to get notification when the user tap "accept". But this was not the case. Nothing were printed out in the logs. Is there another way to know when the app (in the background or terminated) is launched or openend by accepting a SharePlay request ? import UIKit import UserNotifications @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. // to perform action when notification is tapped UNUserNotificationCenter.current().delegate = self registerForPushNotifications() return true } func registerForPushNotifications() { UNUserNotificationCenter.current() .requestAuthorization(options: [.alert, .sound, .badge]) { [weak self] granted, error in print("Permission granted: \(granted)") guard granted else { return } self?.getNotificationSettings() } } func getNotificationSettings() { UNUserNotificationCenter.current().getNotificationSettings { settings in print("Notification settings: \(settings)") guard settings.authorizationStatus == .authorized else { return } DispatchQueue.main.async { UIApplication.shared.registerForRemoteNotifications() } } } extension AppDelegate : UNUserNotificationCenterDelegate { func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) { let application = UIApplication.shared if(application.applicationState == .active){ print("user tapped the notification bar when the app is in foreground") } if(application.applicationState == .inactive) { print("user tapped the notification bar when the app is in background") } guard let rootViewController = (UIApplication.shared.connectedScenes.first?.delegate as? SceneDelegate)?.window?.rootViewController else { return } // Do some work completionHandler() } }
0
0
1.4k
Nov ’21
Problems Notifications Firebase
I've followed Apple's suggestions to implement push notifications with Firebase, but I can't get notifications. I have created the APNS key in firebase and I have activated the notifications in the app. In Siginig & Capabilities I have added "Push Notification" "Background Modules" activating Remote notifiactions. This is the code in AppDelegate: import UIKit import FirebaseCore import FirebaseMessaging @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool{ //Firebase FirebaseApp.configure() // Push Notifications UNUserNotificationCenter.current().delegate = self let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound] UNUserNotificationCenter.current() .requestAuthorization( options: authOptions, completionHandler: {_, _ in}) application.registerForRemoteNotifications() Messaging.messaging().subscribe(toTopic:"topic_general") return true } } extension AppDelegate: UNUserNotificationCenterDelegate{ // Push Notifications Mostrar aunque el movil este activo / Segundo Plano func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandle: @escaping (UNNotificationPresentationOptions) -> Void){ completionHandle([.alert, .badge, .sound]) } }
Replies
1
Boosts
0
Views
818
Activity
Apr ’22
exec format error while running C++ CGI on browser
Getting the following error while running C++ CGI on browser Error msg in log Mon Jan 10 14:10:56.092728 2022] [cgi:error] [pid 9743] [client ::1:56104] AH01215: (8)Exec format error: exec of '/usr/local/var/www/cgi-bin/web01.cgi' failed: /usr/local/var/www/cgi-bin/web01.cgi [Mon Jan 10 14:10:56.093580 2022] [cgi:error] [pid 9743] [client ::1:56104] End of script output before headers: web01.cgi Regards
Replies
0
Boosts
0
Views
730
Activity
Jan ’22
SharePlay in-app navigation
when is it appropriate to listen for activity sessions if my app has multiple screens? Lets say I have an app Main Screen -> List of videos Screen -> Player screen Few cases that I would like to combine: Two people on a call, both have app closed: If I start session inside Player, other participant will open an app on main screen how do I navigate it to the player initially? Should I start listening for activity session on the main screen already and then if session is observed I need to set navigation stack and join session side player when it opens? Two people on a call, both have app opened and watching different contents: If I start session inside Player, other participant will replace it's current playing item with one that is shared how to combines this two cases with one implementation? Or SharePlay is not meant to be leading you right to the player screen when shareplay starts, and users should open same content manually before shareplaying?
Replies
1
Boosts
0
Views
1.1k
Activity
Dec ’21
Activity communication issue in Apple Share Play
Hi, Currently I'm working on Share Play. And I struggled a lot on the issue that: In some cases, we need to share what other user(s) is(are) doing, so I made a custom event to share with all participants. But when 2 (or more) users send the activities with custom event at the same (or very similar) time, looks like groupSession ignores other users activities. Is there any way to solve this problem? or any idea to handle this situation? I just used same code with Apple's sample project. (sink completion is not called for other users activity sometimes) groupSession.$activity.sink { [weak self] activity in                     // Set the movie to enqueue it in the player.                     self?.enqueuedMovie = activity.movie                 }.store(in: &subscriptions)
Replies
1
Boosts
0
Views
910
Activity
Dec ’21
Detect if app is launched/openend by a SharePlay session
When a user is in a Facetime call and accepted the SharePlay request, I want to push a specific ViewController. So I thought it would be same as to get notification when the user tap "accept". But this was not the case. Nothing were printed out in the logs. Is there another way to know when the app (in the background or terminated) is launched or openend by accepting a SharePlay request ? import UIKit import UserNotifications @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. // to perform action when notification is tapped UNUserNotificationCenter.current().delegate = self registerForPushNotifications() return true } func registerForPushNotifications() { UNUserNotificationCenter.current() .requestAuthorization(options: [.alert, .sound, .badge]) { [weak self] granted, error in print("Permission granted: \(granted)") guard granted else { return } self?.getNotificationSettings() } } func getNotificationSettings() { UNUserNotificationCenter.current().getNotificationSettings { settings in print("Notification settings: \(settings)") guard settings.authorizationStatus == .authorized else { return } DispatchQueue.main.async { UIApplication.shared.registerForRemoteNotifications() } } } extension AppDelegate : UNUserNotificationCenterDelegate { func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) { let application = UIApplication.shared if(application.applicationState == .active){ print("user tapped the notification bar when the app is in foreground") } if(application.applicationState == .inactive) { print("user tapped the notification bar when the app is in background") } guard let rootViewController = (UIApplication.shared.connectedScenes.first?.delegate as? SceneDelegate)?.window?.rootViewController else { return } // Do some work completionHandler() } }
Replies
0
Boosts
0
Views
1.4k
Activity
Nov ’21