@@ -358,7 +358,7 @@ private extension DatabaseManager
358358
359359 let context = self . persistentContainer. newBackgroundContext ( )
360360 context. performAndWait {
361- guard let localApp = ALTApplication ( fileURL: Bundle . main . bundleURL) else { return }
361+ guard let localApp = ALTApplication ( fileURL: Bundle . realMainBundle . bundleURL) else { return }
362362
363363 let altStoreSource : Source
364364
@@ -403,7 +403,7 @@ private extension DatabaseManager
403403 // figure out if the current AltStoreApp is signed with "Use Main Profie" option
404404 // by checking if the first extension's entitlement's application-identifier matches current one
405405 repeat {
406- guard let pluginURL = Bundle . main . builtInPlugInsURL else {
406+ guard let pluginURL = Bundle . realMainBundle . builtInPlugInsURL else {
407407 installedApp. useMainProfile = true
408408 break
409409 }
@@ -424,7 +424,7 @@ private extension DatabaseManager
424424 break
425425 }
426426
427- if appId. hasSuffix ( Bundle . main . bundleIdentifier!) {
427+ if appId. hasSuffix ( Bundle . realMainBundle . bundleIdentifier!) {
428428 installedApp. useMainProfile = true
429429 } else {
430430 installedApp. useMainProfile = false
@@ -485,7 +485,7 @@ private extension DatabaseManager
485485 FileManager . default. prepareTemporaryURL ( ) { ( temporaryFileURL) in
486486 do
487487 {
488- try FileManager . default. copyItem ( at: Bundle . main . bundleURL, to: temporaryFileURL)
488+ try FileManager . default. copyItem ( at: Bundle . realMainBundle . bundleURL, to: temporaryFileURL)
489489
490490 guard let appBundle = Bundle ( url: temporaryFileURL) else { throw ALTError ( . invalidApp) }
491491 try update ( appBundle, bundleID: StoreApp . altstoreAppID)
0 commit comments