Skip to content

Commit

Permalink
fix: remove USE_PUSH flag and code from iOS template (#4070)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile committed Jan 15, 2021
1 parent 9126341 commit 6d54243
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
4 changes: 2 additions & 2 deletions ios-template/App/App.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.App;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG USE_PUSH";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
Expand All @@ -369,7 +369,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.App;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = USE_PUSH;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
Expand Down
12 changes: 0 additions & 12 deletions ios-template/App/App/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,4 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}
}

#if USE_PUSH

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
NotificationCenter.default.post(name: .capacitorDidRegisterForRemoteNotifications, object: deviceToken)
}

func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
NotificationCenter.default.post(name: .capacitorDidFailToRegisterForRemoteNotifications, object: error)
}

#endif

}

0 comments on commit 6d54243

Please sign in to comment.