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

Posts under Xcode tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

EXC_BAD_ACCESS if Address or Thread Sanitizer is enabled
I'm getting EXC_BAD_ACCESS (code=2, address=0x7ff8a6e2fcce) when launching my app on the simulator with Address or Thread Sanitizer enabled. I'm running Xcode 16.3 (16E140) on macOS Sequoia 15.4.1 (24E263). The call stack looks like the following. On the device, there is no crash, but this message is printed to the console: malloc: nano zone abandoned due to inability to reserve vm space. (Not sure if it's related.) Does anybody know what is causing the crash? Thread 1 #0 0x0000000103361f5b in __sanitizer::MemoryMappingLayout::Next () #1 0x000000010336034b in __sanitizer::MemoryRangeIsAvailable () #2 0x000000010334db77 in __asan::InitializeShadowMemory () #3 0x0000000103395069 in __asan::AsanInitInternal() (.cold.1) () #4 0x000000010334d352 in __asan::AsanInitInternal () #5 0x0000000103394f65 in __asan_init.cold.1 () #6 0x000000010334d325 in __asan::AsanInitFromRtl () #7 0x0000000103343289 in wrap_malloc_default_zone () #8 0x00007ff801b15f86 in __malloc_init () #9 0x00007ffa160080be in libSystem_initializer () #10 0x000000010306eb11 in invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const () #11 0x000000010308f364 in invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const () #12 0x00000001030aad7c in invocation function for block in mach_o::Header::forEachSection(void (mach_o::Header::SectionInfo const&, bool&) block_pointer) const () #13 0x00000001030a83c9 in mach_o::Header::forEachLoadCommand () #14 0x00000001030a98c8 in mach_o::Header::forEachSection () #15 0x000000010308ef62 in dyld3::MachOAnalyzer::forEachInitializer () #16 0x000000010306e9ac in dyld4::Loader::findAndRunAllInitializers () #17 0x0000000103074da1 in dyld4::JustInTimeLoader::runInitializers () #18 0x00000001030807c5 in dyld4::APIs::runAllInitializersForMain () #19 0x000000010305efac in dyld4::prepare () #20 0x000000010305e36e in _dyld_sim_prepare () #21 0x000000010993b2a0 in dyld4::prepareSim () #22 0x0000000109939963 in dyld4::prepare () #23 0x000000010993981f in dyld4::start(dyld4::KernelArgs*, void*, void*)::$_0::operator()() const () #24 0x00000001099394da in start ()
8
1
313
Jun ’25
App record creation error at validation
Hi, I developed an app and trying to publish but at the validation state i'm getting two errors. The errors as follows: (1) App record creation failed due to an invalid input. Request failed with the error code "STATE_ERROR.APP_CREATE.PLATFORM_NOT_ALLOWED_DUE_TO_CONTRACT_STATE", and reason "One or more platforms cannot be created for this app due to your provider's contract state. Creation of apps for the platform(s) iOS is not available due to your provider's contract state." (2) App record creation failed due to an invalid attribute. Request failed with error code "ENTITY_ERROR.ATTRIBUTE.REQUIRED", and reason "The provided entity is missing a required attribute You must provide a value for the attribute 'companyName' with this request" Which inputs and attributes are causing these errors? Thanks in advance.
12
0
32k
Jun ’25
Xcode 16 | xcodebuild fails when providing -destination 'platform=iOS Simulator,name=iPhone 16,arch=x86_64'
Hello. In the Xcode 15 we were using this command in the terminal to run our tests on the Rosetta Simulator: xcodebuild -workspace CoreLibraries.xcworkspace -scheme CoreLibraries -destination 'platform=iOS Simulator,name=iPhone 15,arch=x86_64' test` In the Xcode 16 the same command doesn't work anymore. It produces the error: xcodebuild: error: Unable to find a device matching the provided destination specifier: { platform:iOS Simulator, arch:x86_64, OS:latest, name:iPhone 16 } Unsupported device specifier option. The device “iPhone 16” does not support the following options: arch Please supply only supported device specifier options. Running test directly from the Xcode UI using iPhone 16 (Rosetta) still works fine. Does anyone know how to modify the xcodebuild command to make it work again?
15
10
5.8k
Jun ’25
On Log Noise - Debugging
I came across several "errors" being reported when I run my app, however my app seems to function correctly. I believe they fall in the category listed on this ( now locked ) thread https://developer.apple.com/forums/thread/115461 However, I wanted to post the ones I found to clarify ( close to submission) just in case any of these end up being more than just log noise later. PLEASE let me know if you've come across these before and whether they impacted anything or if you can confirm they are just log noise. Thanks in advance! -[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:] perform input operation requires a valid sessionID. inputModality = Keyboard, inputOperation = , customInfoType = UIEmojiSearchOperations AVAudioSession_iOS.mm:2,223 Server returned an error from destroySession:. Error Domain=NSCocoaErrorDomain Code=4099 “The connection to service with pid 102 named com.apple.audio.AudioSession was invalidated from this process.” UserInfo={NSDebugDescription=The connection to service with pid 102 named com.apple.audio.AudioSession was invalidated from this process. CAReportingClient.mm:532 Attempted to remove a reporter not created by this client { careporter_id=408,331,130,765,320 } load_eligibility_plist: Failed to open //private/var/db/os_eligibility/eligibility.plist: Operation not permitted(1) - I verified and this file is indeed in non read mode on my Mac for the user. However it affects nothing. The following 2 pop up - although I have no explicit code or 3P code ( nor Ads) that require impressions - each time I click on the Game Center Access Point post authentication. Cannot add impressions because no tracker is specified by the metrics fields context. Did you forget to set one from your view controller or data source? Cannot add page fields because none are specified by the metrics fields context. Did you forget to add an PageMetricsPresenter to the object graph used for actions?
10
2
2.9k
Jun ’25
Unexpected app version in logs — does MARKETING_VERSION change dynamically?
Hello, I've encountered unexpected behavior related to version information in our app logs, and I'd like to ask for some advice. We reviewed logs collected from a user running our app (currently available on the App Store). The logs are designed to include both the build number and the app version. Based on the build number in the logs, we believe the installed app version on the user's device is 1.0.3. However, the app version recorded in the logs is 1.1.5, which is the latest version currently available on the App Store. In our project, we set the app version using the MARKETING_VERSION environment variable. This value is configured via XcodeGen, and we define it in a YAML file. Under normal circumstances, the value defined in the YAML file (MARKETING_VERSION = 1.0.3) should be embedded in the app and reflected in the logs. But in this case, the version from the current App Store release (1.1.5) appears instead, which was unexpected. We'd like to know what might cause this behavior, and if there are any known factors that could lead to this. Also, is it possible that MARKETING_VERSION might somehow dynamically reflect the version currently available on the App Store? yaml: info.plist:
1
0
82
Jun ’25
plist failed to open after upgrading Xcode to Version 16.4 (16F6)
Hi, today I upgraded Xcode to Version 16.4 (16F6) and the Simulator to version Version 16.0 (1042.1) since then I get the following message in the debugger with any project when running the simulator: load_eligibility_plist: Failed to open /Users/xxxx/Library/Developer/CoreSimulator/Devices/1B9FA609-7502-42DE-93A8-B856E2618A7F/data/Containers/Data/Application/4FA1B071-A5F1-4E00-B3AC-630E273DD900/private/var/db/eligibilityd/eligibility.plist: No such file or directory I have checked other similar questions but in my case I do not have Cocoapods installed.
4
0
356
Jun ’25
Unexpected app version in logs — does MARKETING_VERSION change dynamically?
Hello, I've encountered unexpected behavior related to version information in our app logs, and I'd like to ask for some advice. We reviewed logs collected from a user running our app (currently available on the App Store). The logs are designed to include both the build number and the app version. Based on the build number in the logs, we believe the installed app version on the user's device is 1.0.3. However, the app version recorded in the logs is 1.1.5, which is the latest version currently available on the App Store. In our project, we set the app version using the MARKETING_VERSION environment variable. This value is configured via XcodeGen, and we define it in a YAML file. Under normal circumstances, the value defined in the YAML file (MARKETING_VERSION = 1.0.3) should be embedded in the app and reflected in the logs. But in this case, the version from the current App Store release (1.1.5) appears instead, which was unexpected. We'd like to know what might cause this behavior, and if there are any known factors that could lead to this. Also, is it possible that MARKETING_VERSION might somehow dynamically reflect the version currently available on the App Store? YAML: info.plist:
0
0
56
Jun ’25
macOS Sequoia/Xcode 16.2 - Catalyst App Missing Tab Bar
My Objective-C Catalyst app when built with Xcode 16.x/iOS 18 does not have a visible Tab Bar when run on Sequoia. App starts up in first tab, but there is no way to access other tabs. The same app when run on macOS Sonoma (or macOS Catalina) has a normal Tab Bar. The app has an initial View UITabBarController with 3 tabs. The main tab is a UiSplitViewController. Minimum macOS deployment 10.5. If app is built on Sonoma with Xcode 15.x/iOS 17 the Tab Bar is normal on macOS Sonoma, Sequoia, and Catalina. I've tried without success: if (@available(macCatalyst 18.0, *)) { self.tabBarController.tabBarHidden = false; } else { // Fallback on earlier versions } I wonder if this console log message has anything to do with the problem: CLIENT OF UIKIT REQUIRES UPDATE: This process does not adopt UIScene lifecycle. This will become an assert in a future version.
2
0
135
Jun ’25
Enterprise Vendor Id changing when it shouldn't
Hi All, Really weird one here... I have two bundle ids with the same reverse dns name... com.company.app1 com.company.app2 app1 was installed on the device a year ago. app2 was also installed on the device a year ago but I released a new updated version and pushed it to the device via Microsoft InTunes. A year ago the vendor Id's matched as the bundle id's were on the same domain of com.company. Now for some reason the new build of app2 or any new app I build isn't being recognised as on the same domain as app1 even though the bundle id should make it so and so the Vendor Id's do not match and it is causing me major problems as I rely on the Vendor Id to exchange data between the apps on a certain device. In an enterprise environment, does anyone know of any other reason or things that could affect the Vendor Id? According to Apple docs, it seems that only the bundle name affects the vendor id but it isn't following those rules in this instance.
10
0
222
Jun ’25
Why can't Xcode projects be opened in multiple workspaces
So Xcode has projects. And I breakup my code/libraries/targets into those. So why after 20 years of Xcode, can a workspace, that holds projects not display the same project opened in another workspace? The workspace redirects all output the project would normally generate in DerivedData to a completely different folder by default. What this means is I have to shut one workspace, and then open the other workspace with a different set of projects to see the ones that are shared. The workspace can't build because it can't open the project shared with another one that is open. VS sln files don't have this issue, so why do workspace files.
1
0
52
Jun ’25
No such module 'DeviceManagement'
I'm working on the companion iOS app for my purpose-built MDM system. when I use the following in a .swift file: import DeviceManagement I get the build issue: No such module 'DeviceManagement' When I attempt to add the framework in the Frameworks, Libraries, and Embedded Content settings, DeviceManagement doesn't even show up in the available frameworks. Alll the documentation I can find suggests that is the correct framework to import, but I'm new to this and not sure if I'm just missing something. Some AI help is suggesting that the culprit might be v16.x of Xcode, but I don't know enough to prove that correct or not. Any ideas on why Xcode believes there is no such module? Is there documentation that might help me learn how to make that framework available for my project?
3
0
153
Jun ’25
Issue with Swift 6 migration issues
We are migrating to swift 6 from swift 5 using Xcode 16.2. we are getting below errors in almost each of our source code files : Call to main actor-isolated initializer 'init(storyboard:bundle:)' in a synchronous non isolated context Main actor-isolated property 'delegate' can not be mutated from a nonisolated context Call to main actor-isolated instance method 'register(cell:)' in a synchronous nonisolated context Call to main actor-isolated instance method 'setup()' in a synchronous nonisolated context Few questions related to these compile errors. Some of our functions arguments have default value set but swift 6 does not allow to set any default values. This requires a lot of code changes throughout the project. This would be lot of source code re-write. Using annotations like @uncheck sendable , @Sendable on the class (Main actor) name, lot of functions within those classes , having inside some code which coming from other classes which also showing main thread issue even we using @uncheck sendable. There are so many compile errors, we are still seeing other than what we have listed here. Fixing these compile errors throughout our project, would be like a re-write of our whole application, which would take lot of time. In order for us to migrate efficiently, we have few questions where we need your help with. Below are the questions. Are there any ways we can bypass these errors using any keywords or any other way possible? Can Swift 5 and Swift 6 co-exist? so, we can slowly migrate over a period of time.
1
0
141
Jun ’25
Persistent Sandbox Denials When Building with Capacitor and CocoaPods in Xcode
I am a solo developer building a cross-platform voice assistant app using Capacitor (with HTML, JS) and Xcode for the iOS version. The app is called "Echo Eyes," and it already functions well as a Progressive Web App (PWA). However, the iOS build has been completely blocked due to persistent sandbox permission errors from macOS during the CocoaPods framework embedding phase. This issue has caused severe disruption to my project and personal well-being, and I am writing to formally request assistance in identifying a clear solution. I am not a beginner and have followed all known best practices, forums, and Apple guidance without success. What I’ve Built So Far: Fully working PWA version of the app (voice input, HTML/JS interface) Capacitor initialized with ID: com.echo.eyes.voice Capacitor iOS platform added with CocoaPods App runs fine until Xcode reaches: [CP] Embed Pods Frameworks The Exact Problem: Sandbox: bash(12319) deny(1) file-read-data /Users/Shared/projects/Echo_Mobile/ios/App/Pods/Target Support Files/Pods-App/Pods-App-frameworks.sh Command PhaseScriptExecution failed with a nonzero exit code Clarification: This is not an HTML/JS issue. The failure occurs in Xcode long before web assets are embedded into the bundle. The shell script /Pods-App-frameworks.sh cannot be read due to macOS sandbox restrictions. Everything I’ve Tried: Gave Xcode and Terminal Full Disk Access Ran: sudo xattr -rd com.apple.quarantine on the entire Pods directory Added /bin/bash and /bin/sh to Full Disk Access (after confirming the exact shell via $SHELL) Attempted to disable Gatekeeper via Terminal: sudo spctl --master-disable (confirmed not effective without GUI toggle) Tried relocating project to /Users/Shared/projects/ Cleaned build folder, removed derived data, reinstalled pods Debugged shell usage with: echo "▶️ Embedding under shell: $SHELL" in the [CP] Embed Pods Frameworks script Attempted to grant shell access to Documents Folder, Desktop, and more via Files & Folders Current State: Despite following all known and recommended steps, Xcode continues to return the same sandbox error. The shell script that embeds the CocoaPod frameworks is denied permission to read its own contents by macOS. What I Am Asking For: Is this a known issue in current versions of macOS or Xcode regarding sandbox denial for shell execution inside Pods? Is there a recommended method to grant /bin/bash or /bin/sh permission to read and run these scripts under Xcode without compromising system security? Is moving the project outside /Users (e.g. to /Projects) the only real workaround? Are there official Apple workarounds or entitlements available for developers encountering this? Personal Note: This issue has caused significant emotional and physical distress. I’m building this app as a personal healing tool and companion. I’ve poured months of work into this and done everything I can to follow Apple’s development guidelines. I’m not asking for hand-holding — only a clear, respectful response confirming whether this is expected behavior and what can be done to resolve it. Thank you for your time and understanding.
0
0
115
Jun ’25
`xcodebuild -list` command with Swift Packages in Xcode 16.3 leads to an INTERNAL ERROR
An internal error occurs when executing the xcodebuild -list command targeting a Swift Package. This behavior is new in Xcode 16.3 and was not present in the previous version, Xcode 16.2. cd ~/Developer mkdir Playground cd Playground swift package init xcodebuild -list Command line invocation: /Applications/Xcode-16.3.0.app/Contents/Developer/usr/bin/xcodebuild -list Resolve Package Graph ** INTERNAL ERROR: Unable to load workspace '/Users/treastrain/Developer/Playground' ** Uncaught Exception: -[Swift.__SwiftDeferredNSArray intersectsSet:]: unrecognized selector sent to instance 0x600001aab5e0 Stack: 0 __exceptionPreprocess (in CoreFoundation) 1 objc_exception_throw (in libobjc.A.dylib) 2 -[NSObject(NSObject) __retain_OA] (in CoreFoundation) 3 ___forwarding___ (in CoreFoundation) 4 _CF_forwarding_prep_0 (in CoreFoundation) 5 -[DVTCoreDevice(DVTCoreDeviceIDE) deviceSupportsBuildable:buildParameters:error:] (in IDEFoundation) 6 -[DVTCoreDevice(DVTCoreDeviceIDE) supportedArchitecturesForBuildableContext:buildParameters:error:] (in IDEFoundation) 7 _IDERunDestinationsForBuildableUsingDeviceWithBuildParameters (in IDEFoundation) 8 -[IDERunDestinationManager runDestinationsForScheme:schemeCommands:executionEnvironment:eligibleOnly:genericOnly:architectureVisibility:] (in IDEFoundation) 9 IDESchemeDetermineAvailableRunDestinations (in IDEFoundation) 10 -[IDEScheme _actuallyInvalidateAvailableRunDestinations] (in IDEFoundation) 11 addSchemeAndMakeActiveIfNecessary #1 (result:error:) in IDESwiftPackage.generateScheme(with:buildable:additionalBuildables:unsetRunnable:makeActive:orderHint:) (in IDESwiftPackageCore) 12 IDESwiftPackage.generateScheme(with:buildable:additionalBuildables:unsetRunnable:makeActive:orderHint:) (in IDESwiftPackageCore) 13 IDESwiftPackage.generateSchemes(_:isRootPackage:) (in IDESwiftPackageCore) 14 IDESwiftPackage.update(from:graphHasErrors:delegate:) (in IDESwiftPackageCore) 15 specialized IDESPMWorkspaceDelegate.rootPackagesDidUpdate(packages:graphHasErrors:modelGraphSynchronizerToken:) (in IDESwiftPackageCore) 16 closure #1 in IDESPMWorkspaceDelegate.packageGraphDidFinishAction(_:duration:result:) (in IDESwiftPackageCore) 17 partial apply for closure #1 in IDESPMWorkspaceDelegate.disableWorkspaceContentSynchronization(during:) (in IDESwiftPackageCore) 18 <deduplicated_symbol> (in DVTFoundation) 19 <deduplicated_symbol> (in DVTFoundation) 20 thunk for @escaping @callee_guaranteed () -> () (in DVTFoundation) 21 __58-[DVTModelObjectGraph performBlockCoalescingModelChanges:]_block_invoke (in DVTFoundation) 22 -[DVTModelGraphTransactionScope performTransaction:] (in DVTFoundation) 23 -[DVTModelObjectGraph performBlockCoalescingModelChanges:] (in DVTFoundation) 24 DVTModelObjectGraph.performBlockCoalescingModelChanges<A>(_:) (in DVTFoundation) 25 IDESPMWorkspaceDelegate.disableWorkspaceContentSynchronization(during:) (in IDESwiftPackageCore) 26 IDESPMWorkspaceDelegate.packageGraphDidFinishAction(_:duration:result:) (in IDESwiftPackageCore) 27 <deduplicated_symbol> (in IDESwiftPackageCore) 28 SPMWorkspace.packageGraphActionFinished(_:) (in SwiftPM) 29 closure #2 in closure #3 in SPMWorkspace.processPackageGraphActionsInBackgroundIfNeeded(canProcessPackageGraphActions:) (in SwiftPM) 30 <deduplicated_symbol> (in SwiftPM) 31 <deduplicated_symbol> (in SwiftPM) 32 <deduplicated_symbol> (in SwiftPM) 33 completeTaskWithClosure(swift::AsyncContext*, swift::SwiftError*) (in libswift_Concurrency.dylib) zsh: abort xcodebuild -list Environments: % xcodebuild -version Xcode 16.3 Build version 16E140 % swift --version swift-driver version: 1.120.5 Apple Swift version 6.1 (swiftlang-6.1.0.110.21 clang-1700.0.13.3) Target: arm64-apple-macosx15.0
9
10
780
Jun ’25
Can you use an external macOS device as an Xcode run destination?
Just wondering if it is possible to configure a secondary macbook to act as a run destination in Xcode, similar to how you would configure an iPhone as a run destination. I have tried connecting my device via USB-C and I can see that my macbook detects the second macbook via USB but it does not show up when trying to add devices in Xcode. I suppose this flow might not be supported?
0
0
109
May ’25
React-Native app XCode build on IOS
First time user here. Trying to build my React-Native app on xcode. I keep getting "Could not build Module" and "missing package product" and tried many combination for my Podfile. I am on macbook pro M2, XCode version 16.2, building on iphone 16 v18.3.1. Pod version 1.16.2, react-native-cli:2.0.1, Here is my Podfile. I tried to assign modular_headers to individual Firebase packages but then I cant pod install. require_relative '../node_modules/react-native/scripts/react_native_pods' require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' use_modular_headers! platform :ios, '18.0' prepare_react_native_project! target 'plana' do config = use_native_modules! use_react_native!( :path => config[:reactNativePath], :fabric_enabled => false, :app_path => "#{Pod::Config.instance.installation_root}/.." ) post_install do |installer| react_native_post_install( installer, config[:reactNativePath], :mac_catalyst_enabled => false, ) end end
0
0
94
May ’25
Landscape safe area is incorrect when presenting SKStoreProductViewController
Hi. If the app is in landscape only and when the SKStoreProductViewController is presented, the safeArea changes to what looks like a portrait mode safe area. When the SKStoreProductViewController is dismissed, the safeArea does NOT revert back to the original values. Is there a way to force the safeArea to "reset"? I've submitted some bug tickets through Apple Feedback but I haven't received any response about it. The below code will pop up the SKStoreProductViewController and if you have a UIView that is constrained to the safe area, then you can visibly notice that the safe area is changed and doesn't go back. I have tested this on iPhone 14 Pro, iPhone 15, and iPhone 16 Pro and in the Simulators. The incorrect behavior happens on those and probably more. Thanks. #import "ViewController.h" #import &amp;lt;StoreKit/StoreKit.h&amp;gt; @interface ViewController () @property (nonatomic, strong) SKStoreProductViewController *productViewController; @end @implementation ViewController - (IBAction)buttonTapped:(id)sender { self.productViewController = [[SKStoreProductViewController alloc] init]; NSDictionary *parameters = @{ @"id" : @"6443575749" }; [self.productViewController loadProductWithParameters:parameters completionBlock:^(BOOL result, NSError * _Nullable error) { [self presentViewController:self.productViewController animated:YES completion:^{ // presented // The panel that is constraint to the safe area visibly shows that the safe area is no longer correct. }]; }]; } @end
3
1
669
May ’25
Workspace with multiple targets for same framework
Hi ! I'm currently stuck with an issue on Xcode, I'll try explain to the best I can :-) I have a workspace (that I need to keep that way, I can't split projects) that contains multiple projects. I have 2 frameworks : Core and Draw. Draw depends on Core. So far so good. I needed to create a test application that can be modular and link my framewok, but also other drawing frameworks. To that extend, I created a CardLIbrary framewok, and a CardAdapter framewok, and I linked them into the test application. Test App └── DrawCardAdapter │ └── CardAdapter │ └── CardLibrary │ └── Core │ └── TCA (SPM) │ └── Draw │ └── Core Here, all dependencies are local ones if not stated otherwise (for the SPM). CardLibrary is a framework that generates only UI (linked to Core for logging purposes, nothing fancy). I also added TCA which is a SPM dependency, it may generate some issues after. CardAdapter is an abstraction for CardLibrary. Basically, it acts as an interface between CardLibrary and Test Application. DrawCardAdapter is the actual implementation of CardAdapter using local Draw framework. Why so complex ? Because I need to be able to do this: Test App └── ExternalDrawCardAdapter │ └── CardAdapter │ └── CardLibrary │ └── Core │ └── TCA (SPM) │ └── ExternalDrawFramework With this architecture, I can create a new ExternalDrawCardAdapter that implents the CardAdapter logic. This new framework does not relies on my Draw framework, and yet, I can still generate a test application that visually looks and feel like all others, but use a completely different drawing engine underneath. To do that, the Test App code only uses inputs and outputs from CardAdapter (the protocol), not concrete implementations like DrawCardAdapter or ExternalDrawCardAdapter. But to be able to make it work, I have 2 test ap targets : a DrawTestApp and a ExternalDrawTestApp. All code files are shared, except a SdkLauncher that is target specific and acutally loads the proper implementation. So the SdkLauncher for DrawTestApp is linked to the DrawCardAdapter (embed and sign) and loads DrawCardAdapter framework, whereas the ExternalDrawTestApp is linked to the ExternalDrawCardAdapter (embed and sign) and loads ExternalDrawCardAdapter framework. Now it looks like this (I only show local stuff othewise it would be too complicated :D) So far so good, this works well. Now, for the part that fails. My Draw and Core frameworks are frameworks that I release for my customers (Cocoapod), and I wanted to be able to test my productions frameworks with the test app (it's that actual purpose of the test app : being able to test development and released SDKs) To do so, I duplicated every target and removed local dependency for a cocoapod dependency. All targets were named -pod, but the actual module and product name are still the same (I tried differently, it did not work either, I'll explain it later). Test App └── DrawCardAdapter │ └── CardAdapter │ └── CardLibrary │ └── Core │ └── TCA (SPM) │ └── Draw │ └── Core │ Test App Pod └── DrawCardAdapter-pod │ └── CardAdapter-pod │ └── CardLibrary-pod │ └── Core-pod │ └── TCA (SPM) │ └── Draw-pod │ └── Core-pod Once again, it's only targets, every project would look like CardAdapter └── CardAdapter └── CardAdapter-pod It continues to use local targets, except for the DrawCardAdapter-pod that actually loads Draw and Core from a Podfile instead of using the lkocal frameworks. But now for the part that fails : even though TestApp-pod does not link any local frameworks, I get a warning Multiple targets match implicit dependency for product reference 'Draw.framework'. Consider adding an explicit dependency on the intended target to resolve this ambiguity. And actually, Xcode ends up packaging the wrong framework. I can check it but showing in the app the Draw framework version, and it's always the local one, not the one specified in the podfile. For the record, I get this message for all 3 frameworks of course. I tried sooooo many things, that did not work of course: renaming the -pod frameworks so that the names are different (I had to rename all imports too). It works for all local frameworks (Lilbrary and Adapter basically), but not for Draw and Core (since I don't have -podversions of thoses framewoks of course). Creating a new local workspace that only handles -pod versions. Does not work since as we work as a team, I have to keep the shared schemes, and all workspaces see all targets and schemes. I also tried with a separate derived data folder, but I end up with some compilation issues. It seems that mixing local, cocoapod and spm dependencies inside the same workspace is not well handled) using explicit Target Dependenciesfrom the build phase. I end up with some compilation issues creating local podspecs for Library and Adapter. It fails because TCA is linked with SPM and apparently not copied when using podspecs. To the few ones that stayed so far, thanks for your patience :D I hope that @eskimo will drop by as you always were my savior in the end :D :D
1
1
128
May ’25
Xcode 16.4 fails to build swift packages.
After updating to Xcode 16.4, Package resolution fails with some cryptic errors. Each package fails with the following message Showing Recent Errors Only <unknown>:0: warning: legacy driver is now deprecated; consider avoiding specifying '-disallow-use-new-driver' <module-includes>:200:9: note: in file included from <module-includes>:200: 198 | #import "mach/mach_traps.h" 199 | #import "mach/mach_types.h" 200 | #import "mach/mach_vm.h" | `- note: in file included from <module-includes>:200: 201 | #import "mach/mach_voucher.h" 202 | #import "mach/mach_voucher_types.h" /Applications/Xcode-16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/mach/mach_vm.h:436:2: error: unknown type name 'mach_vm_offset_list_t'; did you mean 'mach_vm_offset_t'? 434 | ( 435 | vm_map_t target, 436 | mach_vm_offset_list_t in_pointer_list, | `- error: unknown type name 'mach_vm_offset_list_t'; did you mean 'mach_vm_offset_t'? 437 | mach_msg_type_number_t in_pointer_listCnt, 438 | mach_vm_offset_list_t out_pointer_list, /Applications/Xcode-16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/mach/arm/vm_types.h:108:33: note: 'mach_vm_offset_t' declared here 106 | 107 | typedef uint64_t mach_vm_address_t __kernel_ptr_semantics; 108 | typedef uint64_t mach_vm_offset_t __kernel_ptr_semantics; | `- note: 'mach_vm_offset_t' declared here 109 | typedef uint64_t mach_vm_size_t; 110 | <module-includes>:200:9: note: in file included from <module-includes>:200: 198 | #import "mach/mach_traps.h" 199 | #import "mach/mach_types.h" 200 | #import "mach/mach_vm.h" | `- note: in file included from <module-includes>:200: 201 | #import "mach/mach_voucher.h" 202 | #import "mach/mach_voucher_types.h" <unknown>:0: error: could not build Objective-C module 'Darwin' /Applications/Xcode-16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/mach/mach_vm.h:438:2: error: unknown type name 'mach_vm_offset_list_t'; did you mean 'mach_vm_offset_t'? 436 | mach_vm_offset_list_t in_pointer_list, 437 | mach_msg_type_number_t in_pointer_listCnt, 438 | mach_vm_offset_list_t out_pointer_list, | `- error: unknown type name 'mach_vm_offset_list_t'; did you mean 'mach_vm_offset_t'? 439 | mach_msg_type_number_t *out_pointer_listCnt 440 | ); /Applications/Xcode-16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/mach/arm/vm_types.h:108:33: note: 'mach_vm_offset_t' declared here 106 | 107 | typedef uint64_t mach_vm_address_t __kernel_ptr_semantics; 108 | typedef uint64_t mach_vm_offset_t __kernel_ptr_semantics; | `- note: 'mach_vm_offset_t' declared here 109 | typedef uint64_t mach_vm_size_t; 110 | /Users/paulwilliamson/Developer/ios-app/Packages/Modules/ModalAdvert/Package.swift:4:8: error: failed to build module 'PackageDescription' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | 4 | import PackageDescription | `- error: failed to build module 'PackageDescription' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug 5 | 6 | let package = Package( We don't specify -disallow-use-new-driver, so I'm unsure where that message comes from. We have cleared derived data and are performing a clean build.
0
0
156
May ’25
a required plist file or resource is malformed
I am facing this error on every flutter project build. Although it runs ok. The error happens on the codesign command What do I need to fix ? I have validated that every *.plist file is ok using plutil -lint ERROR MESSAGE /usr/bin/codesign --force --sign MY_SHA_CODE --verbose /Users/macbookair/workspace/flutter_application_1/build/ios/Release-iphoneos/Runner.app/Frameworks/libswiftCore.dylib)` exited with status 0. The command's output was: /Users/macbookair/workspace/flutter_application_1/build/ios/Release-iphoneos/Runner.app/Frameworks/libswiftCore.dylib: a required plist file or resource is malformed Info.plist <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>$(DEVELOPMENT_LANGUAGE)</string> <key>CFBundleDisplayName</key> <string>Flutter Application 1</string> <key>CFBundleExecutable</key> <string>$(EXECUTABLE_NAME)</string> <key>CFBundleIdentifier</key> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>flutter_application_1</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> <string>$(FLUTTER_BUILD_NAME)</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>$(FLUTTER_BUILD_NUMBER)</string> <key>LSRequiresIPhoneOS</key> <true/> <key>UILaunchStoryboardName</key> <string>LaunchScreen</string> <key>UIMainStoryboardFile</key> <string>Main</string> <key>UISupportedInterfaceOrientations</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> <key>UISupportedInterfaceOrientations~ipad</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortraitUpsideDown</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> <key>CADisableMinimumFrameDurationOnPhone</key> <true/> <key>UIApplicationSupportsIndirectInputEvents</key> <true/></dict> </plist> Please help.
4
0
168
May ’25