Post

Replies

Boosts

Views

Activity

Using playgrounds in local swift packages -- Bundle.module throws fatal error
Hello, We are modularizing our iOS project using SPM. One of those modules is our UI module, which contains a bunch of Resources, for example, custom fonts. In order to register the fonts, we use the following code to access the resources: swift Bundle.module.urls(forResourcesWithExtension: "otf", subdirectory: nil) This is the recommended way from Apple as seen here - https://developer.apple.com/videos/play/wwdc2020/10169/. This seems to be working when importing the module into our main app. The problem appears when this code is executed from a Playground within the same module. When the code is executed, a fatal error is thrown: unable to find bundle named UniverseUI_UniverseUI This is triggered from the generated file resource_bundle_accessor.swift which contains the following code: swift import class Foundation.Bundle private class BundleFinder {} extension Foundation.Bundle {     /// Returns the resource bundle associated with the current Swift module.     static var module: Bundle = {         let bundleName = "UniverseUI_UniverseUI"         let candidates = [             // Bundle should be present here when the package is linked into an App.             Bundle.main.resourceURL,             // Bundle should be present here when the package is linked into a framework.             Bundle(for: BundleFinder.self).resourceURL,             // For command-line tools.             Bundle.main.bundleURL,         ]         for candidate in candidates {             let bundlePath = candidate?.appendingPathComponent(bundleName + ".bundle")             if let bundle = bundlePath.flatMap(Bundle.init(url:)) {                 return bundle             }         }         fatalError("unable to find bundle named UniverseUI_UniverseUI")     }() } Lastly, our module target defines resources like so: swift resources: [.process("Resources")]), Is there any workaround so we don't trigger the fatalError when executing that code from a playground? Any check to know if Bundle.module is available? Thank you
3
1
3k
Aug ’22
Using Apple sign in with Developer ID for a Mac Catalyst app distribution
I am trying to export a Catalyst app using Developer ID as distribution method. However I am unable to do it because xcode complains about Apple Sign in capability not being included in the profile (which clearly is, see attached - https://www.icloud.com/iclouddrive/0T4Qf6NuPPtD97uLJ_dCxh-3w#Image_1-14-21_at_7.43_AM). Any solutions or workarounds? Thank you.
5
0
3.2k
Mar ’23
Xcode 15.4 crashing on launch
After installing Xcode 16.0 Beta 3 (as a separate app), Xcode 15.4 is crashing on launch. I have uninstalled both Xcodes and reinstall 15.4 again and the crash is still happening. Full log was too long to post here. I have created a gist for it: https://gist.github.com/victorBaro/e7b75a9da4eaf231a2dd5dc27500afd3
1
0
810
Jul ’24
Using playgrounds in local swift packages -- Bundle.module throws fatal error
Hello, We are modularizing our iOS project using SPM. One of those modules is our UI module, which contains a bunch of Resources, for example, custom fonts. In order to register the fonts, we use the following code to access the resources: swift Bundle.module.urls(forResourcesWithExtension: "otf", subdirectory: nil) This is the recommended way from Apple as seen here - https://developer.apple.com/videos/play/wwdc2020/10169/. This seems to be working when importing the module into our main app. The problem appears when this code is executed from a Playground within the same module. When the code is executed, a fatal error is thrown: unable to find bundle named UniverseUI_UniverseUI This is triggered from the generated file resource_bundle_accessor.swift which contains the following code: swift import class Foundation.Bundle private class BundleFinder {} extension Foundation.Bundle {     /// Returns the resource bundle associated with the current Swift module.     static var module: Bundle = {         let bundleName = "UniverseUI_UniverseUI"         let candidates = [             // Bundle should be present here when the package is linked into an App.             Bundle.main.resourceURL,             // Bundle should be present here when the package is linked into a framework.             Bundle(for: BundleFinder.self).resourceURL,             // For command-line tools.             Bundle.main.bundleURL,         ]         for candidate in candidates {             let bundlePath = candidate?.appendingPathComponent(bundleName + ".bundle")             if let bundle = bundlePath.flatMap(Bundle.init(url:)) {                 return bundle             }         }         fatalError("unable to find bundle named UniverseUI_UniverseUI")     }() } Lastly, our module target defines resources like so: swift resources: [.process("Resources")]), Is there any workaround so we don't trigger the fatalError when executing that code from a playground? Any check to know if Bundle.module is available? Thank you
Replies
3
Boosts
1
Views
3k
Activity
Aug ’22
App approved - In-app purchase is "Waiting for Review"
The new version of our app uses Advanced Commerce API via in-app purchase. The app itself was approved but the in-app purchase associated with the app version is still Waiting for Review. Is there anything else we can do? Any way to expedite the review of the in-app purchase itself?
Replies
1
Boosts
0
Views
50
Activity
2w
Using Apple sign in with Developer ID for a Mac Catalyst app distribution
I am trying to export a Catalyst app using Developer ID as distribution method. However I am unable to do it because xcode complains about Apple Sign in capability not being included in the profile (which clearly is, see attached - https://www.icloud.com/iclouddrive/0T4Qf6NuPPtD97uLJ_dCxh-3w#Image_1-14-21_at_7.43_AM). Any solutions or workarounds? Thank you.
Replies
5
Boosts
0
Views
3.2k
Activity
Mar ’23
Xcode 15.4 crashing on launch
After installing Xcode 16.0 Beta 3 (as a separate app), Xcode 15.4 is crashing on launch. I have uninstalled both Xcodes and reinstall 15.4 again and the crash is still happening. Full log was too long to post here. I have created a gist for it: https://gist.github.com/victorBaro/e7b75a9da4eaf231a2dd5dc27500afd3
Replies
1
Boosts
0
Views
810
Activity
Jul ’24