> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.onesignal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# iOS: Görsel Döngü Push Bildirimleri

> Swift kullanarak OneSignal iOS push bildirimlerinde görsel döngüsünün nasıl uygulanacağı.

iOS, bir bildirim içeriği uygulama uzantısı için giriş noktası olarak [UNNotificationContentExtension](https://developer.apple.com/documentation/usernotificationsui/unnotificationcontentextension?language=objc) protokolü sağlar. Bu, uygulamanızın bildirimleri için özel bir arayüz görüntülemek üzere kullanılabilir. Bu örnek kılavuz, bir iOS bildirimi içinde döngü oluşturmak için bunun nasıl kullanılacağını açıklar.

<Frame caption="Push bildiriminde döngüyü gösteren görüntü">
  <img src="https://files.readme.io/8ba64c7-RPReplay_Final1606950566.gif" />
</Frame>

## 1. Bildirim içeriği uzantısı ekleyin

<Card img="https://mintcdn.com/onesignal/ciRrThfP6xMpI7GY/images/docs/00355f9-Screen_Shot_2020-11-30_at_9.32.26_PM.png?fit=max&auto=format&n=ciRrThfP6xMpI7GY&q=85&s=80e43cac5c764bd0538169f9de8b6743" horizontal="true" width="600" height="315" data-path="images/docs/00355f9-Screen_Shot_2020-11-30_at_9.32.26_PM.png">
  Xcode'da, Dosya > Yeni > Hedef... seçin
</Card>

<Card img="https://mintcdn.com/onesignal/Xl2NHJvxakrK4JbL/images/docs/efd0fde-Screen_Shot_2020-11-30_at_3.10.58_PM.png?fit=max&auto=format&n=Xl2NHJvxakrK4JbL&q=85&s=1050faa9adf15303846a0cdee4cb0bab" horizontal="true" width="600" height="431" data-path="images/docs/efd0fde-Screen_Shot_2020-11-30_at_3.10.58_PM.png">
  "Notification Content Extension" seçin
</Card>

<Card img="https://mintcdn.com/onesignal/6v_cVPknFpo5qSVB/images/docs/0a0fa6a-Screen_Shot_2020-11-30_at_6.44.46_PM.png?fit=max&auto=format&n=6v_cVPknFpo5qSVB&q=85&s=9779778bc953998e3e0ec96642d33e50" horizontal="true" width="600" height="429" data-path="images/docs/0a0fa6a-Screen_Shot_2020-11-30_at_6.44.46_PM.png">
  Açılan pencerede seçimi onaylayın
</Card>

<Card img="https://mintcdn.com/onesignal/6tscVAtiSqz353kV/images/docs/ActivateContentExtension.png?fit=max&auto=format&n=6tscVAtiSqz353kV&q=85&s=8e0cf29704f3e01163074be168c3a597" horizontal="true" width="567" height="409" data-path="images/docs/ActivateContentExtension.png">
  Hata ayıklamak için etkinleştir'i seçin
</Card>

## 2. Uygulamanıza kod ekleyin

Github'dan [OSNotificationContentExtension'ı indirin](https://github.com/jfishman1/OSNotificationContentExtension) ve Xcode Projenizd ki `OSNotificationContentExtension`'ı Github'dan aldığınız aynı dosyayla değiştirin.

Aşağıdaki dosyaların eklendiğini görmelisiniz:

<Frame caption="İçerik Uzantısı altındaki dosyalar">
  <img src="https://mintcdn.com/onesignal/6v_cVPknFpo5qSVB/images/docs/0de83b8-Screen_Shot_2020-11-30_at_8.58.01_PM.png?fit=max&auto=format&n=6v_cVPknFpo5qSVB&q=85&s=ab382c7011a4481ab5cc91ce6d1a09cd" width="261" height="125" data-path="images/docs/0de83b8-Screen_Shot_2020-11-30_at_8.58.01_PM.png" />
</Frame>

## 3. Bildirim kategorinizi ayarlayın

Bu örnek, AppDelegate.swift `didFinishLaunchingWithOptions` içinde [İşlem Yapılabilir Bildirim Türünü Bildirir](https://developer.apple.com/documentation/usernotifications/declaring_your_actionable_notification_types).

<CodeGroup>
  ```swift Swift theme={null}
  func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

      //START Authorize OS Notification Carousel Category
      if #available(iOS 10.0, *) {
          let options: UNAuthorizationOptions = [.alert]
          UNUserNotificationCenter.current().requestAuthorization(options: options) { (authorized, error) in
              if authorized {
                  let categoryIdentifier = "OSNotificationCarousel"
                  let carouselNext = UNNotificationAction(identifier: "OSNotificationCarousel.next", title: "👉", options: [])
                  let carouselPrevious = UNNotificationAction(identifier: "OSNotificationCarousel.previous", title: "👈", options: [])
                  let carouselCategory = UNNotificationCategory(identifier: categoryIdentifier, actions: [carouselNext, carouselPrevious], intentIdentifiers: [], options: [])
                  UNUserNotificationCenter.current().setNotificationCategories([carouselCategory])
              }
          }
      }
      //END Authorize OS Notification Carousel Category

      return true
  }
  ```
</CodeGroup>

## 4. Push bildiriminizi gönderin

[Push Mesajları Gönderirken](./push) iOS Kategorisini ve özel Verileri ayarlayabilirsiniz.

### iOS kategorisi

iOS Kategorisi olarak `OSNotificationCarousel` kullanın:

<Tabs>
  <Tab title="Kontrol Paneli">
    "Platform Ayarları" > **Apple iOS'a Gönder** > "Kategori" altında ayarlayın

    <Frame caption="OneSignal kontrol panelinde iOS platform seçenekleri">
      <img src="https://mintcdn.com/onesignal/6tscVAtiSqz353kV/images/docs/OSNotificationCarousel.png?fit=max&auto=format&n=6tscVAtiSqz353kV&q=85&s=2e0ff19d9f383aae03d510a34fc2c7fe" width="1101" height="848" data-path="images/docs/OSNotificationCarousel.png" />
    </Frame>
  </Tab>

  <Tab title="API">
    `ios_category` [API Parametresi](/reference/push-notification) ile ayarlayın.
  </Tab>
</Tabs>

### Özel veriler

OneSignal'in bildirim başına birden fazla görsel yükleme seçeneği yoktur.

Bunun yerine Görsel URL'lerini virgülle `,` ayrılmış şekilde listelemelisiniz

<Tabs>
  <Tab title="Kontrol Paneli">
    "Gelişmiş Ayarlar" > "Ek Veriler" altında ayarlayın

    "Anahtar" için `images` ve "Değer" için tırnak işaretleri olmadan virgülle ayrılmış URL'ler listesini ayarlayın.

    <Frame>
      <img src="https://mintcdn.com/onesignal/4HyuQPBpu-4xjmQC/images/docs/d07200a-Screen_Shot_2020-11-30_at_9.19.59_PM.png?fit=max&auto=format&n=4HyuQPBpu-4xjmQC&q=85&s=1f4911116d4c3a944d1aa282d6566359" width="635" height="307" data-path="images/docs/d07200a-Screen_Shot_2020-11-30_at_9.19.59_PM.png" />
    </Frame>

    Örnek, kopyala yapıştır:

    <CodeGroup>
      ```text text theme={null}
      https://cdn.pixabay.com/photo/2015/12/01/20/28/road-1072823_960_720.jpg,https://cdn.pixabay.com/photo/2013/11/28/10/36/road-220058_960_720.jpg,https://cdn.pixabay.com/photo/2012/08/27/14/19/mountains-55067_960_720.png,https://cdn.pixabay.com/photo/2015/01/28/23/35/landscape-615429_960_720.jpg,https://cdn.pixabay.com/photo/2016/05/05/02/37/sunset-1373171_960_720.jpg
      ```
    </CodeGroup>
  </Tab>

  <Tab title="API">
    `data` [API Parametresini](/reference/push-notification) şu şekilde kullanın:

    <CodeGroup>
      ```json json theme={null}
      data: {
        "images" : "https://cdn.pixabay.com/photo/2015/12/01/20/28/road-1072823_960_720.jpg,https://cdn.pixabay.com/photo/2013/11/28/10/36/road-220058_960_720.jpg,https://cdn.pixabay.com/photo/2012/08/27/14/19/mountains-55067_960_720.png,https://cdn.pixabay.com/photo/2015/01/28/23/35/landscape-615429_960_720.jpg,https://cdn.pixabay.com/photo/2016/05/05/02/37/sunset-1373171_960_720.jpg"
      }
      ```
    </CodeGroup>
  </Tab>
</Tabs>

### Push'u gönderin

Push'u aldıktan sonra, iOS sürümüne bağlı olarak bildirimi genişletmek için uzun basmanız veya sola kaydırıp "Görüntüle"ye tıklamanız gerekecektir.

### Daha fazla okuma

* [Apple'ın İşlem Yapılabilir Bildirim Türlerinizi Bildirme Belgeleri](https://developer.apple.com/documentation/usernotifications/declaring_your_actionable_notification_types)
* [Ahmet Keskin'in Yararlı Medium Yazısı](https://medium.com/nsistanbul/carousel-notification-in-ios-5a1e8239d786)

***
