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

Posts under Xcode tag

200 Posts

Post

Replies

Boosts

Views

Activity

Why is there no Embed section in Xcode's Frameworks & Libraries section
If I create an Xcode (version doesn't matter, 16.N )project of type framework then install some dependencies using SPM. Then within the Frameworks and Libraries section, the Embed part is empty. This doesn't happen if the project type is app rather than framework. If I want to set this to embed or not embed then how can this be done if its not even visible, for that matter how can I tell what it is set to even?
1
0
77
Apr ’25
Xcode 16.3 C++ compiler makes binaries with corrupted memory.
I am creating an xcframework for a static library for iOS, but I am encountering a perplexing issue with Xcode 16.3. When I build an xcframework using C++ in one project and import it into another project, the application runs with corrupted memory. In the framework project, I use os_unfair_lock, but when attempting to lock, the app crashes due to a state error. This suggests that memory corruption is occurring. When the xcframework is built with Xcode 16.2, a proper binary is generated, and the app runs without any problems. Since I do not want to disclose the source code, I am trying to construct a minimal project that reproduces the issue, but so far I have not been successful. Fundamentally, I feel that the compiler in Xcode 16.3 cannot be trusted.
0
1
126
Apr ’25
bitcode_strip error in xcode 16.3
Since I updated xcode to the version 16.3 everytime I try to use the command bitcode_strip I get an error The command i use is: bitcode_strip test.a -r -o test_no_bitcode.a And it returns the following error ld: file cannot be open()ed, errno=2 path=strip fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip: internal link edit command failed I tried downgrading the Xcode version and doing the same thing everything works fine. Is this a known bug or am I missing something?
2
0
327
Apr ’25
Missing Files Xcode Build Error
I have an iOS app. When I install pods via CLI to my project for the first time, launch Xcode, and then run the app, everything works fine – no build errors. But after several instances of running the project on my device, all of a sudden build errors appear like: /Pods/FirebaseCrashlytics/Crashlytics/Crashlytics/Settings/Models/FIRCLSApplicationIdentifierModel.m:19:9 'Crashlytics/Shared/FIRCLSByteUtility.h' file not found /Pods/PostHog/vendor/libwebp/ph_sharpyuv_csp.h /Pods/PostHog/vendor/libwebp/ph_sharpyuv_csp.h: No such file or directory And I have no idea why if it's because of my PodFile or any Build Settings/Phases/Rules, but this keeps happening repeatedly and it's impossible to develop anything with this. I've tried a string of commands such as "pod deintegrate", "pod cache clean --all", removing PodFile.lock and doing pod install again, removing derived data, and cleaning build folder. I still keep running into the same build error and it's always after a few builds this happens, nothing is missing prior when the project successfully builds. Here is my PodFile for reference: # Uncomment the next line to define a global platform for your project platform :ios, '17.0' def google_utilities pod 'GoogleUtilities/AppDelegateSwizzler' pod 'GoogleUtilities/Environment' pod 'GoogleUtilities/ISASwizzler' pod 'GoogleUtilities/Logger' pod 'GoogleUtilities/MethodSwizzler' pod 'GoogleUtilities/NSData+zlib' pod 'GoogleUtilities/Network' pod 'GoogleUtilities/Reachability' pod 'GoogleUtilities/UserDefaults' end target 'SE' do # Comment the next line if you don't want to use dynamic frameworks use_frameworks! # Pods for SE pod 'Firebase/Core' pod 'Firebase/Firestore' pod 'Firebase/Auth' google_utilities end target 'NSE' do # Comment the next line if you don't want to use dynamic frameworks use_frameworks! # Pods for NSE pod 'Firebase/Messaging' google_utilities end target 'targetApp' do # Comment the next line if you don't want to use dynamic frameworks use_frameworks! #Pods for targetApp pod 'Firebase/Core' pod 'Firebase/Crashlytics' pod 'Firebase/Messaging' pod 'Firebase/Firestore' pod 'Firebase/Storage' pod 'Firebase/Functions' pod 'PromiseKit', '~> 6.0' pod 'lottie-ios' pod 'GooglePlaces' pod 'JWTDecode', '~> 2.4' pod 'PostHog' pod 'Kingfisher', '~> 8.0' pod 'PhoneNumberKit' google_utilities end post_install do |installer| installer.aggregate_targets.each do |target| target.xcconfigs.each do |variant, xcconfig| xcconfig_path = target.client_root + target.xcconfig_relative_path(variant) IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR")) end end installer.pods_project.targets.each do |target| target.build_configurations.each do |config| if config.base_configuration_reference.is_a? Xcodeproj::Project::Object::PBXFileReference xcconfig_path = config.base_configuration_reference.real_path IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR")) config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '17.0' end end end installer.pods_project.targets.each do |target| if target.name == 'BoringSSL-GRPC' target.source_build_phase.files.each do |file| if file.settings && file.settings['COMPILER_FLAGS'] flags = file.settings['COMPILER_FLAGS'].split flags.reject! { |flag| flag == '-GCC_WARN_INHIBIT_ALL_WARNINGS' } file.settings['COMPILER_FLAGS'] = flags.join(' ') end end end end end And here is my only "Run Script" in Build Phases: "${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" \ -gsp "${PROJECT_DIR}/targetApp/GoogleService-Info.plist" \ -p ios \ "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"
3
0
175
Apr ’25
App Rejected – Binary Invalid Despite Correct Code Signing Setup (Flutter + WebView App)
Hello everyone, I'm currently experiencing repeated "Invalid Binary" rejections when submitting my Flutter-based iOS app ("Master Tere") through App Store Connect. I've followed all the expected steps and guidelines, but the rejection contains no additional explanation beyond the "Invalid Binary" status. Here’s my current setup: Built using Flutter and Xcode 15.3 WebView-based app loading a professional portfolio site Runner target is signed automatically using Xcode Managed Profiles Certificates: Apple Development and Apple Distribution (auto-managed) Bundle ID: com.actuain.mastertere1 Version: 1.0.0, Build: 6 Deployment target: iOS 18.0 Device family: iPhone only All signing identities and provisioning profiles match for Debug and Release In my Info.plist, I’ve cleaned up legacy keys that might cause conflicts: ✅ Removed <key>UIMainStoryboardFile</key> (no storyboard is used) ✅ Removed <key>CFBundleSignature</key> as it was set to ???? ✅ Display name and Bundle ID align with Xcode project settings Despite all this, every time I upload through Xcode Organizer, I get an "Invalid Binary" error after processing. No issues are shown during archive validation. I suspect the issue may be related to: Flutter WebView integration with latest iOS SDKs Residual metadata in the archive from unused iOS storyboard references Possibly missing entitlements or capabilities not flagged by Xcode Questions: Are there any known issues affecting Flutter WebView apps recently (especially around Xcode 15.3 or iOS 18 SDK)? Is it mandatory to remove Main.storyboard from the project bundle even if it's not used? Could this issue be related to background modes, UIRequiredDeviceCapabilities, or entitlements even if not directly flagged? I’d appreciate any insights or experiences from others who’ve faced this issue recently. Thanks in advance! Luis Antonio Pinto Acosta
1
0
155
Apr ’25
What does “Invalid Binary” mean when uploading my Flutter app to App Store?
Hi! I'm uploading a Flutter app using Xcode 15.3 and everything builds and runs fine on my iPhone. I use automatic signing with valid development and distribution certificates. The upload to App Store Connect completes successfully and shows as “Waiting for Review”, but after a few minutes it changes to: iOS 1.0 — Invalid Binary There are no other error details. I've checked Info.plist, signing settings, build/version numbers, and everything seems okay. Does anyone know what “Invalid Binary” means or what might be causing it? Thanks in advance!
1
0
155
Apr ’25
Multiple Executables in a Single Bundle Fails to Launch Others After Codesign
We have a rather complex network of dependencies for our application stack and, from it, we create multiple unique executables that are placed into the Contents/MacOS directory of our bundle. MyApp.app `- Contents/ `- Frameworks/... `- MacOS/ `- exec_a `- exec_b `- Resources/... Both executables require the same dependencies (and use the same shared .dylib files built as targets in the same project) so it makes sense for them to be in the same place rather than in their own .app folder as I understand it. Qt Libs -> core_lib.dylib -> gui_lib.dylib -> exec_a `-> exec_b etc. We've confirmed build artifacts are correct and the rpath/dependencies are all clean. When in development, all executables run as expected and we can command exec_a (the executable we're listing in the primary Info.plist) to launch exec_b at any time. Once the bundle is signed, however, we cannot get exec_b to launch in any capacity. Even lldb dies right away because it can't attach to anything. We assume this is something in the gatekeeper area of blocking these additional executables. We get the following when trying to run those additional exes in any way: Trace/BPT trap: 5 We're using macdeployqt to finalize the bundle and bring in the correct packages - perhaps something it's doing is causing the additional executables to fail or we're missing an entitlement. We've submitted the app to TestFlights successfully even with these invalid executables to see if there was something the processing of the app would find but so far nothing. We've seen other example of applications with multiple executables in the same MacOS directory and are wondering what the difference is. Any hints or guidance would be great. Thank you!
8
0
228
Apr ’25
Xcode 16.3 Problems
Hi, This problem had gone away with the previous version, but its back with 16.3. When I first go into Xcode, it normally shows me a list of previous projects. This seems to work some of the time, and not others. When it doesn't, I Quit Xcode, go back in, then the list appears again. I also noticed each time I quit Xcode, I get the "beach ball icon" for 5-7 seconds and then it exits most of the time. When it doesn't, I have to issue a killall Xcode in the Terminal. I have a brand new Mac mini M4, 24GB RAM, 2 TB SSDD. Is anyone else having these issues? Thank you, Dan Uff
1
0
186
Apr ’25
Unable to build c++ ios 18.4 headers with xcode 16.3
I have c++ enabled in my project and they build fine in Xcode 16.2. But now iOS SDK c++ files do not compile since “std::char_traits” support has been dropped from compiler during 16.3 update. This is the error I get: /Developer/SDKs/iPhoneOS18.4.sdk/usr/include/c++/v1/ios:543:64 Implicit instantiation of undefined template 'std::char_traits' At least these are broken, maybe more: ios.h basic_ostream.h string.h string_view.h This is rather annoying that Apple's own header files do not compile. Can't fix it by myself. Also other workarounds than downgrading to 16.2 are welcome. Feedback assistant: FB17183862
1
1
400
Apr ’25
xcode 16 ios 18.0 simulator download failed
I installed xcode 16 and both Predictive Code Completion Model and iOS 18.0 Simulator Failed Download. I can live without the code completion, but I can not get any Simulator to install. I clicked of the info button and it shows the following: Download failed. Domain: DVTDownloadableErrorDomain Code: 41 User Info: { DVTErrorCreationDateKey = "2024-09-30 15:57:24 +0000"; } Download failed. Domain: DVTDownloadableErrorDomain Code: 41 Failed fetching catalog for assetType (com.apple.MobileAsset.iOSSimulatorRuntime), serverParameters ({ RequestedBuild = 22A3351; }) Domain: DVTDownloadsUtilitiesErrorDomain Code: -1 Download failed as the server said authentication failed. (Catalog download for com.apple.MobileAsset.iOSSimulatorRuntime) Domain: com.apple.MobileAssetError.Download Code: 41 User Info: { checkServer = 1; } System Information macOS Version 15.0 (Build 24A335) Xcode 16.0 (23051) (Build 16A242d) Timestamp: 2024-09-30T10:57:24-05:00
8
2
6.6k
Apr ’25
GoogleAPIClientForRest classes not found
I am trying to connect to a google worksheet with a service account and have added the GoogleAPIClientForRest (Drive and Sheets) and GTMSessionFetcher (Core) dependencies to my project. However, this code import GoogleAPIClientForRESTCore import GTMSessionFetcherCore func test() { let x = GTLRServiceAccountCredentials.self let y = GTLRAuthorizer.self print("Classes Found") } I get the the following errors: Cannot find "GTLRServiceCredentials' in scope and Cannot find 'GTLRAuthorizer' in scope. The dependencies are listed in the Link Binary with Libraries section. I have am using the latest versions of OS and Xocod and have reinstalled both to try and resolve this issue with no luck.
1
0
81
Apr ’25
How include dSYM when I build my Framework project?
This question is related to this post (of mine). It seems default build settings do not include dSYM files needed when uploading embedding app package. But now Xcode issues new warnings about this. Now the question - how do I tell Xcode to create dSYM files for me, say when I build My.Framework? I asked AI chatbot which tells me that for release build I need to : set "Debug Information Format" to DWARF set "Strip Debug Symbols During Copy" to off I have item 1 turned on (which I believe is the default). But item 2 is on, maybe that's the reason I do not have dSYM files in final built My.Framework. Should I turn "Strip Debug Symbols During Copy" off?
3
0
148
Apr ’25
DriverKit XCode compilation errors
I'm working on dext project (c++), Base SDK and Supported Platforms are set to DriverKit. #include causes errors: error "The iostreams library is not supported since libc++ has been configured without support for localization." error "<locale.h> is not supported since libc++ has been configured without support for localization." Also it's not possible to define custom log object: undeclared identifier 'os_log_create'. <os/log.h> included and os_log function is compiled correct. macOS as additional SDK did not help. Thanks a lot for any hint.
1
0
496
Apr ’25
xcode can't find c++ headers
I'm currently working on my own renderer program using c++. Everything was fine until I update the MacOS to 15.4. I keep receiving these errors: "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/c++/v1/cerrno:30:5 tried including <errno.h> but didn't find libc++'s <errno.h> header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case." It says I have problem with finding <errno.h> while including . After searching for solutions, I check the related xcode path, xcode-select -p shows : "/Applications/Xcode.app/Contents/Developer", seems fine. And I can actually see the errno.h file in the folder "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/errno.h" I tried to use CommandLineTool's SDKs by sudo xcode-select -s /Library/Developer/CommandLineTools but not working. The error Information says: This usually means that your header search paths are not configured properly.The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case. Additionally, after running xcodebuild -showsdks, it shows two identical macosx sdks "macos 15.4". Could this be a hint? I also have tried reinstall xcode, not working. I've just created a simple project including and running std::cout << errno, it worked fine. So I tried to run it in my renderer program by cutting all the compile sources except "main.cpp", it still get the errors. What have changed? How do I set things right?
2
0
232
Apr ’25