What's new in Xcode 15

RSS for tag

Discuss the WWDC23 Session What's new in Xcode 15

View Session

Posts under wwdc2023-10165 tag

20 Posts
Sort by:
Post not yet marked as solved
3 Replies
1.2k Views
Hi, I love the idea of the ImageResource struct and it is a great error reduction to automatically provide an ImageResource for every Image in the asset catalog. I immediately started to adopt it. But I have a case where I would still need to have access to the name of the Image and the bundle. So I would suggest that you provide change the struct for ImageResource to have name and bundle as public getters. With this, there is still a safe way in the code to access the resource and still be able to use the name of the resource. So instead of generating: struct ImageResource: Hashable { /// An asset catalog image resource name. fileprivate let name: String /// An asset catalog image resource bundle. fileprivate let bundle: Bundle /// Initialize an `ImageResource` with `name` and `bundle`. init(name: String, bundle: Bundle) { self.name = name self.bundle = bundle } } Just generate it as: struct ImageResource: Hashable { /// An asset catalog image resource name. let name: String /// An asset catalog image resource bundle. let bundle: Bundle /// Initialize an `ImageResource` with `name` and `bundle`. init(name: String, bundle: Bundle) { self.name = name self.bundle = bundle } } The same applies to ColorResource as well. I have posted a feedback on this, but I am curious what others think about this? Am I the only one who still needs to have access to the name and the bundle of the ressource?
Posted
by Fribi.
Last updated
.
Post not yet marked as solved
9 Replies
3.0k Views
Xcode generates symbols for image and color assets now (which is super nice!). We noticed an issue when generating code symbols for our image assets. We have an image named inputContour and one named inputContourColor. Xcode was not able to generate a symbol for inputContourColor and instead produced the following warning: #warning("The \"inputContourColor\" image asset name resolves to the symbol \"inputContour\" which already exists. Try renaming the asset.") It turns out that the generator automatically removes the color suffix when creating the code symbol. For color assets, this probably make sense (so tealColor would become just teal), but this should not be applied to image resources.
Posted Last updated
.
Post not yet marked as solved
6 Replies
6.8k Views
Description Environment Xcode version: Xcode15 Beta1 Firebase Component: Crashlytics Installation method: Swift Package Manager (SPM) Firebase SDK version: 10.4.0 Problem During the build process of my iOS application, I encountered an error related to processing the Info.plist file. Here is the error message: error: Info.plist Error Unable to process Info.plist at path /Users/...../Info.plist This could be a timing issue, make sure the Firebase run script build phase is the last build phase and no other scripts have moved RakutenIchiba.app from the location Xcode generated it. You can also add '$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)' as an "Input Files" dependency for your Firebase run script build phase. Github Link: https://github.com/firebase/firebase-ios-sdk/issues/11400 Reproducing the issue Steps to Reproduce [Add the steps you take to reproduce the issue. This could be setting up a new project, adding Firebase via SPM, adding a Run Script phase, etc.] What I've tried I've checked the order of Build Phases to make sure the Run Script phase for Firebase is the last phase. I've verified the location and reference of the Info.plist file. I've cleaned the project and cleared the derived data. [Add any other troubleshooting steps you've tried.] Despite these attempts, the issue persists. Any guidance or suggestions to resolve this would be appreciated. Thank you. Firebase SDK Version 10.4.0 Xcode Version 15.0 Beta1 Installation Method Swift Package Manager Firebase Product(s) Crashlytics Targeted Platforms iOS Relevant Log Output No response
Posted Last updated
.
Post not yet marked as solved
2 Replies
656 Views
I am new to coding and I am working on a project that incorporates three files. While running the code on XCode, everything works as expected until I run to completion and attempt to run the code again. Everytime I run through the code all the way, and hit the play button again, the app quits unexpectedly with the following Problem Report. This same code did not have the same problems when I ran it through XCode version 14.3, but always does on XCode on version 15.0. Translated Report (Full Report Below) Process: Xcode [3228] Path: /Applications/Xcode 15.0.app/Contents/MacOS/Xcode Identifier: com.apple.dt.Xcode Version: 15.0 (22265) Build Info: IDEApplication-22265000000000000~3 (15A240d) App Item ID: 497799835 App External ID: 859515098 Code Type: ARM-64 (Native) Parent Process: launchd [1] User ID: 501 Date/Time: 2023-09-26 16:11:58.5501 -0400 OS Version: macOS 14.0 (23A344) Report Version: 12 Anonymous UUID: 39956118-B5D9-942D-446C-1EB71E28673B Sleep/Wake UUID: 8501A0C3-6A36-4534-A018-F5A0315B16B0 Time Awake Since Boot: 5000 seconds Time Since Wake: 1121 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: Namespace SIGNAL, Code 6 Abort trap: 6 Terminating Process: Xcode [3228] Application Specific Information: abort() called
Posted Last updated
.
Post not yet marked as solved
1 Replies
501 Views
I have a problem with non-breaking space in new xcstrings. For example, I have a such code let text = "Hello\u{00a0}world!" let label = UILabel() label.text = text And this code outputs nice string "Hello world!" with non-breaking space. But if I try to put this string in Localizable.xcstring by key test_key, and then use this string, it won't work let text = String(localized: "test_key") let label = UILabel() label.text = text This code will show me Hello\u{00a0}world!. This is because swift adding additional \ symbol before \u{00a0} under hood. And of course \\u{00a0} will be displayed as \u{00a0}. Is there a way to use non-breaking space in new .xcstrings?
Posted
by OBielov.
Last updated
.
Post marked as solved
2 Replies
771 Views
After installing Xcode 15 RC, I encountered the following error when trying to run my project: Plug-in ended with non-zero exit code: 71) What I've Tried: I've tried several solutions to resolve this issue, including: Cleaning the build. Removing the derived data. Resetting packages. Unfortunately, none of these steps have worked so far. Additional Information: I had no issues running the same project in Xcode 14.2. My macOS is up-to-date. If anyone has encountered a similar issue with Xcode 15 RC or has any suggestions for resolving this error, I would greatly appreciate your assistance. Thank you in advance for your help!
Posted
by user2201.
Last updated
.
Post marked as solved
6 Replies
2.9k Views
While running app on mac or ipad, i get following error dyld[879]: Symbol not found: _$s21DeveloperToolsSupport17UVPreviewRegistryCMn Referenced from: /private/var/containers/Bundle/Application/EE11D387-C205-4752-82AC-823056F5DC4F/MyApp.app/MyApp Expected in: <47E42B18-0D71-31F2-98EA-51B5CBAB1549> /System/Library/Frameworks/DeveloperToolsSupport.framework/DeveloperToolsSupport
Posted
by AShaji.
Last updated
.
Post marked as solved
2 Replies
1.4k Views
Greetings... I am trying to use @Namespace for my matchedGeometryEffect use case. prior to Xcode 15 beta the following code worked just fine: struct ChapterItem_Previews: PreviewProvider { @Namespace static var namespace static var previews: some View { ChapterItem(namespace: namespace, show: .constant(true)) } } However trying to do the same within the new Xcode 15 beta #Preview Macro #Preview { @Namespace var namespace ChapterItem(namespace: namespace, show: .constant(true)) } produces the following error message: Ambiguous use of 'Preview(_:traits:body:)' May I kindly get assistance on the proper way I can get this to work in Xcode 15 beta? Please be as detail as you can since I'm still new to swiftUI as well Thank You.
Posted Last updated
.
Post not yet marked as solved
2 Replies
1.4k Views
When I try to import a custom SF Symbol exported for XCode 15 and try to import it in Xcode 15 beta (15A5160n), I got the error: The SVG file provided for the symbol image set 'rings.heart' is not suitable: Template format 5.0 is newer than the version that this software supports (4.0) Is Xcode 15 Beta not ready yet for Custom SF Symbols 5.0?
Posted
by arnonyc.
Last updated
.
Post marked as solved
5 Replies
2.6k Views
iPhone: iOS 17.0 (21A5268h) Apple Watch Ultra: watchOS 10.0 (21R5295g) Xcode: Version 15.0 beta 2 (15A5161b) macOS: 13.4.1 (22F82) Xcode 15 beta 2 doesn't see my Apple Watch Ultra(watchOS 10), but Xcode 14.3.1 does. However, I cannot run on Xcode 14.3.1 because it doesn't support iOS 17 and watchOS 10. Really frustrated, wasted all night debugging and failed. Maybe I have to return my watch to Apple Store on the weekend.
Posted
by yanjin666.
Last updated
.
Post not yet marked as solved
1 Replies
1.2k Views
I am looking to see if I can use the new feature that generates constants from my colors and image asset catalogs. It works easy-peaze in the main application, but when I try to use it inside a Swift Package that contains asset catalogs the constants are not being created. Feature or Bug?
Posted
by hotngui.
Last updated
.
Post not yet marked as solved
8 Replies
5.6k Views
When I click the "Xcode 15 beta and Selected Platforms" button, in the download section, I get this Xcode_15_beta.xcdownloadmanifest file, but I don't get Xcode 15 itself. So what exactly I should do to install Xcode 15?
Posted Last updated
.
Post marked as solved
10 Replies
1.9k Views
I wanted to try structured logging with os_log in C++, but I found that it fails to print anything given a format string and a variable: eg. void example(std::string&amp; str) { os_log_info(OS_LOG_DEFAULT, "%s", str.c_str()); os_log_debug(OS_LOG_DEFAULT, "%s", str.c_str()); os_log_error(OS_LOG_DEFAULT, "%s", str.c_str()); } This prints a blank row in the console, but with no text. How is this meant to work with variables? It only works with literals and constants now as far as I can tell. I'm looking forward to getting this working.
Posted Last updated
.
Post not yet marked as solved
1 Replies
1.4k Views
Hi there! Back with Xcode 14 and iOS 16 there were two new app icon sizes introduced to iOS: 64pt @2x (128x128px) 64pt @3x (192x192px) 68pt @2x (136x136px) What are those icons used for? Neither the Xcode 14 release notes nor the Human Interface Guidelines are mentioning those sizes and what they are used for. In previous Xcode versions the asset catalog had labels for each icon size. As Xcode 15 still doesn’t bring that feature back I’m still puzzled when those icon sizes are visible to the user. Best! – Alex
Posted Last updated
.