Skip to content

Commit

Permalink
ionic-team#2738 fix for ios build
Browse files Browse the repository at this point in the history
  • Loading branch information
dibyendusaha committed Apr 9, 2020
1 parent 8bbdb90 commit f012078
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Capacitor.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Pod::Spec.new do |s|
s.authors = { 'Ionic Team' => '[email protected]' }
s.source = { :git => 'https://github.com/ionic-team/capacitor.git', :tag => s.version.to_s }
s.source_files = 'ios/Capacitor/Capacitor/*.{swift,h,m}', 'ios/Capacitor/Capacitor/Plugins/*.{swift,h,m}', 'ios/Capacitor/Capacitor/Plugins/**/*.{swift,h,m}'
s.static_framework = true
s.dependency 'CapacitorCordova', '2.0.0'
s.dependency 'FirebaseMessaging'
s.swift_version = '5.0'
s.static_framework = true
end
4 changes: 2 additions & 2 deletions ios/Capacitor/Capacitor/Plugins/PushNotifications.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public class CAPPushNotificationsPlugin : CAPPlugin {
* Subscribe to a specific Push Notification Topic
*/
@objc func subscribeToTopic(_ call: CAPPluginCall) {
let topic = call.getString("name")
let topic = call.getString("name") ?? ""
Messaging.messaging().subscribe(toTopic: topic) {error in
guard error == nil else {
call.error(error!.localizedDescription)
Expand All @@ -114,7 +114,7 @@ public class CAPPushNotificationsPlugin : CAPPlugin {
* Unsubscribe from a specific Push Notification Topic
*/
@objc func unsubscribeFromTopic(_ call: CAPPluginCall) {
let topic = call.getString("name")
let topic = call.getString("name") ?? ""
Messaging.messaging().unsubscribe(fromTopic: topic) {error in
guard error == nil else {
call.error(error!.localizedDescription)
Expand Down

0 comments on commit f012078

Please sign in to comment.