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

Xcode Documentation

Post

Replies

Boosts

Views

Activity

XIB file is showing an old version
I am trying to update my AboutView.xib file (https://git.callpipe.com/AccelerateNetworks/an-mobile-ios/-/blob/main/Classes/Base.lproj/AboutView.xib) through the xcode interface builder, and the changes that I make are correctly reflected in the wysiwyg, as well as in the file itself. However, I whenever the app is built and installed, it shows an older version of the about page. Things I have tried to resolve this are (not listed in order): Product > Clean Build Folder Uninstall and reinstall the app Restart the phone Restart xcode Restart the computer Test a build created through xcode cloud rm -rv ~/Library/Developer/Xcode/DerivedData rm -rf ~/Library/Caches/com.apple.dt.Xcode rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache" Changing something in the xib file (hoping it will recognize a change) The only time the about page has shown something different is when I deleted the xib entirely. The project still built and deployed to the test device, but the about page was completely blank. This tells me I am working with the correct file, and when I look at the xml contents of the file, I can't find any of the old strings that are showing up. What the editor shows: What the app shows:
0
0
45
6h
Xcode 16's clang generates incorrect inlined optimized code
I'm encountering a bug with Xcode 16's clang's code generation. It seems to be generating incorrect optimized code (-O2 setting) when functions are inlined and then optimized. This is a behavior that didn't exist in Xcode 15, and also doesn't happen in open source clang (I tested open source clang 17/18/19 on my M1 Max MacBook Pro). The entire code snippet is slightly too long to post here so I'm including a link to the godbolt compiler explorer instead: https://godbolt.org/z/KhG3x7E1d . This piece of code attempts to find a sequence of illegal UTF-8 characters and report the index of the character in a string. Not that in godbolt, the program works fine and finishes correctly. When I test it in Xcode 16 though (with -O2), it doesn't, and utf_find_illegal returns 4 instead of 3, which is incorrect. Digging through the disassembly it seems to be doing some complicated optimizations by inlining both utf_ptr2len and utf_ptr2char together but it doesn't perform correctly and jumped to the wrong place when the illegal character was found. I did try to see if there are some undefined behaviors or something which caused the optimizer to go to town with the code. Funnily when I use UBSAN (by compiling the code with -O2 -fsanitize=undefined) the code works just fine and the bug doesn't happen. Wonder if other people have seen similar issues? Code generation bugs seem really dangerous considering that people rely on the compiler to… work. I tried to scrub the code to see if there are anything that could suggest the compiler to behave incorrectly but not having any luck as well. I have also tested Xcode 16.1 beta and it doesn't seem to help. Note: Yes, I know I'm supposed to use the Feedback Assistant but I have never received any responses on it even when filing legit bugs and their statuses are still open, with their bugs unfixed. Pardon me for not trusting it too much.
0
0
71
7h
Issue of viewing MPSGraph compiled for iOS platform
We convert a .onnx file to mpsgraphpackage for iOS deploymentPlatform with command “Mpsgraphtool convert -deploymentPlatform iOS -minimumDeploymentTarget17.0.0 model.onnx -path .” When open output.mpsgraphpackage with Xcode16, there are only “generic” and “ Apple M2(MTLDevice)” options in the “Device” selection list. Cannot find any option for iOS device. How can we view mpsgraph compiled for iOS platform? We use Xcode16 on a MacBook Pro M2 with macOS 15.
0
0
76
9h
Cannot install iOS 18 Simulator in Xcode 16 on Sonoma 14.6.1
Attempting to upgrade to Xcode 16 from 15.3. My team is installing the application from the Apple Developer website, and we are able to successfully install the application and run it. The issue occurs when attempting to install the iOS 18 simulator. We continue to get the same error when attempting to install the simulator via: Xcode CLI using the xcodebuild -downloadPlatform iOS command Downloading the dmg file from the Apple Developer website and running xcrun simctl runtime add iOS_18_Simulator_Runtime.dmg The error we continue to get is the following: Downloading iOS 18.0 Simulator (22A3351): Error: Error Domain=DVTDownloadableErrorDomain Code=29 "Registering simulator runtime with CoreSimulator failed." UserInfo={NSLocalizedDescription=Registering simulator runtime with CoreSimulator failed., NSUnderlyingError=0x600002c70930 {Error Domain=com.apple.CoreSimulator.simdiskimaged.SimDiskImageError Code=10 "Mount failed: SUIS premount dissented" UserInfo={NSLocalizedDescription=Mount failed: SUIS premount dissented, NSLocalizedFailureReason=the operation is not appropriate (kDAReturnNotPermitted)}}} We have attempted reinstalling Xcode multiple times, including cleaning out the Developer directory. We made sure there is over 50GB of space available on the disk, to validate it isn't a space issue. We're currently on macOS Sonoma 14.6.1, which looks like it should be compatible, and might look at updating to macOS 15 to see if that corrects the issue.
0
0
38
10h
SVG Assets for regular size class are not being picked up by iPads
I’m encountering an issue with image assets when using SVGs in my app. I need to provide different images for regular and compact width size classes. Here’s what I’m doing: 1. Added SVG image assets for dark and light modes 2. Preserve Vector Data is checked. 3. Appearances is set to `Any, Dark` 4. Set the width class to `Any & Regular` and the height class to `Any` However, when I run the app on iPads, it picks up the images for the compact size class instead of the regular size class ones. Any help or suggestions would be greatly appreciated!
1
0
57
11h
UI automation with iphone mirroring
My use case is to run UI automation on ios device in lab. To do that I have a iOS device connected to Mac. and My goal is to Run periodic UI automation on device Control iOS device via Mac To control the device, I enabled iphone mirroring (support added in MacOS 15 and ios 18.0 onwards) but for this device has to be locked. When I keep the iOS device locked, the APP UI contents are not available to Xcode. How to solve this? If I disable the mirroring, Xcode is able to read App content, but I can't control the device via Mac.
0
0
16
20h
Errors with XCode C++ Standard Libraries
So I was searching for answer to this question but nothing really came up. I am building a C++ static library for iOS and I use <vector> from standard library. However when I try to build I get error from within SDK iOS 17.5 char_trait.h as follows: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.5.sdk/usr/include/c++/v1/__string/char_traits.h:290:17 No member named '__constexpr_wmemcmp' in namespace 'std'; did you mean '__constexpr_memchr'? and in constexpr_c_functions.h as follows: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.5.sdk/usr/include/c++/v1/__string/constexpr_c_functions.h:117:3 Static assertion failed due to requirement 'sizeof(const wchar_t) == 1': Calling memchr on non-trivially equality comparable types is unsafe. I've set my c/c++ standards to C17 and C++17 in the build settings. I have no idea what these weird errors are. Could really use some help.
1
0
77
23h
"Unable to Install" Message
Getting this in the message: Upgrade's application-identifier entitlement string (2B7D2DT292.com.…) does not match installed application's application-identifier string (724QD58FHA.com…); rejecting upgrade. … Upgrade's application-identifier entitlement string … does not match installed application's application-identifier string …; rejecting upgrade. … The Library/Developer/Xcode/DerivedData folder contains three children folders for the Xcode Project. Could the three Xcode Project children folders be deleted, then Run the Project. Then generating a single new Project Folder? No other Xcode Project has more than one child folder. I'm also having a problem Adding an Image in this New Post. Could this be related to my Developer Account settings?
2
0
77
1d
Voice recording cannot be enabled in ios 17.2
AddInstanceForFactory: No factory registered for id <CFUUID 0x6000002e76c0> F8BB1C28-BAE8-11D6-9C31-00039315CD46 AudioQueueObject.cpp:1580 BuildConverter: AudioConverterNew returned -50 from: 0 ch, 16000 Hz, .... (0x00000000) 0 bits/channel, 0 bytes/packet, 0 frames/packet, 0 bytes/frame to: 2 ch, 16000 Hz, Int16, interleaved HALSystem.cpp:2216 AudioObjectPropertiesChanged: no such object AQMEIO_HAL.cpp:2552 timeout AudioHardware-mac-imp.cpp:2706 AudioDeviceStop: no device with given ID AudioQueueObject.cpp:1580 BuildConverter: AudioConverterNew returned -50 from: 0 ch, 16000 Hz, .... (0x00000000) 0 bits/channel, 0 bytes/packet, 0 frames/packet, 0 bytes/frame to: 2 ch, 16000 Hz, Int16, interleaved AudioQueueObject.cpp:6707 ConvertInput: aq@0x109994200: AudioConverterFillComplexBuffer returned -50, packetCount 5328 Xcode version 15.2(15C500b) iPhone 15Pro Version 17.2 (Simulator) Language : Swift In version 17.0 or above, there are no recording issues in the object-c project, iPhone and simulators can't start recording, Why?
2
0
55
1d
XCodeBuild (Xcode16) account verification error
Our CI process uses XcodeBuild tools. It used to work very well. The shell code is as follows: step 1 "++++++++++++++++clean++++++++++++++++" xcodebuild clean -workspace ${WORKSPACE_NAME}.xcworkspace \ -scheme ${SCHEME_NAME} \ -configuration ${configuration} step 2 "+++++++++++++++++archive+++++++++++++++++" xcodebuild archive -workspace ${WORKSPACE_NAME}.xcworkspace \ -scheme ${SCHEME_NAME} \ -configuration ${configuration} \ -archivePath ${ARCHIVE_PATH} -allowProvisioningUpdates YES step 3 "+++++++++++++++++ipa+++++++++++++++++" xcodebuild -exportArchive \ -archivePath ${ARCHIVE_PATH} \ -exportPath "${IPA_PATH}" \ -exportOptionsPlist ${EXPORT_METHOD_PLIST_PATH} \ -allowProvisioningUpdates YES However, there is a problem after upgrading Xcode16. When it is executed to the third step, there will be an error in the error account. Even if I delete my developer account, and then log in again, the same error will still be reported. The specific error is as follows: ** ARCHIVE SUCCEEDED ** /var/folders/ch/1mvd9gz11cn8zy9h254qz2600000gn/T/jenkins6531487518988891980.sh: line 194: -allowProvisioningUpdates: command not found +++++++++++++++++ipa+++++++++++++++++ 2024-10-10 18:20:35.630 xcodebuild[58030:2528109] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path "/var/folders/ch/1mvd9gz11cn8zy9h254qz2600000gn/T/xxxxxx_2024-10-10_18-20-35.623.xcdistributionlogs". 2024-10-10 18:20:35.724 xcodebuild[58030:2528191] DVTDeveloperAccountManager: Failed to load credentials for xxxxxxxxxx: Error Domain=DVTDeveloperAccountCredentialsError Code=0 "Invalid credentials in keychain for xxxxxxxxxx, missing Xcode-Username" UserInfo={NSLocalizedDescription=Invalid credentials in keychain for xxxxxxxxxx, missing Xcode-Username} 2024-10-10 18:20:35.733 xcodebuild[58030:2528191] DVTDeveloperAccountManager: Failed to load credentials for F38D3CD7-C794-4F88-93ED-4FDDD8EDF72B: Error Domain=DVTDeveloperAccountCredentialsError Code=0 "Invalid credentials in keychain for F38D3CD7-C794-4F88-93ED-4FDDD8EDF72B, missing Xcode-Username" UserInfo={NSLocalizedDescription=Invalid credentials in keychain for F38D3CD7-C794-4F88-93ED-4FDDD8EDF72B, missing Xcode-Username} 2024-10-10 18:20:35.742 xcodebuild[58030:2528191] DVTDeveloperAccountManager: Failed to load credentials for ***@***.com: Error Domain=DVTDeveloperAccountCredentialsError Code=0 "Invalid credentials in keychain for ***@***.com, missing Xcode-Token" UserInfo={NSLocalizedDescription=Invalid credentials in keychain for ***@***.com, missing Xcode-Token} 2024-10-10 18:20:40.521 xcodebuild[58030:2528195] IDEDistribution: Failed to log in with account "(null)" while checking for an App Store Connect account (Error Domain=DVTServicesAccountBasedSessionErrorDomain Code=0 "Unable to log in with account ''." UserInfo={NSLocalizedFailureReason=Unable to log in with account ''., NSLocalizedRecoverySuggestion=The login details for account '' were rejected., DVTDeveloperAccountErrorAccount=<DVTAppleIDBasedDeveloperAccount: 0x600002d92a80; username=''>, NSUnderlyingError=0x600002758ab0 {Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired. Please log in." UserInfo={payload={ creationTimestamp = "2024-10-10T10:20:40Z"; httpCode = 200; protocolVersion = QH65B2; requestUrl = "https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action"; responseId = "12827504-3d86-4601-bcf7-efc0dccb0655"; resultCode = 1100; resultString = "Your session has expired. Please log in."; userLocale = "en_US"; userString = "Your session has expired. Please log in."; }, NSLocalizedDescription=Your session has expired. Please log in.}}}) 2024-10-10 18:20:40.760 xcodebuild[58030:2528195] IDEDistribution: Failed to log in with account "(null)" while checking for an App Store Connect account (Error Domain=DVTServicesAccountBasedSessionErrorDomain Code=0 "Unable to log in with account ''." UserInfo={NSLocalizedFailureReason=Unable to log in with account ''., NSLocalizedRecoverySuggestion=The login details for account '' were rejected., DVTDeveloperAccountErrorAccount=<DVTAppleIDBasedDeveloperAccount: 0x600002de7e80; username=''>, NSUnderlyingError=0x6000027842d0 {Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired. Please log in." UserInfo={payload={ creationTimestamp = "2024-10-10T10:20:40Z"; httpCode = 200; protocolVersion = QH65B2; requestUrl = "https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action"; responseId = "e49c99d0-861c-4d80-9cd7-8430bcdfa6a6"; resultCode = 1100; resultString = "Your session has expired. Please log in."; userLocale = "en_US"; userString = "Your session has expired. Please log in."; }, NSLocalizedDescription=Your session has expired. Please log in.}}}) 2024-10-10 18:20:41.053 xcodebuild[58030:2528195] IDEDistribution: Failed to log in with account "(null)" while checking for an App Store Connect account (Error Domain=DVTServicesAccountBasedSessionErrorDomain Code=0 "Unable to log in with account '***@***.com'." UserInfo={NSLocalizedFailureReason=Unable to log in with account '***@***.com'., NSLocalizedRecoverySuggestion=The login details for account '***@***.com' were rejected., DVTDeveloperAccountErrorAccount=<DVTAppleIDBasedDeveloperAccount: 0x600002de7b80; username='***@***.com'>, NSUnderlyingError=0x6000027a4780 {Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired. Please log in." UserInfo={payload={ creationTimestamp = "2024-10-10T10:20:41Z"; httpCode = 200; protocolVersion = QH65B2; requestUrl = "https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action"; responseId = "5819c66e-bd35-4af3-ae6a-0e66193fa2bb"; resultCode = 1100; resultString = "Your session has expired. Please log in."; userLocale = "en_US"; userString = "Your session has expired. Please log in."; }, NSLocalizedDescription=Your session has expired. Please log in.}}}) error: exportArchive The operation couldn’t be completed. Unable to log in with account ''. error: exportArchive Provisioning profile "iOS Team Store Provisioning Profile: com.xxxx.xxxxx" doesn't include signing certificate "Apple Distribution: xxxxxxxxxxx". ** EXPORT FAILED ** At the same time, a lot of blank error accounts will appear in Xcode-Settings-ACCOUNT. The screenshots are as follows How should I solve this problem, I look forward to your reply very much
1
0
76
1d
#import <PDFKit/PDFKit.h> causes a problem
A little lost here so suggestions welcome. Existing code, working well for years. MacOS upgrade (Sequoia) and suddenly issues with #import <PDFKit/PDFKit.h> causing the following error message /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFDocument.h:26:53 Expected identifier or '{'
0
0
49
1d
Could not build obective-c module error for Swift Code
Setup: PLATFORM AND VERSION: iOS Development environment: Xcode Version 16.0 (16A242d), macOS 14.6.1 Run-time configuration: iOS 15-18 tried with same error. When building the app despite the fact it's pure Swift code getting error: CaPark.swift file is here: import Foundation class CarPark: Identifiable, Decodable { var carParkId: String var address: String var totalLots: String var lotsAvailable: String? var lotType:String var lat: Double var lng: Double var couponEps: String var agency: String } Issue seems like started after xcode update to version mentioned above. What i've tried: Clean ups Reinstallation of Xcoce Rollback to previous versions of Xcode Start clean project from VCS App is published and multiple versions were uploaded to AppStore, this problem is new and came out of nowhere. Let me know if additional info is required. Thank you!
0
0
35
1d
SSL Cert Interception | XCode Preview
Hello! My company makes use of SSL interception for its managed laptops (for various information security reasons). We've yet to find a good solution to avoid SSL cert errors in the Xcode Preview app. We've successfully installed/trusted our certs in the Xcode Simulator, but can't find any information on how to do the equivalent for the Xcode Preview. The inability to make use of the Preview App profoundly impacts productivity. It appears the Xcode Preview doesn't share the same certificate store as the Simulator, nor does it make use of the Mac's system keychain (where the certificates are also installed and trusted). If there’s anyone you can think of who might know a way around this issue it would be greatly appreciated. Many thanks!
1
0
88
2d