| @@ 97-112 (lines=16) @@ | ||
| 94 | * @param string $pushType |
|
| 95 | * @return string |
|
| 96 | */ |
|
| 97 | public function generateApnsTopic(string $pushType) |
|
| 98 | { |
|
| 99 | switch ($pushType) { |
|
| 100 | case 'voip': |
|
| 101 | return $this->appBundleId . '.voip'; |
|
| 102 | ||
| 103 | case 'complication': |
|
| 104 | return $this->appBundleId . '.complication'; |
|
| 105 | ||
| 106 | case 'fileprovider': |
|
| 107 | return $this->appBundleId . '.pushkit.fileprovider'; |
|
| 108 | ||
| 109 | default: |
|
| 110 | return $this->appBundleId; |
|
| 111 | } |
|
| 112 | } |
|
| 113 | } |
|
| 114 | ||
| @@ 150-165 (lines=16) @@ | ||
| 147 | * @param string $pushType |
|
| 148 | * @return string |
|
| 149 | */ |
|
| 150 | public function generateApnsTopic(string $pushType) |
|
| 151 | { |
|
| 152 | switch ($pushType) { |
|
| 153 | case 'voip': |
|
| 154 | return $this->appBundleId . '.voip'; |
|
| 155 | ||
| 156 | case 'complication': |
|
| 157 | return $this->appBundleId . '.complication'; |
|
| 158 | ||
| 159 | case 'fileprovider': |
|
| 160 | return $this->appBundleId . '.pushkit.fileprovider'; |
|
| 161 | ||
| 162 | default: |
|
| 163 | return $this->appBundleId; |
|
| 164 | } |
|
| 165 | } |
|
| 166 | ||
| 167 | /** |
|
| 168 | * Get last generated token. |
|