Build, test, and submit your app using Xcode, Apple's integrated development environment.

Xcode Documentation

Post

Replies

Boosts

Views

Activity

OSLog output in Xcode console ignoring OSLogIntegerFormatting?!
In my Swift macOS app, I use OSLog logging via the line: logger.log("••• channel \(channel, format: .octal(minDigits: 3))") .. and the Xcode console shows: ••• channel 29 .. the formatting to octal and minDigits are ignored. I've searched high and low for why this is happening (another app with the same line results in correct Xcode console output). The Console.app does show the correct output: ••• channel 035 Any suggestions regarding what I'm not understanding? Thanks.
3
0
53
17h
Xcode not recognizing GoogleMaps theme colors with Swift
I have an Xcode project written in Objc where Xcode recognizes GoogleMaps code (GMS SDK 9) and applies appropriate theme colors. I'm porting the app into Swift and Xcode does not seem recognize GMS code for theme colors. The theme otherwise works and the Swift/GMS code works (ie the app works). I've tried 'Clean All Targets', deleting the DerivedData folder, cleaning the Xcode cache, re-installing the GMS SDK (both CocoaPod & manual methods) etc. When the Swift project is re-opened, Xcode shows the project is being re-indexed. After indexing, the rest of the code is 'colorized' - but not the GMS code. Both StackOverflow & StackExchange rejected this question. And Apple Developer Support has not been able to help (Case ID: 102334926141). Any advice will be greatly appreciated. TIA
1
0
33
4h
Xcode 16 Previews: dyld Loader Crash
We have been seeing a dyld loader crash when trying out the new Previews engine in Xcode 16 beta 3. Feedback filed with reproducer + diagnostics: https://feedbackassistant.apple.com/feedback/14323960 Investigation: Running nm -a on the debug dylib reveals duplicate SO entries pointing to SomeStatic.swift. One entry originates from the LibAStatic module, while the other comes from the LibBStatic module. Local workaround - 1 Providing unique file names resolves the issue. However, these files are in different modules, so ideally, this shouldn't be necessary. Our codebase is extensive, and many code-generated modules have the same file names. Therefore, renaming files to ensure uniqueness is not a simple solution for us due to various complexities. Local workaround - 2 Making these dependencies dylibs instead of static libraries also resolves the issue. However, we can't pursue this direction because a significant portion of our pre-build setup, foundations, and vendor linkages are statically linked. Note: The same flow works with "Legacy Preview Engine in Xcode 16/15" but dynamic replacement has other issues, which we are super happy that the new engine doesn't make use of. This issue is currently a blocker for us in trying out the new Previews in our project, it would be highly beneficial if this problem could be resolved soon.
1
0
89
6h
XCode 16 beta 3 creating a folder instead of a group for all project initial content
When I new project is initiated in XCode 16 beta 3, an overall folder is created to contain all the generated content in the Navigator pane . In past XCode version, this main container (under the project name) has always been generated as a group. Is this change by design or a bug? The issue this creates is that the files and folders in this overall Folder can not be repositioned - they remain in ascending alphabetical order. I must convert this initial Folder into a Group by right clicking on the folder name and selecting "Convert to group" which converts the folder to a group. I am then able to reposition files, groups and folders within this group. I don't see anywhere in the XCode documentation where this change in behavior is mentioned. Anyone else having this same issue. I never have understood the difference or use cases for groups vs folders in the xcode Navigator pane.
5
0
101
1d
Universal Frameworks and Requirements for Deployment
I got some beacons from a company who provides an SDK to connect to them. They provided two sets of framework files which the SDK is dependent on. The first set is built for Arm 64, and the second is built for x86. I am using them to build a framework for a company which says they require frameworks they integrate into their apps to work for both device and simulator. I think this is primarily for convenience during development. I've run into some walls trying to fulfill these requirements and have some questions about what is possible. The Beacon manufacturer claims the x86 framework files should work for both simulator and device during development, and that arm64 would be for deployment to the app store. I am unable to get x86 to work during development when my device is plugged in though. What does a framework need to work for both device and simulator? Is is possible, from strictly arm64 and strictly x86 framework files, to build universal framework files that supports both arm64 and x86? Then from those to build a new universal framework that leverages all of those? Can this resulting framework not only be used for development on simulator and device, but also be deployed to the app store? Thank you kindly, for your expertise.
1
0
50
9h
The base messages extension template builds but won't install or load
I am on a fresh install of Xcode 15.3 on macOS 14.4 (23E214). I created an iMessage App template and signed it with my personal team's certificate. When I click the run button, it successfully builds and opens the simulator to the Messages app but does not open the compact extension view (or install the extension such that it shows up in the More messages extension list). This reproduces on my older laptop (same version of Xcode) as well as my friend's (also same version of Xcode). Of note: The IceCreamBuilder app installs and runs correctly with no modifications I have not provided any icons for the messages extension The iMessage App template comes with an empty main app that does not install on the home screen The only console output that seems to differ from when I run the IceCreamBuilder is this message, which appears after a couple seconds of running the project: unhandled process MobileSMS Type: Error | Timestamp: 2024-03-09 00:41:07.763631-05:00 | Process: MobileSMS | Library: CoreParsec | Subsystem: com.apple.parsec | Category: CoreParsec | TID: 0xff097
7
1
792
Mar ’24
Circular Dependency when Creating
I am following these instructions to created a Safari Web Extension App project: https://developer.apple.com/documentation/safariservices/safari_web_extensions/creating_a_safari_web_extension When I try to compile the default code, I get this error: Circular dependency between modules 'Dispatch' and 'Foundation' At one point, it showed the error was in generatedassetssymbols.swift file, although I cant replicate that now. macOS, Sonoma 14.0, xcode 15.4 Anyone know what is going on? It is literally the default project without any changes.
1
0
101
2d
Developing and deploying iPhone test code in Windows environment
Hello, I am developing Java test code to test a web application on an Android and iPhone platforms using Selenium and Appium inside Eclipse IDE. Android device could be tested just fine. When it comes to instantiation of iOSDriver Object for running test script on an iPhone, the run time is complaining that it needs Xcode libraries, or Xcode tool on the class path. This makes it necessary to use a mac system for coding and install Xcode on it. Once I use a mac and develop the test code within my Eclipse, can I deploy the code on a Windows Server? Does the code would not need Xcode during run time or just the Selenium-java client libraries and Appium alone? Thanks a lot, -- Prasad Nutalapati
0
0
44
11h
Simulator iOS 15 Can't Response touch on Xcode 15.4
I have a problem with my xcode. I try to install apps xcodes to manage multiple xcode. My xcode version on 15.2(i try to run on iOS 15 SE1 it's no problem) and after that i try to install xcode 16 beta 3 i try to run iOS 15 SE1 the simulator blank. After that, i delete xcode 16 beta 3 and use xcode 15.2 i try to run on Simulator SE1 iOS 15 the simulator can't response touch. I try to trigger with Device menu on simulator Home, lock, trigger screenshot, etc. The simulator not response touch. How to solve this problem ? how to remove all simulator if uninstall xcodes.
0
0
29
13h
Which API for Ball to Surface accurate contact at 220 fps setting
Hello, We are thinking about a proof of concept test app, to determine accurately a 30-40, ball bounce with a horizontal surface(court). Question is and appreciate guidance, what API kits might be best for this? and can this API be set at 220 FPS 1080px setting and do the accurate analysis? I was thinking VisionKit? Also any examples of code, apps, links, and apps be very much appreciated. Open to some developer help/coding also :) Thank you so much.
1
0
46
1d
Xcode 15 doesn't fix Info.plist management bugs introduced in Xcode 14
Xcode 14 introduced some ridiculous Info.plist management bugs which are not yet fixed in Xcode 15: The bugs are manifested in the General and Info tabs of target management: -The Build value in the General tab is not in sync with the CFBundleVersion value in the Info tab (that is, changing the value in the General tab won't affect the Info tab and vice versa). -The App Category value in the General tab isn't in sync with the LSApplicationCategoryType value in the Info tab. -Additional document type properties in the Info tab cannot be added: clicking "Click here to add..." doesn't do anything. -Document types in Info tab cannot be deleted: once you added a document type instance (even as a test) there's no way to remove it.
3
0
1.8k
Jul ’23
Crash in Swift Data on iOS 17.5, Resolved in iOS 18.0 Developer Beta
Hey everyone, I'm a new developer working on my app. I'm facing an unusual problem during the App Store review process. The app works perfectly on my physical devices, running iOS 18.0 developer beta, but it consistently crashes on simulators with iOS 17.5. Due to this issue, my app has been rejected for iOS 17.5 because of the crashes. I know I should have avoided developing and testing the app on different versions, so please go easy on me :( Crash Details: Steps Leading to Crash: Opened the app Went to the Stocks section Clicked on Buy App crashed The Breakpoint Exception: Thread 1: EXC_BREAKPOINT (code=1, subcode=0x21b9f1620) Generated Infrastructure Code Section Triggering Crash: { @storageRestrictions(accesses: _$backingData, initializes: _stock) init(initialValue) { _$backingData.setValue(forKey: \.stock, to: initialValue) _stock = _SwiftDataNoType() } get { _$observationRegistrar.access(self, keyPath: \.stock) return self.getValue(forKey: \.stock) } set { _$observationRegistrar.withMutation(of: self, keyPath: \.stock) { self.setValue(forKey: \.stock, to: newValue) } } } The crash appears to be related to Swift Data handling during the trade operation in my app's TradeView. While I've managed to temporarily fix the issue by running the app on iOS 18.0, this is not a practical solution for the App Store release, which is my immediate concern. Has anyone else experienced similar issues with Swift Data on iOS 17.5? If yes, how did you solve it? Is there a known workaround or a better approach to ensure compatibility with iOS 17.5? Thank you in advance for your valuable assistance. I truly appreciate your help!
1
0
142
3d
AppIntents don't show up in Shortcuts app when in SPM package
Hi there, I successfully created an AppIntent for our app, and when I had it in the same target as our main app it showed up fine in the shortcuts app. Then I realized that many of the new System Control widgets introduced in iOS 18 (e.g. lockscreen, control center) live in the widget extension target, but they also need to reference that same AppIntent. So to fix this, I thought I'd migrate out the code into it's own SPM package that both the WidgetExtension and the Main App processes can reference. However, after doing that and rebuilding, the intent no longer shows up in the Shortcuts app. Furthermore, my AppShortcutsProvider class now has this error when trying to define the list of appShortcuts: App Intent <name> should be in the same target as AppShortcutsProvider Is this intended, and if so, how do we reference the same AppIntent across multiple targets?
1
0
89
1w
How do I use an Analytics file?
One of my customers is reporting a crash. He sent me a file called "Analytics-2024-07-08-200041.ips.ca.synced". I don't know what to do with this file. It appears to contain thousands of lines of JSON. I can read them, but the file is too large for me to find any specific problem. What is this file, how was it generated, and how am I supposed to use it? When I searched for the answer online, I kept running into instructions asking me to choose tabs or press buttons in Xcode that don't exist. I assume that this is because Xcode changed since those instructions were written. I did check for crash reports in the Organizer and it does not report any for the current version of my app, or any within the past two weeks for any version.
0
0
44
1d
Hardened Runtime is Not Enabled
Hello I´ve build a game in Unreal and try to get it for sale to a webshop (not Apple Store). For that, the game needs to be notarized etc. And to sell the outside of Apple Store you need to log in manually with Developer ID application in Xcode. Any idea why I get this error message: "Hardened Runtime is Not Enabled. "XXXXXXXX.app" must be rebuilt with support for the Hardened Runtime. Enable the Hardened Runtime capability in the project editor, test your app, rebuild your archive, and upload again. Any help appreciated, I´ve struggled with this for a week. All the best, Ramili
1
0
84
2d