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

Xcode Documentation

Post

Replies

Boosts

Views

Activity

Unable to add package dependencies in Package Manager
Hi, I try to add the Firebase requirements to my iOS application. I launched the package manager, at first, nothing was loading, therefore I deleted and recreated my Github account, and the previous packages now appears. When I try to paste the url for Firebase in the search bar, there is an infinite loading loop and it never appears. I tried to restart Xcode several times, to disconnect and reconnect from wifi etc. Can anyone help me solve this please?
1
0
59
2w
IBAgent Crash
Could someone help me with a good direction on where or how could I fix for this crash from console log: Not able to open storyboard or XIB. Once opening them, Xcode is crashing. tried uninstalling the Xcode, couldn't fix even after deleting derived data and caches. ------------------------------------- Translated Report (Full Report Below) ------------------------------------- Incident Identifier: 7E6D64FF-D4E9-4E3A-A37A-BC5016316DCD CrashReporter Key: 4776E37C-4D3D-F705-40D5-8A96EE95C89A Hardware Model: Mac15,6 Process: IBAgent-iOS [31688] Path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Overlays/IBAgent-iOS Identifier: IBAgent-iOS Version: 16.0 (23506) Code Type: ARM-64 (Native) Role: Unspecified Parent Process: launchd_sim [31680] Coalition: com.apple.CoreSimulator.SimDevice.178E8D7E-176F-4B7F-8956-D26C5EF7323A [5165] Responsible Process: SimulatorTrampoline [1185] Date/Time: 2024-11-06 14:59:29.3079 +0530 Launch Time: 2024-11-06 14:59:28.9368 +0530 OS Version: macOS 15.1 (24B83) Release Type: User Report Version: 104 Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0000000000000001, 0x0000000102e1e19c Termination Reason: SIGNAL 5 Trace/BPT trap: 5 Terminating Process: exc handler [31688] Triggered by Thread: 0 Application Specific Information: Abort Cause 259 Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_platform.dylib 0x102e1e19c _os_unfair_lock_recursive_abort + 36 1 libsystem_platform.dylib 0x102e19504 _os_unfair_lock_lock_slow + 304 2 libGSFont.dylib 0x19045ebb4 GSFontFileDescriptorForPath + 28 3 libFontParser.dylib 0x19047d714 TFileDescriptorContext::TFileDescriptorContext(char const*) + 216 4 libFontParser.dylib 0x19057c7e4 TFileDataReference::Map(char const*) + 36 5 libFontParser.dylib 0x19047d514 TFileDataReference::TFileDataReference(char const*) + 88 6 libFontParser.dylib 0x19057c934 TFileDataSurrogate::TFileDataSurrogate(char const*, timespec) + 152 7 libFontParser.dylib 0x1905cbaac TFont::CreateFontEntitiesForFile(char const*, timespec, bool, short, char const*) + 580 8 libFontParser.dylib 0x19047d1e0 FPFontCreateFontsWithPath + 200 9 CoreGraphics 0x18b612c54 create_private_data_array_with_path + 16 10 CoreGraphics 0x18b2cddd4 CGFontCreateFontsWithPath + 36 11 CoreGraphics 0x18b3389b0 CGFontCreateFontsWithURL + 680 12 libGSFont.dylib 0x190465518 AddFontsFromURLOrPath + 288 13 libGSFont.dylib 0x19045ffb4 RegisterURLAndCopyFaces + 168 14 libGSFont.dylib 0x19045fefc GSFontRegisterURL + 76 15 CoreText 0x181c5e0b8 _CTFontManagerRegisterActionFontsForURLs(__CFArray const*, CTFontManagerScope, bool, Action, __CFArray const**) + 396 16 IBCocoaTouchToolFoundation 0x10307e748 +[UIFont(IBCocoaTouchToolIntegration) ib_registerFontsAtURLs:] + 336 17 AssetCatalogFoundation 0x1033e1a88 __80-[IBMessageReceiveChannel deliverMessage:toTarget:withArguments:context:result:]_block_invoke + 196 18 AssetCatalogFoundation 0x1033e191c -[IBMessageReceiveChannel deliverMessage:toTarget:withArguments:context:result:] + 328 19 AssetCatalogFoundation 0x1033e14bc __88-[IBMessageReceiveChannel runBlockingReceiveLoopNotifyingQueue:notifyingTarget:context:]_block_invoke + 100 20 libdispatch.dylib 0x180178de0 _dispatch_client_callout + 16 21 libdispatch.dylib 0x180188bc8 _dispatch_async_and_wait_invoke + 112 22 libdispatch.dylib 0x180178de0 _dispatch_client_callout + 16 23 libdispatch.dylib 0x180187c60 _dispatch_main_queue_drain + 1272 24 libdispatch.dylib 0x180187758 _dispatch_main_queue_callback_4CF + 40 25 CoreFoundation 0x18041b2dc __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12 26 CoreFoundation 0x180415838 __CFRunLoopRun + 1944 27 CoreFoundation 0x180414c24 CFRunLoopRunSpecific + 552 28 Foundation 0x180f319c8 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 208 29 AssetCatalogFoundation 0x1033bdc00 -[IBAbstractPlatformTool startServingReceiveChannel:] + 292 30 AssetCatalogFoundation 0x1033bddf4 -[IBAbstractPlatformTool startServingWriteDescriptor:readDescriptor:] + 96 31 AssetCatalogFoundation 0x1033be718 +[IBAbstractPlatformTool main] + 800 32 IBAgent-iOS 0x102b77930 main + 32 33 dyld_sim 0x102b89410 start_sim + 20 34 dyld 0x102c96274 start + 2840
1
1
96
2w
没法删除语言
只能在string catalog里面添加语言,不能删除语言??这是什么设计? 在Project里面删除语言,并不能删除Localizable中的语言。但是如果这个语言没有任何国际化,是可以的。 也就是说,删不了曾经做过国际化的语言。 我应用还没发布,还在开发呢,为什么不让我删除语言??????????????????????????、
1
0
80
2w
Profile doesn't include the selected signing certificate
Hello, I have tried both automatic signing and manual signing, and still when I submit I get an error message that says "Provisioning profile failed qualification" and "Profile doesn't include the selected signing certificate.". Everything had been working fine, but I think it may have broken with an Xcode update - not sure. Please let me know what to look for. I appreciate any help you can give me.
1
0
111
2w
Xcode basics
I am trying to learn Xcode with C as a start to learning to program. So far I have not gotten Xcode to successfully build and run a program using C on Mac OS. Any recommendations on basic troubleshooting for Xcode setup and orientation. Every program I try to run says "Build failed".
6
0
146
2w
When application merges libswift_concurrency.dylib is duplicated in app binary
Environment: Xcode 16.1 Swift version: 6.0.2 Inside of an Xcode project, if I declare a framework and an application. The framework is mergeable and the application merges the framework by configuring MERGE_BINARY_TYPE to Manual (or automatic it's independent). If SWIFT_VERSION is set to 6.0.X and deployment target is set to iOS 15< the build is going to fail because of this error Duplicate linked dylib '@rpath/libswift_Concurrency.dylib' in '/Users/**/Library/Developer/Xcode/DerivedData/GSPackage-dvnngsrgctfovgfbvwdlsscfycyq/Build/Products/Debug-iphonesimulator/DummyApp.app/DummyApp.debug.dylib' If I'm checking the generated artifact and inspect all of it's @rpath with otool it's giving me the following: otool -L /Users/****/Library/Developer/Xcode/DerivedData/Dummy-gbccsjwxeajftsafghxzaqksgfim/Build/Products/Debug-iphonesimulator/Dummy.app/Dummy.debug.dylib | grep @rpath @rpath/Dummy.debug.dylib (compatibility version 0.0.0, current version 0.0.0) @rpath/libswift_Concurrency.dylib (compatibility version 1.0.0, current version 0.0.0, weak) @rpath/libswift_Concurrency.dylib (compatibility version 1.0.0, current version 0.0.0, weak) A radar is already opened with the ID: FB15693702
0
0
126
2w
App Groups: How to use group. prefix and Team ID prefix for Multiplatform apps?
Hi there, I have a Multiplatform app with just one app target with an iPhone, iPad and Мас Destination. On the Mac my app is a developer singed App that is being distributed outside of the Mac App Store. I want to use App Groups, but as long as there are multiple destinations, Xcode only allows Group Identifiers starting with group.. However, for macOS I need to have a group ID that starts with the TeamID as explained here. So I created two separate entitlements, which are identical, but with different group IDs: With Automatic Code Signing enabled, I get this warning: Xcode still seems thinks it has to use the macOS Group ID for the iOS version. In the App Groups section, the mac Group ID is red and the iOS Group ID is not checked. The app builds and runs without issues on all platforms. The App Store Connect validation (for the iOS version) also works without any errors. Am I doing something wrong? Do I need a separate Mac target because Xcode does not support separate Group IDs for Multiplatform apps?
2
1
151
2w
macOS Sequoia doesn't respect Full Disk Access for UITests-Runner
We develop and test App for macOS. We start to see system alert - "UlTests-Runner" would like to access data from other apps on each UITest run. Our test suite does cleanup of files generated by App so we need access outside of UITests-Runner sandbox. We enabled Full Disk Access for UITests-Runner at Settings -> Privacy & Security -> Full Disk Access but unfortunately still see this alert. Is there any way to permanently remove/hide this alert or remove sandbox for 'UITests-Runner' since we want to run tests on CI and having this alert is not an option? Note: everything works fine on previous versions of macOS. Environment: macOS - 15.1 (24B83) Xcode - Version 16.1 (16B40)
0
1
134
2w
'Expand macro' menu option does nothing
I somehow broke my Xcode, it does not expand macros anymore. What I have tried: create new project clean the project remove derived data remove contents of ~/Library/org.swift.swiftpm/security What I have not tried: remove Xcode completely and re-install it (will have to re-setup everything, so don't want to resort to it) Xcode version is 16.1. The 'Add File' button has everything grayed-out, so I can't upload a video here, and 'YouTube' website is not a valid URL here for some reason. Has anyone else faced a similar problem?
1
0
80
2w
Is it possible to include source code from an app extension in a framework?
If I have an XCode project that generates a framework when built, then I've noticed that its possible to add new additional targets to the project of type app extension. However if I add some source code to an app extension and regenerate the framework, then that source code is not accessable from the resulting framework (i.e. if the framework is included into an app, then the app code doesn't have visibility of the code that was added to the extension in the framework). Is this something which is possible to achieve? Ideally I would like to package the main source code that constitutes the framework content, along with the source code for a few extensions into a single framework, so that the app(s) that use the framework can include the framework into their main app target and also include it in the app extension target. I noticed that if the scheme of the framework is changed to the extension before building, then the result is not a .framework file but a .appex file. For client apps of the framework, can they directly include/use that .appex file? If so how can that be achieved? Does
1
0
109
2w
Localization Issue with Multiple Build Targets in Xcode - One Target Not Recognizing Localizable.strings File
Hello Apple Developer Community, I'm experiencing an issue with localization in my Xcode project that has two build targets, "Build X" and "Build Y." Both targets are set up to support the same language, but they each have slightly different wording, which is why I've created separate Localizable.strings files for each build target. Here's an overview of my setup: Project Structure I have a Localizable folder with two subfolders: Localizable/OrdnerX/Localizable.strings (for Build X) Localizable/OrdnerY/Localizable.strings (for Build Y) Configuration In the File Inspector, I’ve assigned each Localizable.strings file to its corresponding build target: OrdnerX/Localizable.strings is linked to Build X OrdnerY/Localizable.strings is linked to Build Y Under Build Phases, I verified that each build target references the correct Localizable.strings file. The paths are all correctly set, so each target should know where to find its respective localization file. Problem When I build and run Build X, everything works perfectly. The app displays the correct localized strings from OrdnerX/Localizable.strings. However, when I switch to Build Y, the app fails to find the localized strings from OrdnerY/Localizable.strings, and I’m left with placeholder text instead. I’ve double-checked the configurations for both build targets multiple times, and they appear identical. The Localizable.strings files for both targets are configured in exactly the same way, but Build Y just doesn’t seem to recognize its assigned localization file. Has anyone encountered a similar issue, or can anyone suggest potential fixes? I’d appreciate any advice on what might be causing this discrepancy. Thank you in advance!
0
0
72
2w
Is it possible to change the Xcode template type?
I've got a few years old app which was created using an Xcode template type of app. I'd like to split the model part of the code (model as in model-view-controller) out into a framework. Removed the view/controller source files to leave the model code is quick and easy, however the model code is large and complex with a couple of hundred of source files. Rather than create a new Xcode template type of framework and move the source files into there, is it possible to simply just change the template type of the existing project from app to framework?
1
0
99
2w
Transition to Apple Silicon Mac
I am currently developing on an Intel Mac and am thinking about switching to an Apple Silicon-equipped Mac soon. When I searched the web, I found that a very complicated migration process would be required, but what exactly would be required? Thank you for your response.
1
0
52
2w
Xcode will not build / run
No luck with my first post in getting a response despite 24 views. Will try again. I am trying to build/run this main() function in C language. Keep getting build fail message. #include <stdio.h> #include <math.h> int main() { float a,b; printf("Enter value for A: "); scanf("%f" ,&a); printf("Enter value for B: "); scanf("%f" ,&b); printf("%f + %f = %f\n",a,b,a+b); printf("%f - %f = %f\n",a,b,a-b); printf("%f * %f = %f\n",a,b,a*b); printf("%f / %f = %f\n",a,b,a/b); printf("%f to the power of %f = %f\n",a,b,pow(a,b)); printf("The square root of %f is %f\n",a,sqrt(a)); printf("The square root of %f is %f\n",a,sqrt(b)); return(0); } ANY feedback appreciated on why Xcode does not work here. I am a beginning programmer. Thanks.
1
0
106
2w
Xcode will not build function
I am self-learning basic C programming and have installed Xcode v. 14.2 on MacOS Monterey v. 12.7.5. I cannot get any programs I write under a new project I created to build and run on Xcode. Here is an example of what I am trying to build and run: #include <stdio.h> int main() { char test_string[] = "new string text"; printf("This process will %s\n",test_string); return(0); } Any guidance or feedback would be appreciated.
2
0
104
2w
Can't compile asset catalog when including iMessage App Icon asset
I'm trying to add an iMessage extension to my app, and upon adding the iMessage App Icon set, I ran into an issue with one specific icon size: 1024x768px, aka 1x 1024x768pt. When I remove this one icon from the icon set, it compiles and runs fine, however I can't push it to the App Store as I get the error: "Asset validation failed. Missing Image Asset. Your app is missing the Large App Icon asset 'AppIcon' in 'Payload/Runner.app/PlugIns/MessagesExtension.appex'." I'm assuming this refers to 1024x768px, as this size placeholder appears upon adding a New Messages Extension Icon to my assets folder, and 1024x1024 is already included and compiles fine with it. However, when I add the 1024x768 icon, and try to run the app, I get the error: "Command CompileAssetCatalog failed with a nonzero exit code" The app icon's filename is correct, it is exactly 1024x768 px, and my contents.json correctly includes : { "filename" : "AppIcon_1024x768.png", "idiom" : "ios-marketing", "platform" : "ios", "scale" : "1x", "size" : "1024x768" } as is the same format for all of my other icons that work. Why am I running into this issue upon inclusion of this one required size? How do I fix it?
1
0
160
2w