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

Xcode Documentation

Post

Replies

Boosts

Views

Activity

Xcode show changes in GitHub PR leads to endless spinner
I created a new Project on Xcode 16 on macOS Sequoia and connected it to a GitHub repository. After making a change on a sub branch, I opened a pull request. On GitHub I can see the changes I made in a diff view. However when I select the PR in Xcode and click on "View Changes" all I get is a endless spinning activity indicator. I could not find anything that would explain this behavior. Any help very welcome.
1
1
71
1w
Getting GTK4 to work with Xcode
Hi everyone, sorry if this post comes off odd, I'm on heavy meds but I intend to do foss gtk development in c on my Mac using Xcode, I've used brew to download the gtk libraries and I've individually added each path to each library for autocorrect and intelligence in Xcode But when I build a GTK app in Xcode I get a bunch of 'Unresolved Symbol' messages, here's an example: Undefined symbol: _g_application_get_type I also get about 460 warnings from various libraries stating: /opt/homebrew/Cellar/cairo/1.18.2/include/cairo/cairo.h:2773:5 '@callback' command should be used in a comment attached to a pointer to function declaration I understand that when you need to compile GTK, you need to pass a command to the compiler (in this case pkg-config --libs --cflags gtk4), where in Xcode's project manager do I add that code? I think I'm supposed to run that command and add the output somewhere line by line to a combobox in Xcode, but where? "other linker flags"? Has anyone had any luck compiling GTK apps directly from Xcode?
1
0
75
1w
IOS app fails to build on Xcode 16 RC but had no issues on Xcode 15
Xcode 16 RC refuses to recognise my iPhone 13 mini running IOS 18 as a device and won’t compile onto it. Using the exact same setup I can compile onto my iPad running IOS 17.5. Xcode used to compile onto it (Xcode 15.x and iphone on IOS 17.x). My iphone is a known device in my developer account. I have switched on ‘Developer Mode’ in the iPhone Settings and rebooted. I am using an Apple lightning cable. I’ve tried changing USB ports. The Mac recognises it in Finder. On one app my minimum deployment is IOS 17. I have created a new app where the minimum deployment is IOS 18 and tried both in combinations, below. I can plug in my iPad running iPadOS 17 and Xcode 16 RC will compile successfully onto it (app is minimum deployment IOS 17) , just not my iPhone now that I upgraded it to IOS 18. I have: installed the Iphone 13 mini simulator with IOS 18 on Xcode 16 RC and compiled successfully to that with both apps. rebooted all devices and replugged all devices in countless combinations, countless times. tried different apps with different minimum deployments, including sample code written by others. tried setting my minimum deployments to IOS 18 The main issue is that at best, Xcode 16 RC ‘sees’ my iPhone mini and tries to pair with it but doesn’t succeed. I tried following this thread: https://developer.apple.com/forums/thread/764196?answerId=804884022#804884022 and tried ‘Quick fix 1’. Which at least allowed Xcode to sometimes ‘see’ my phone, but after a few reboots, no longer does. Quick Fix 1: “Open Terminal and run (replacing the path to Xcode 16.0 if needed): sudo installer -pkg /Applications/Xcode.app/Contents/Resources/Packages/XcodeSystemResources.pkg -target /“ Apple M1 Pro - Sequoia 15.0 (24A335) Xcode Version 16.0 (16A242d) I have submitted feedback: FB15264854
0
1
747
1w
Crash without stack trace in optimized builds on device (Xcode 16)
Hi, I'm looking for some advise how to narrow down the location of the crash. When I run the app with Debug configuration (GCC_OPTIMIZATION_LEVEL=0) everything just works. But in Release configuration with -Os the app crashes. Also need to mention that the crash happens on the device only, but not on the simulator. When the crash happens, there's no stack trace available. The crash happens every time, a couple seconds after I see the first screen. Currently I'm using Xcode Version 16.0 (16A242d), but I have also tried all combinations of: Xcode 16.1 Beta 1 Xcode 16.1 Beta 2 Device with iOS 18 Device with iOS 17.7 Device with iOS 17.6.1 The result is always the same. (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=257, address=0x100000002) * frame #0: 0x0000000100000002 Is there anything I can do to further narrow down the location of the crash? Here's a full crash report that I got from the device: https://gist.github.com/plu/e9ed984f438358b5fbf120148cbbaef0
1
0
60
1w
Running local package's tests in main app's test plan
Hi, I work on a iOS application which includes several local swift packages containing modularised code. Each of those local swift packages has a test target defined in their respective Package.swift, and when opening a local package folder standalone in Xcode, then the tests run without issues. However I would like in the main app's test plan to add the local package test targets and have them all run together when the main app's default test plan is run. Xcode allows me to select local package test targets within the main app's test plan (also within Test portion of the main app's scheme), however attempting to build for testing throws a "Module '…' was not compiled for testing". Any ideas on how to achieve this goal (run local package tests in conjunction with main app's tests) and avoid that error? Thanks Peter
0
1
117
1w
When AppEnum or AppEntity is introduced into the iOS18 Widget file, xcode compilation will report an error: Error collecting extracted types: The file “SmartPlusWidgetControl.swift” couldn’t be opened because the text encoding of its contents can’t b
When AppEnum or AppEntity is introduced into the iOS18 Widget file, xcode compilation will report an error: Error collecting extracted types: The file “SmartPlusWidgetControl.swift” couldn’t be opened because the text encoding of its contents can’t be determined.
0
0
90
1w
Package.resolved discrepency
We are using a workspace file and have noticed that when we run fastlane commands that utilize xcodebuild command line arguments to run the export localization command from commandline, and it seems that it uses the xcodeproj package.resolved instead of the workspace package.resolved. This is causing issues as the xcodeproj package resolved will not update at all so is on old version of dependencies that cause xcodebuild commands to fail. Why is there multiple package.resolved files and why does the xcodeproj not stay updated with what is in the workspace resolved file? Why won't the xcodeproj resolved file update when I'm opening the xcodeproj file and selecting specific dependencies and telling it to update the package.
0
0
77
1w
Xcodebuild linker error - referencing Mac OS SDK for iOS builds.
I'm trying to build an iOS project in command line via xcodebuild. OS: Mac OS 15.1 beta Xcode: Xcode 16 Creating a new iOS project and trying to run xcodebuild results in this error. No other dependencies, no frameworks added. ld: building for 'iOS', but linking in dylib (/Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk/usr/lib/libobjc.A.tbd) built for 'macOS macCatalyst zippered(macOS/Catalyst)' My initial plan was to do this with a VisionOS project, but for some reason, I'm getting errors like this for both platforms and brand new projects. Any pointers as to what is referencing the MacOS SDK and how I can fix this would be helpful. Complete log: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk iphoneos -configuration Release -scheme iphonedummy build CODE_SIGNING_ALLOWED=NO -verbose User defaults from command line: IDEPackageSupportUseBuiltinSCM = YES Build settings from command line: CODE_SIGNING_ALLOWED = NO SDKROOT = iphoneos18.0 Prepare packages ComputeTargetDependencyGraph note: Building targets in dependency order note: Target dependency graph (1 target) Target 'iphonedummy' in project 'iphonedummy' (no dependencies) GatherProvisioningInputs CreateBuildDescription // Removed a block for length. ExecuteExternalTool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v -E -dM -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk -x c -c /dev/null // Removed another block for length. Build description signature: dc5e0c08dfce007b98c7bce87acea5fe Build description path: /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Intermediates.noindex/XCBuildData/dc5e0c08dfce007b98c7bce87acea5fe.xcbuilddata ClangStatCache /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang-stat-cache /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphoneos18.0-22A3362-8ec3fe4dca91fa9a941eaa2d5faad0e4.sdkstatcache cd /Users/sravankaruturi/dev/iphonedummy/iphonedummy.xcodeproj /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang-stat-cache /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk -o /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphoneos18.0-22A3362-8ec3fe4dca91fa9a941eaa2d5faad0e4.sdkstatcache ProcessInfoPlistFile /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Products/Release-iphoneos/iphonedummy.app/Info.plist /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Intermediates.noindex/iphonedummy.build/Release-iphoneos/iphonedummy.build/empty-iphonedummy.plist (in target 'iphonedummy' from project 'iphonedummy') cd /Users/sravankaruturi/dev/iphonedummy builtin-infoPlistUtility /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Intermediates.noindex/iphonedummy.build/Release-iphoneos/iphonedummy.build/empty-iphonedummy.plist -producttype com.apple.product-type.application -genpkginfo /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Products/Release-iphoneos/iphonedummy.app/PkgInfo -expandbuildsettings -format binary -platform iphoneos -additionalcontentfile /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Intermediates.noindex/iphonedummy.build/Release-iphoneos/iphonedummy.build/assetcatalog_generated_info.plist -requiredArchitecture arm64 -o /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Products/Release-iphoneos/iphonedummy.app/Info.plist Ld /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Products/Release-iphoneos/iphonedummy.app/iphonedummy normal (in target 'iphonedummy' from project 'iphonedummy') cd /Users/sravankaruturi/dev/iphonedummy /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -Xlinker -reproducible -target arm64-apple-ios18.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk -Os -L/Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Intermediates.noindex/EagerLinkingTBDs/Release-iphoneos -L/Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Products/Release-iphoneos -F/Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Intermediates.noindex/EagerLinkingTBDs/Release-iphoneos -F/Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Products/Release-iphoneos -filelist /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Intermediates.noindex/iphonedummy.build/Release-iphoneos/iphonedummy.build/Objects-normal/arm64/iphonedummy.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Intermediates.noindex/iphonedummy.build/Release-iphoneos/iphonedummy.build/Objects-normal/arm64/iphonedummy_lto.o -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Intermediates.noindex/iphonedummy.build/Release-iphoneos/iphonedummy.build/Objects-normal/arm64/iphonedummy.swiftmodule -Xlinker -dependency_info -Xlinker /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Intermediates.noindex/iphonedummy.build/Release-iphoneos/iphonedummy.build/Objects-normal/arm64/iphonedummy_dependency_info.dat -o /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Products/Release-iphoneos/iphonedummy.app/iphonedummy ld: building for 'iOS', but linking in dylib (/Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk/usr/lib/libobjc.A.tbd) built for 'macOS macCatalyst zippered(macOS/Catalyst)' clang: error: linker command failed with exit code 1 (use -v to see invocation)
1
0
142
1w
macOS 15.1b5, Xcode 16.1b2, does not compile
macOS project, was compiling on macOS 14, now there are errors when trying to compile it again: In file macOS 15.1 / usr/include/ ___wctype.h there are errors: Use of undeclared identifier '_CTYPE_A' in line: return (__istype(_wc, _CTYPE_A|_CTYPE_D)); And further down: Use of undeclared identifier '_CTYPE_A' Use of undeclared identifier '_CTYPE_C' Use of undeclared identifier '_CTYPE_D' Is this an SDK problem?
1
0
103
1w
Xcode projects all no longer Clean
I compile plugins for Adobe Illustrator using CORE and Adobe SDK libraries. Xcode 14 has recently refused to clean any of my Xcode projects, system wide, although they compile and run fine. If I change Project Settings > Advanced > Build Location from Legacy to Default, it cleans fine, but when debugging, many breakpoints cannot be used. The marker has a dotted outline and a popup states that the breakpoint cannot be resolved. I'd like to stay with Legacy for the Build Location, and resolve the cleaning problem. Changing permissions or deleting contents of build folders hasn't helped. Has anyone else seen and solved this issue? macOS Sonoma 14.6.1 Xcode 14.3
0
0
72
1w
Code signature not valid when running on Simulator in Xcode 16
I just upgraded to Version 16.0 (16A242d) and unfortunately the App that used to run perfectly fine on Xcode 15 is now broken. It crashes right after showing the Launch Screen on the Simulator. Here's the formatted error message in the Console: dyld[80159]: Library not loaded: @rpath/AppName-iOS.debug.dylib Referenced from: <App ID> /path/to/AppName-iOS.app/AppName-iOS Reason: tried: '/path/to/DerivedData/AppName-iOS.debug.dylib' (no such file), '/path/to/CoreSimulator/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection/AppName-iOS.debug.dylib' (no such file), '/path/to/AppName-iOS.app/AppName-iOS.debug.dylib' (code signature not valid for use in process: Trying to load an unsigned library), '/path/to/DerivedData/PackageFrameworks/AppName-iOS.debug.dylib' (no such file), '/path/to/AppName-iOS.app/Frameworks/AppName-iOS.debug.dylib' (no such file), '/path/to/CoreSimulator/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/AppName-iOS.debug.dylib' (no such file) For some reason the Library is unsigned and I've checked all the settings with no luck.
9
0
190
1w
xcode升级16之后,打包的ipa变大了好多,其他代码没有变化
我们主要是RN项目,最近进行了mac系统升级,xcode随着升级了,现在版本是16.0 然后,打包RN项目,打包出的ipa从19M增大到了172M,看产物,主要是hermes变大了, 目前导出时候thinning设置的是none,设置thin-for-all-variants后体积会减小,但是会产生多个ipa文件,我们应用是企业内部分发,不上市场的,想咨询一下,这种情况怎么解决?
0
0
76
1w
Incremental build changes in Xcode 16?
Hi there! Was there a change in Xcode regarding incremental builds / updating an active Simulator with a new build? We use xcodebuild to manage our internal build framework and out of the sudden, incremental builds are not launched anymore and the Simulator is stuck waiting for the new build to be launched. This was not happening for the last 10+ years. If there is an xcodebuild flag and/or guide of this new behavior, it would help a lot. Thanks everyone!
0
0
107
1w
Unable to export App via Jenkins pipeline
Hi Team, Exporting the archive through the Jenkins pipeline (executing commands on a Mac EC2 instance as a Jenkins agent) isn't working, while exporting directly from the Mac terminal successfully generates the IPA file. What might be the cause? When we execute it on directly Mac terminal, it asks Keychain password first time & after that it automatically generates IPA file. Note : We are using below working command to open keychain access. security unlock-keychain -p "my_password" /Users/ec2-user/Library/Keychains/login.keychain-db Export command : xcodebuild -exportArchive -archivePath $PWD/build/Archive/MyApp.xcarchive -exportPath $PWD/build/IPA -exportOptionsPlist ../../Dev_exportOptions.plist -allowProvisioningUpdates Current details: Node version : node-v18.17.0-darwin-arm64 Npm version : 9.6.7 Ionic version : 5.2.6 Xcode version : 15.4 Macos : Sonoma 14.6.1
0
0
69
1w
"Command SwiftCompile failed with a nonzero exit code" error by [Product] - [Archive]
The app in question was recently distributed on September 4,2024. This time, there have been some minor improvements. To test new version on my iPhone, compiling is done completely. But when I archive it for distribution, I get the following error. While running pass #985712 SILFunctionTransform "DeadArgSignatureOpt" on SILFunction "@$s15Petty_treasurer12PhotosViewerC8onReturnyyF". for 'onReturn()' (at /Users/ymdakr/MyAppli/Petty_accountant/Petty_accountant/PhotosViewer.swift:173:11) Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var LLVM_SYMBOLIZER_PATH to point to it): 0 swift-frontend 0x0000000107a5b0fc llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56 1 swift-frontend 0x0000000107a59350 llvm::sys::RunSignalHandlers() + 112 2 swift-frontend 0x0000000107a5b6c8 SignalHandler(int) + 292 3 libsystem_platform.dylib 0x000000018deae584 _sigtramp + 56 4 swift-frontend 0x0000000103cb3c54 swift::AbstractFunctionDecl::isDistributedTargetInvocationResultHandlerOnReturn() const + 356 5 swift-frontend 0x0000000103cb3c54 swift::AbstractFunctionDecl::isDistributedTargetInvocationResultHandlerOnReturn() const + 356 6 swift-frontend 0x000000010305cc74 canSpecializeFunction(swift::SILFunction*, swift::CallerAnalysis::FunctionInfo const*, bool) + 444 7 swift-frontend 0x000000010305c2e4 (anonymous namespace)::FunctionSignatureOpts::run() + 212 8 swift-frontend 0x0000000103247554 swift::SILPassManager::runFunctionPasses(unsigned int, unsigned int) + 3448 9 swift-frontend 0x0000000103240d74 swift::SILPassManager::executePassPipelinePlan(swift::SILPassPipelinePlan const&) + 252 10 swift-frontend 0x000000010327d084 swift::SimpleRequest (swift::SILPipelineExecutionDescriptor), (swift::RequestFlags)1>::evaluateRequest(swift::ExecuteSILPipelineRequest const&, swift::Evaluator&) + 56 11 swift-frontend 0x00000001032609e8 swift::ExecuteSILPipelineRequest::OutputType swift::Evaluator::getResultUncached(swift::Evaluator&, swift::ExecuteSILPipelineRequest)::'lambda'()>(swift::ExecuteSILPipelineRequest const&, swift::ExecuteSILPipelineRequest::OutputType swift::evaluateOrFatal(swift::Evaluator&, swift::ExecuteSILPipelineRequest)::'lambda'()) + 412 12 swift-frontend 0x00000001032636c4 swift::runSILOptimizationPasses(swift::SILModule&) + 440 13 swift-frontend 0x00000001027db3f8 swift::CompilerInstance::performSILProcessing(swift::SILModule*) + 1160 14 swift-frontend 0x0000000102405d68 performCompileStepsPostSILGen(swift::CompilerInstance&, std::__1::unique_ptr>, llvm::PointerUnion, swift::PrimarySpecificPaths const&, int&, swift::FrontendObserver*) + 1376 15 swift-frontend 0x00000001024056e4 swift::performCompileStepsPostSema(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 2888 16 swift-frontend 0x0000000102408228 performCompile(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 1680 17 swift-frontend 0x0000000102406f58 swift::performFrontend(llvm::ArrayRef, char const*, void*, swift::FrontendObserver*) + 3572 18 swift-frontend 0x000000010238e01c swift::mainEntry(int, char const**) + 3680 19 dyld 0x000000018daf3154 start + 2476 Command SwiftCompile failed with a nonzero exit code Previously distributed version is also giving the same error. Development environment: Xcode 16, macOS Sonoma 14.6.1 Run-time configuration: iOS 18
3
0
94
1w