TF-2384 Handle NSE to get plain notification in iOS
Signed-off-by: dab246 <tdvu@linagora.com> (cherry picked from commit 364f32a14b9888f73a3a103b8b5e1bc9b31e148e)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import Foundation
|
||||
|
||||
public extension Bundle {
|
||||
/// The top-level bundle that contains the entire app.
|
||||
static var app: Bundle {
|
||||
var bundle = Bundle.main
|
||||
if bundle.bundleURL.pathExtension == "appex" {
|
||||
// Peel off two directory levels - MY_APP.app/PlugIns/MY_APP_EXTENSION.appex
|
||||
let url = bundle.bundleURL.deletingLastPathComponent().deletingLastPathComponent()
|
||||
if let otherBundle = Bundle(url: url) {
|
||||
bundle = otherBundle
|
||||
}
|
||||
}
|
||||
return bundle
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user