Swift Packages

RSS for tag

Create reusable code, organize it in a lightweight way, and share it across Xcode projects and with other developers using Swift Packages.

Posts under Swift Packages tag

200 Posts

Post

Replies

Boosts

Views

Activity

How can I remove a localization from a String Catalog in a Swift Package?
Hello, I'm trying to remove a localization from a String Catalog in a Swift Package. How can I do that? I tried to remove the file and create a new one, but all the languages are back. The only place where I've found a reference to the languages is in Package/.swiftpm/xcode/package.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate But I don't know how to edit this file to remove a language. Thank you, Axel
2
0
75
10h
Integrating third party libraries like GoogleMaps, Payment gateways in Custom SDK
Hello, I’ve created a custom SDK from my iOS application to be integrated into another app. The SDK depends on Google Maps and payment gateway libraries. If I exclude these third-party libraries from the SDK, I encounter multiple errors. However, if I include them, the host app throws errors due to duplicate dependencies, since it already integrates the same libraries. I understand that third-party dependencies can be downloaded separately by adding them through Swift Package Manager (SPM). However, the issue is that if I exclude these dependencies from my SDK, I get compilation errors wherever I’ve used import GoogleMaps or similar statements in my code. Could you please guide me — or share documentation — on the correct approach to create an SDK that excludes third-party libraries?
0
0
38
4d
Creating Swift Package with binaryTarget that has dependencies
How can you distribute an XCFramework via Swift Package Manager when it has dependencies on other Swift packages? We accomplished this with CocoaPods in order to distribute our closed source SDK that has dependencies, but need to migrate to SPM. Note none of the types from the dependencies are used as part of our module’s public interface - usage is purely internal. I’ve made a lot of progress following these steps for a simple example: Create Framework Project Create a new iOS Framework project in Xcode and name it WallpaperKit In the project settings select the target and verify in Build Settings that Build Libraries for Distribution is Yes then set Skip Install to No Create a new UIViewController subclass, name it WallpaperPreviewViewController, make it public, and add some functionality to it to show a UIImageView Add a new Package Dependency in the project settings, for this example we’ll use https://github.com/onevcat/Kingfisher, and specify exact version 8.5.0 Add internal import Kingfisher and use it in WallpaperPreviewViewController to download and show an image from the web Close the WallpaperKit project Create Hosting App Project (this makes it easier to develop the framework functionality and test it in an app with Xcode building both in the same workspace) Create a new iOS app project and name it WallpaperApp Create a new workspace named WallpaperApp Close the WallpaperApp project Drag and drop WallpaperApp.xcodeproj into the workspace’s sidebar Drag and drop WallpaperKit.xcodeproj into the workspace’s sidebar Switch the scheme to WallpaperKit and build Select WallpaperApp project, then with WallpaperApp target selected, in the General tab under Frameworks, Libraries, and Embedded Content, click + and add WallpaperKit.framework In ViewController.swift, import WallpaperKit and add functionality to present an instance of WallpaperPreviewViewController Run the app and verify it works Create XCFramework In Terminal, cd into WallpaperKit and run xcodebuild archive -scheme WallpaperKit -configuration Release -destination 'generic/platform=iOS' -archivePath './build/WallpaperKit.framework-iphoneos.xcarchive' SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES DEFINES_MODULE=YES Run xcodebuild archive -scheme WallpaperKit -configuration Release -destination 'generic/platform=iOS Simulator' -archivePath './build/WallpaperKit.framework-iphonesimulator.xcarchive' SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES DEFINES_MODULE=YES Run xcodebuild -create-xcframework -framework './build/WallpaperKit.framework-iphonesimulator.xcarchive/Products/Library/Frameworks/WallpaperKit.framework' -framework './build/WallpaperKit.framework-iphoneos.xcarchive/Products/Library/Frameworks/WallpaperKit.framework' -output './build/WallpaperKit.xcframework' Open the build folder and retrieve the XCFramework Create Swift Package Create a new package in Xcode, select Library, and name it WallpaperKitDist Drag and drop WallpaperKit.xcframework into Sources Create a new directory in Sources called WallpaperKitDependencies Create a new Swift file in WallpaperKitDependencies called WallpaperKitDependencies (SPM requires a Swift file to recognize WallpaperKitDependencies as a valid target and fetch dependencies) Open Package.swift and change it to import PackageDescription let package = Package( name: "WallpaperKit", platforms: [ .iOS(.v18) ], products: [ .library( name: "WallpaperKit", targets: ["WallpaperKit", "WallpaperKitDependencies"] ), ], dependencies: [ .package( url: "https://github.com/onevcat/Kingfisher.git", exact: "8.5.0" ) ], targets: [ .binaryTarget( name: "WallpaperKit", path: "./Sources/WallpaperKit.xcframework" ), .target( name: "WallpaperKitDependencies", dependencies: [ "Kingfisher" ], path: "./Sources/WallpaperKitDependencies" ) ] ) Create Test App (to simulate a third-party app using the package) Create a new iOS app project and name it TestApp Add a new Local package selecting the WallpaperKitDist directory that contains Package.swift Import WallpaperKit and use it to present a WallpaperPreviewViewController This works! Though the console logs objc[39953]: Class _TtC10KingfisherP33_6AA794C9C370CDB07604B4D8B99AEAA312BundleFinder is implemented in both /Users/Name/Library/Developer/Xcode/DerivedData/TestApp-capvhjiqxrdgdnbevpkajicnjpcs/Build/Products/Debug-iphonesimulator/WallpaperKit.framework/WallpaperKit (0x100e8bbf8) and /Users/Name/Library/Developer/CoreSimulator/Devices/E0AF13C2-874C-47B9-B864-72AF3E4D5D4B/data/Containers/Bundle/Application/AF32011A-92E7-4E26-9A97-9F0C25C07863/TestApp.app/TestApp.debug.dylib (0x101a543b0). This may cause spurious casting failures and mysterious crashes. One of the duplicates must be removed or renamed. I thought using internal import Kingfisher (or @_implementationOnly import Kingfisher) would have resolved this, but seems to make no difference compared to just import Kingfisher. I suspect it might not be an issue as long as the Kingfisher version number specified in the distribution Package.swift matches the version used in the framework project (and the app does not add a different version as a dependency), but not positive. Can these warnings be resolved, or is it not a concern in this setup? Is this the best solution to distribute an XCFramework via Swift Package Manager that has dependencies on other Swift packages for now or is there a better approach? Thanks!
4
0
246
1w
How can I optimize multilingual string translations in SwiftUI for App Store apps using Localization APIs?
Hi team, I’m developing an iOS app that helps manage and translate multilingual content . The app uses SwiftUI with Localizable.strings and Bundle.localizedString(forKey:). I’m trying to optimize for dynamic language switching inside the app without restarting. I’ve tested various methods like: Text(NSLocalizedString("welcome_text", comment: "")) and some approaches using @Environment(.locale), but the system doesn’t always update views instantly when language changes. Question: What’s the recommended approach (or WWDC reference) for real-time language change handling in SwiftUI apps targeting iOS 18+?
1
0
103
1w
Unable to access 'https://github.com/firebase/firebase-ios-sdk/'
For the last week, every Update to Latest Package Version ends with the error fatal: unable to access 'https://github.com/firebase/firebase-ios-sdk/': Failed to connect to github.com port 443 after 31891 ms: Couldn't connect to server. This could be firebase-ios-sdk or another package. The timeout in the example given is 31,891 ms, but it could be more than 75,000 ms. However, other packages from GitHub are updated without errors. The next attempt may return the same error with the same repository, or with a different one, while the repository from the previous attempt is updated normally. This only happens in Xcode; pure Git performs clones (with and without mirrors), fetching, pulling, and any other actions permitted without any error. What happened, and how can I restore normal package management? MacOS 26.0.1 xcode 26.0.1
0
0
52
2w
ARKit Eye Tracking Calibration Issues - Word-Level Reading Tracking Feasibility
Hi Apple Developer Community, I'm developing an eye-tracking application using ARKit's ARFaceTrackingConfiguration and ARFaceAnchor.blendShapes for gaze detection using Xcode. I'm experiencing several calibration and accuracy issues and would appreciate insights from the community. Current Implementation Using ARFaceAnchor.blendShapes (.eyeLookUpLeft, .eyeLookDownLeft, .eyeLookInLeft, .eyeLookOutLeft, etc.) Implementing custom sensitivity curves and smoothing algorithms Applying baseline correction and coordinate mapping Using quadratic regression for calibration point mapping Issues I'm Facing 1. Calibration Mismatch Red dot position doesn't align with where I'm actually looking Significant offset between intended gaze point and actual cursor position Calibration seems to drift or become inaccurate over time 2. Extreme Eye Movement Requirements Need to make exaggerated eye movements to reach screen edges/corners Natural eye movements don't translate to proportional cursor movement Difficulty reaching certain screen regions even with calibration 3. Sensitivity and Stability Issues Cursor jitters or jumps around when looking at center Too much sensitivity to micro-movements Inconsistent behavior between calibration and normal operation 4. I also noticed that tracking on calibration screen as well as tracking on reading screen works better as expected when head movement is there, but I do not want much head movement. I want tracking with normal eye movement while reading an Ebook. Primary Question: Word-Level Eye Tracking Feasibility Is word-level eye tracking (tracking gaze as users read through individual words in an ebook) technically feasible with current iPhone/iPad hardware? I understand that Apple's built-in eye tracking is primarily an accessibility feature for UI navigation. However, I'm wondering if the TrueDepth camera and ARKit's eye tracking capabilities are sufficient for: Tracking natural reading patterns (left-to-right, line-by-line progression) Detecting which specific words a user is looking at Maintaining accuracy for sustained reading sessions (15-30 minutes) Working reliably across different users and lighting conditions Questions for the Community Hardware Limitations: Are iPhone/iPad TrueDepth cameras capable of the precision needed for word-level tracking, or is this beyond current hardware capabilities? Calibration Best Practices: What calibration strategies have worked best for accurate gaze mapping? How many calibration points are typically needed? Reading-Specific Challenges: Are there particular challenges when tracking reading behavior vs. general gaze tracking? Alternative Approaches: Are there better approaches than ARKit blend shapes for this use case? Current Setup Devices: iPhone 14 Pro iOS Version: iOS 18.3 ARKit Version: Latest available Any insights, experiences, or technical guidance would be greatly appreciated. I'm particularly interested in hearing from developers who have worked on similar eye tracking applications or have experience with the limitations and capabilities of ARKit's eye tracking features. Thank you for your time and expertise!
0
0
633
2w
X missing dependency on Y because dependency scan of Swift module 'X' discovered a dependency of Y
In my app target Foo, I have a dependency on package Bar. Bar itself have a dependency on another package Other. In my test target FooTests, I have a dependency on package BarTestsHelpers. BarTestsHelpers depends on Bar. When compiling test target FooTests, I get the following unexpected warning in Xcode 26 only: 'Bar' is missing a dependency on 'Other' because dependency scan of Swift module 'Bar' discovered a dependency on 'Other' I can see this is being discussed here as well without a solution. I filled a feedback with a sample project here: FB20602885 It seems that we can remove the warning by explicitly adding the dependency Other on BarTestHelpers. But this shouldn't be needed as BarTestHelpers doesn't use nor know about Other, it only needs it as part of its dependency on Bar.
1
0
97
2w
Flutter 3.35 iOS build fails on Apple Silicon (M3/M4): 'Flutter/Flutter.h' file not found
I'm on a MacBook Air 2025 M4 (Apple Silicon) using Flutter 3.35.5 on channel stable, Xcode 26.0.1, and CocoaPods 1.16.2. Actual Setup: Component Version macOS 15.0 Sequoia CPU Apple M4 (ARM64) Flutter 3.35.5 on channel stable Dart 3.9.2 DevTools 2.48.0 CocoaPods 1.16.2 Xcode 26.0.1 Build 17A400 Since updating Flutter from 3.24 → 3.35, iOS builds consistently fail with the following errors (not matter if simulation or real device, also ios version no matter): fatal error: 'Flutter/Flutter.h' file not found Error logs: /Users/myuser/.pub-cache/hosted/pub.dev/app_links-6.4.1/ios/app_links/Sources/app_links/AppLinksIosPlugin.swift /Users/myuser/.pub-cache/hosted/pub.dev/app_links-6.4.1/ios/app_links/Sources/app_links/AppLinksIosPlugin.swift:1:8 Unable to find module dependency: 'Flutter' import Flutter ^ flutter_native_splash /Users/myuser/.pub-cache/hosted/pub.dev/flutter_native_splash-2.4.6/ios/flutter_native_splash/Sources/flutter_native_splash/include/flutter_native_splash/FlutterNativeSplashPlugin.h /Users/myuser/.pub-cache/hosted/pub.dev/flutter_native_splash-2.4.6/ios/flutter_native_splash/Sources/flutter_native_splash/include/flutter_native_splash/FlutterNativeSplashPlugin.h:1:9 'Flutter/Flutter.h' file not found flutter_secure_storage Clang dependency scanner failure: While building module 'flutter_secure_storage' imported from flutter_secure_storage-7125a5c1.input:1: In file included from <module-includes>:1: In file included from /Users/myuser/Documents/mycompany/auftrag/AppName/name-app/ios/Pods/Headers/Public/flutter_secure_storage/flutter_secure_storage-umbrella.h:13: /Users/myuser/Documents/mycompany/auftrag/AppName/name-app/ios/Pods/Headers/Public/flutter_secure_storage/FlutterSecureStoragePlugin.h:11:9: fatal error: 'Flutter/Flutter.h' file not found flutter_secure_storage-7125a5c1.input:1:1: fatal error: could not build module 'flutter_secure_storage' Unable to find module dependency: 'flutter_secure_storage' /Users/myuser/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/ios/Classes/SwiftFlutterSecureStoragePlugin.swift /Users/myuser/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/ios/Classes/SwiftFlutterSecureStoragePlugin.swift:8:8 Unable to find module dependency: 'Flutter' import Flutter ^ path_provider_foundation /Users/myuser/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.2/darwin/path_provider_foundation/Sources/path_provider_foundation/messages.g.swift /Users/myuser/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.2/darwin/path_provider_foundation/Sources/path_provider_foundation/messages.g.swift:10:10 Unable to find module dependency: 'Flutter' import Flutter ^ sign_in_with_apple Clang dependency scanner failure: While building module 'sign_in_with_apple' imported from sign_in_with_apple-b77ac708.input:1: In file included from <module-includes>:1: In file included from /Users/myuser/Documents/mycompany/auftrag/AppName/name-app/ios/Pods/Headers/Public/sign_in_with_apple/sign_in_with_apple-umbrella.h:13: /Users/myuser/Documents/mycompany/auftrag/AppName/name-app/ios/Pods/Headers/Public/sign_in_with_apple/SignInWithApplePlugin.h:1:9: fatal error: 'Flutter/Flutter.h' file not found sign_in_with_apple-b77ac708.input:1:1: fatal error: could not build module 'sign_in_with_apple' Unable to find module dependency: 'sign_in_with_apple' /Users/myuser/.pub-cache/hosted/pub.dev/sign_in_with_apple-7.0.1/ios/Classes/SignInWithAppleAvailablePlugin.swift /Users/myuser/.pub-cache/hosted/pub.dev/sign_in_with_apple-7.0.1/ios/Classes/SignInWithAppleAvailablePlugin.swift:6:8 Unable to find module dependency: 'Flutter' import Flutter ^ What I’ve verified flutter clean + flutter pub get pod install --repo-update Deleted DerivedData Verified Generated.xcconfig exists Verified FLUTTER_ROOT path is correct Tried both in Podfile use_frameworks! :linkage => :static and modular headers Tried flutter build ios --no-codesign Still, the same errors appear. Observations I couldn't find a solution with ChatGPT or searching in the Internet like on Stackoverflow Since Flutter 3.35, Flutter.framework is no longer under .../engine/ios/Flutter.framework, but instead part of .../engine/ios/Flutter.xcframework/ios-arm64/Flutter.framework After pod install, there is no Pods/Flutter/Flutter.xcframework folder at all. Running flutter build ios does not generate the framework either — Flutter seems to depend on dynamic build-time injection, but the plugins expect static headers at build time. On my Windows machine, the exact same project and plugin versions build perfectly (obviously without actual iOS compilation). Podfile ENV['COCOAPODS_DISABLE_STATS'] = 'true' project 'Runner', { 'Debug' => :debug, 'Profile' => :release, 'Release' => :release, } def flutter_root generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) unless File.exist?(generated_xcode_build_settings_path) raise "#{generated_xcode_build_settings_path} must exist. Run flutter pub get first." end File.foreach(generated_xcode_build_settings_path) do |line| matches = line.match(/FLUTTER_ROOT\=(.*)/) return matches[1].strip if matches end raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}" end require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) flutter_ios_podfile_setup target 'Runner' do use_frameworks! :linkage => :static use_modular_headers! flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) end post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0' config.build_settings['HEADER_SEARCH_PATHS'] ||= ['$(inherited)', '${PODS_ROOT}/../Flutter/Flutter.framework/Headers'] config.build_settings['FRAMEWORK_SEARCH_PATHS'] ||= ['$(inherited)', '${PODS_ROOT}/../Flutter'] config.build_settings['DEFINES_MODULE'] = 'YES' end end end
1
0
82
2w
Manipulation stops working when changing rooms
This post documents an issue I reported in feedback FB19610114 and see if anyone knows of a workaround. Here is a copy of the feedback. Short version Manipulation (SwiftUI OR RealityKit) fails to translate entities after changing rooms. By changing rooms, I mean a human wearing an Apple Vision Pro leaving one room and entering another room. Once this issue occurs, it impacts all apps that use these features. A device restart is the only solution I have to fix it. Feedback FB19610114 This is an odd one. I'm using the new Manipulation Component in visionOS 26. Most of the time this works well. Sometime it stops working and when it does the only way to get it working again is to reboot the headset. When this happens, I can continue to rotate and scale items, but translation no longer works. It is as if the item is stuck to a fixed point in the parent scene (window, volume, etc). When this bug occurs, it affects every app across the entire operating system that is using manipulation, including the RealityKit component AND the SwiftUI version. This is not limited to one app and is not limited to apps that I am working on. Once this error occurs, it affects literally any application across the operating system that is using this API, including apps from Apple. I won't speculate on the cause of this, but I do know of one way where I can always get it to happen. Here is how to reproduce it: Make an Xcode project with a single entity that uses the Manipulation Component. There is no need to customize the configuration of this component. The default implementation will work. Build and run this app on device. You can keep running from device or quit and launch the app like normal on device. Open the app and manipulate the entity - it should work as expected. Physically walk into another room. It is vital that you leave the current room that you are in and enter a different room entirely. Use the digital crown to recenter your view and bring your window or volume to you. Test the manipulation on the entity again - it should still be working as expected at this point. Physically, move yourself and your headset into the original room where you started. Use the digital crown to recenter your view and bring your window or volume to you. Test the manipulation on the entity again - you should now see the issue. When I follow the steps above, then 100% of the time manipulation translation stops working at this point. It will impact any application using this API. The only way to fix it is to restart my headset. A few points to keep in mind It does not matter if an app is actively being run from Xcode. When this occurs, it impacts every single app, not just one. When this occurs, rotation and scaling continue to work, but the entity/view cannot be translated. This impacts BOTH the SwiftUI version and the RealityKit version. When this occurs, the only way to "fix" it is to reboot the device.
5
3
592
2w
Multiple-frames BlendShape (failed) Animation in Reality Composer Pro
Goal: To render in an apple vision pro app, the solid-mechanics 3D simulation results coming form an FEA code. Starting point: I have surface vtks with deformations on each node. Each time step has a a mesh with the nodal coordinates. This is straighforward translatable to a usd MeshSequence. Unfortunately, the results cannot be simplified to a scaling o linear transformation as you would do with other game-oriented animations. Tools: Right now, I am using Xcode and reality composer pro (RCP) to build the scenes. Technical limitations: I am aware that RCP can do animations with BlendMesh and skeletons and that MeshSequence is not a problem. Progress: Coverting to the sequence of vtk meshes to a usd MeshSequence is straighforward. This animates correctly in Preview and Blender (see screenshot). I managed to convert from MeshSequence to multiple keys and BlendMesh. This also animates correctly in Blender and preview. Unfortunately, the BlendMesh of multiple blended meshes shows a zero animation time in RCP (see screenshot below) Also, see below usda file scheme for the animation. Of course I am not showing full vectors such as faceVertexCounts, faceVertexIndex, normals. Question: what is the right set up to create a BlendMesh animation that RCP will correctly import and animate, form a set of Meshes or multiple key shapes? Blender animation Time zero RCP "animations" #usda 1.0 ( defaultPrim = "BlendMeshRoot" doc = "Blender v4.5.3 LTS" endTimeCode = 48 framesPerSecond = 24 metersPerUnit = 1 startTimeCode = 0 timeCodesPerSecond = 24 upAxis = "Z" ) def Xform "BlendMeshRoot" ( customData = { dictionary Blender = { bool generated = 1 } } ) { def SkelRoot "Mesh" { custom string userProperties:blender:object_name = "Mesh" float3 xformOp:rotateXYZ = (89.99999, -0, 0) float3 xformOp:scale = (0.009999999, 0.01, 0.01) double3 xformOp:translate = (0, 0, 0) uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale"] def Mesh "Mesh" ( active = true prepend apiSchemas = ["MaterialBindingAPI", "SkelBindingAPI"] ) { uniform bool doubleSided = 1 float3[] extent = [(25.091871, -34.121277, -13.298501), (299.94482, 245.10088, 202.35126)] int[] faceVertexCounts = [3, 3, ... int[] faceVertexIndices = [0, 10293, ... rel material:binding = </BlendMeshRoot/_materials/MeshSequence_Default> normal3f[] normals = [(-0.3632836, -0.9102419, -0.19870725), .... point3f[] points = [(244.41148, 155.42062, 70.454926),..... float3[] primvars:node_displacement = [(93.54703, 110.9341, 48.37992).... float3[] primvars:Normals = [(-0.0050530406, -0.9910114, -0.13368203),... int[] primvars:skel:jointIndices = [0, 0, 0, 0, 0 ... float[] primvars:skel:jointWeights = [1, 1, 1, 1, 1... uniform token[] skel:blendShapes = ["frame_0000", "frame_0001", "frame_0002", "frame_0003", "frame_0004", "frame_0005"] rel skel:blendShapeTargets = [ </BlendMeshRoot/Mesh/Mesh/frame_0000>, ....... </BlendMeshRoot/Mesh/Mesh/frame_0005>, ] prepend rel skel:skeleton = </BlendMeshRoot/Mesh/Skel> uniform token subdivisionScheme = "none" custom string userProperties:blender:data_name = "Mesh" custom float userProperties:originalTime float userProperties:originalTime.timeSamples = { 0: 0, } def BlendShape "frame_0000" { uniform vector3f[] offsets = [(0, 0, 0), (0, 0, 0),..... uniform int[] pointIndices = [0, 1, 2, ..... } ..... ..... #### BlendShape frame to 0005 ..... def Skeleton "Skel" ( prepend apiSchemas = ["SkelBindingAPI"] ) { uniform matrix4d[] bindTransforms = [( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1) )] uniform token[] joints = ["joint1"] uniform matrix4d[] restTransforms = [( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1) )] prepend rel skel:animationSource = </BlendMeshRoot/Mesh/Skel/Anim> def SkelAnimation "Anim" { uniform token[] blendShapes = ["frame_0000", "frame_0001", "frame_0002", "frame_0003", "frame_0004", "frame_0005"] float[] blendShapeWeights.timeSamples = { 0: [1, 0, 0, 0, 0, 0], 1: [0.9697085, 0.03029152, 0, 0, 0, 0], 2: [0.88787615, 0.11212383, 0, 0, 0, 0], ..... 46: [0, 0, 0, 0, 0.11212379, 0.8878762], 47: [0, 0, 0, 0, 0.030291557, 0.96970844], 48: [0, 0, 0, 0, 0, 1], } } } } def Scope "_materials" { def Material "MeshSequence_Default" { token outputs:surface.connect = </BlendMeshRoot/_materials/MeshSequence_Default/Principled_BSDF.outputs:surface> custom string userProperties:blender:data_name = "MeshSequence_Default" def Shader "Principled_BSDF" { uniform token info:id = "UsdPreviewSurface" float inputs:clearcoat = 0 float inputs:clearcoatRoughness = 0.03 color3f inputs:diffuseColor = (0.8, 0.4, 0.3) float inputs:ior = 1.5 float inputs:metallic = 0 float inputs:opacity = 1 float inputs:roughness = 0.5 float inputs:specular = 0.2 token outputs:surface } } } def Scope "AnimationClips" { custom rel animations = </BlendMeshRoot/Mesh/Skel/Anim> } def RealityKitComponent "AnimationLibrary" { custom rel animations = </BlendMeshRoot/Mesh/Skel/Anim> custom token info:id = "RealityKit.AnimationLibrary" custom double realitykit:approximateDuration = 2 custom double[] realitykit:clipDurations = [2] custom string[] realitykit:clipNames = ["Anim"] custom rel realitykit:clipTargets = </BlendMeshRoot/Mesh/Skel/Anim> custom double realitykit:frameRate = 24 custom bool realitykit:isAnimationLibrary = 1 } }
2
1
332
2w
swift package with arm64e
I use spm manage swift package, now i want my macos app support arm64e,so i add arm64e in Build Srtting -> Architectures. but i got error Could not find module 'SwiftyJSON' for target 'arm64e-apple-macos'; found: arm64-apple-macos, x86_64-apple-macos Apparently, if no limit in Package.swift, SPM will only compile versions for x86 and ARM64 architectures by default. now, how should I configure SPM to compile the arm64e version? thanks
5
1
303
3w
Ensure that macOS-only SwiftPM project main & test source builds via swift, xcodebuild & Xcode
I want to ensure that the main & test source of my macOS-only SwiftPM project (on GitHub at mas) builds via swift, xcodebuild & Xcode. For builds of clean clones of the main branch (i.e. no locally edited files, no existing .build or .swiftpm folders, etc.): The swift command line below builds main & test fine: swift build --build-tests The xcodebuild command line below doesn't seem to run the SwiftPM MASBuildToolPlugin (which generates a Swift file necessary for the build), which is setup for the project in Package.swift, so neither main nor test build: xcodebuild -scheme MAS -destination "platform=macOS,arch=$(arch),variant=macos" How can I get xcodebuild to run my MASBuildToolPlugin, or to run an equivalent? In Xcode, building main works fine, so Xcode must run the SwiftPM MASBuildToolPlugin. Building test, however, fails with the following error: No such module 'MAS' If I capitalize the name of the executable in the following line in Package.swift from: products: [.executable(name: "mas", targets: ["MAS"])], to: products: [.executable(name: "MAS", targets: ["MAS"])], Then Xcode can compile the tests. That, however, sets the generated executable file's name to MAS, but I want it to be mas. How can I use MAS for the package/module/target/etc. names in the source, but generate an executable file named mas? I obviously can rename the executable after it has been generated by running mv MAS mas, but would the upper-case name be incorrectly used anywhere inside the executable? I assume not. Also, I'd prefer to setup my project properly, instead of using a file renaming hack.
0
1
105
3w
Recover iPadOS MenuBar state from different scenes
I’m building a Flutter plugin to access the new menubar API on iPadOS. Everything works fine with a single scene, but I’m running into issues when adding support for multiple scenes: Only odd-numbered windows (first, third, etc.) build their menus correctly. Even-numbered windows ignore the menus sent from Flutter and fall back to a default menubar. When switching between scenes, the last rendered menu always persists instead of updating to the current focus. So far, I’ve: Implemented the plugin as a singleton. Tried to persist menu state per scene, but without success. What would be the recommended approach here? Should I avoid a singleton and manage state entirely per UIScene instance? The project is open-source, and if anyone is willing to take a look, here are the relevant files: /ios/Classes/IpadOSMenubarPlugin.swift /example/ios/Runner/AppDelegate.swift Any guidance would be much appreciated.
1
0
87
3w
HELP ME
HELP ME someone is using all of these tools etc and have been hacking all of my devices and iClouds and certain apps using HomeKit iCloud kit Xcode and I need someone to help me debug my phone or teach me what to do they are using hardware or external / sharing across devices / and it’s seriously affecting my physical and mental health. I have contacted the FBI and have a meeting in October but I’m hoping someone can help me in the time being please it’s all of my devices and daugters tabelts / doesn’t matter if it’s android or iPhone . help plssss
0
0
202
Sep ’25
xcodebuild failing when package plugin is added to project
I have created a build tool plugin in one of my SPM packages, and am trying to get it working in my project. It works fine when I build from Xcode, or have at least built the project in Xcode once before with the plugin. But if I try to build the project using xcodebuild on a machine where I have never built the project before, it fails with this error: error: '2.3.0': Invalid manifest (compiled with: ["/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc", "-vfsoverlay", "/var/folders/5_/q4yl04gs2kld1zztqxkqjdgh0000gq/T/TemporaryDirectory.BWwJWG/vfs.yaml", "-L", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/ManifestAPI", "-lPackageDescription", "-Xlinker", "-rpath", "-Xlinker", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/ManifestAPI", "-target", "arm64-apple-macosx14.0", "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk", "-F", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks", "-F", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/PrivateFrameworks", "-I", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib", "-L", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib", "-swift-version", "5", "-I", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/ManifestAPI", "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk", "-package-description-version", "5.7.0", "/private/var/folders/5_/q4yl04gs2kld1zztqxkqjdgh0000gq/T/SwiftTemplate/1FA05B4D-851D-4D2B-ADD6-E5A0DF70CD37/2.3.0/Package.swift", "-o", "/var/folders/5_/q4yl04gs2kld1zztqxkqjdgh0000gq/T/TemporaryDirectory.HUxmAq/2.3.0-manifest"]) <unknown>:0: error: error opening '/var/folders/5_/q4yl04gs2kld1zztqxkqjdgh0000gq/C/clang/ModuleCache/PackageDescription-3TZGMDBKTLI5E.swiftmodule' for output: /var/folders/5_/q4yl04gs2kld1zztqxkqjdgh0000gq/C/clang/ModuleCache/PackageDescription-3TZGMDBKTLI5E.swiftmodule: Operation not permitted /private/var/folders/5_/q4yl04gs2kld1zztqxkqjdgh0000gq/T/SwiftTemplate/1FA05B4D-851D-4D2B-ADD6-E5A0DF70CD37/2.3.0/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( On a machine where this isn't working, if I open Xcode and build the project once, then xcodebuild will succeed. Even if the Xcode build fails because I didn't choose to trust the plugin. I first ran into this on our CI server, and confirmed the same behavior by creating a brand new user account on my Mac and reproducing there. Oddly I am not able to recreate the failure after it is fixed by Xcode, even after deleting every conceivable SPM related cache. This is the command I used (I've added a bunch of sandbox stuff to the command, with no effect): xcodebuild -workspace Zinnia.xcworkspace -scheme Zinnia -disableAutomaticPackageResolution -skipPackagePluginValidation -IDEPackageSupportDisableManifestSandbox=1 -IDEPackageSupportDisablePluginExecutionSandbox=1 OTHER_SWIFT_FLAGS='$(inherited) -disable-sandbox' clean test Here is the output immediately prior to the error: Prepare packages Compile plug-in “PixiteDependencyGenerator” in package “pixitedependency” [debug]: Compiling plugin to executable at /Users/natetemp/Library/Developer/Xcode/DerivedData/Zinnia-aqyjcevbunlgbtgcippbjzhhpyax/Build/Products/PluginExecutables/PixiteDependencyGenerator [debug]: Using compiler /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc [debug]: Plugin compilation output directory '/Users/natetemp/Library/Developer/Xcode/DerivedData/Zinnia-aqyjcevbunlgbtgcippbjzhhpyax/Build/Products/PluginExecutables' [debug]: Computed hash of plugin compilation inputs: 44c01fc622391970b4c18b2a5fa100e2e0fa23e272829e41b575ef79872ec8f2 Apply build tool plug-in “PixiteDependencyGenerator” to target “Zinnia” in project “Zinnia” /usr/bin/sandbox-exec -p "(version 1) (deny default) (import \"system.sb\") (allow file-read*) (allow process*) (allow mach-lookup (global-name \"com.apple.lsd.mapdb\")) (allow file-write* (subpath \"/private/tmp\") (subpath \"/private/var/folders/5_/q4yl04gs2kld1zztqxkqjdgh0000gq/T\") ) (deny file-write* (subpath \"/Users/natetemp/projects/pixite/Zinnia\") ) (allow file-write* (subpath \"/Users/natetemp/Library/Developer/Xcode/DerivedData/Zinnia-aqyjcevbunlgbtgcippbjzhhpyax/Build/Intermediates.noindex/BuildToolPluginIntermediates/Zinnia.output/Zinnia/PixiteDependencyGenerator\") (subpath \"/private/var/folders/5_/q4yl04gs2kld1zztqxkqjdgh0000gq/T/TemporaryItems\") ) " /Users/natetemp/Library/Developer/Xcode/DerivedData/Zinnia-aqyjcevbunlgbtgcippbjzhhpyax/SourcePackages/artifacts/pixitedependency/Sourcery/sourcery-2.3.0.artifactbundle/sourcery/bin/sourcery --templates /Users/natetemp/Library/Developer/Xcode/DerivedData/Zinnia-aqyjcevbunlgbtgcippbjzhhpyax/SourcePackages/artifacts/pixitedependency/Sourcery/sourcery-2.3.0.artifactbundle/sourcery/Templates --output /Users/natetemp/Library/Developer/Xcode/DerivedData/Zinnia-aqyjcevbunlgbtgcippbjzhhpyax/Build/Intermediates.noindex/BuildToolPluginIntermediates/Zinnia.output/Zinnia/PixiteDependencyGenerator/GeneratedSources --cacheBasePath /Users/natetemp/Library/Developer/Xcode/DerivedData/Zinnia-aqyjcevbunlgbtgcippbjzhhpyax/Build/Intermediates.noindex/BuildToolPluginIntermediates/Zinnia.output/Zinnia/PixiteDependencyGenerator/Cache --sources /Users/natetemp/projects/pixite/Zinnia/Zinnia For the record, I did ensure that the 3 directories it complains about do exist with proper permissions. Is it possible that the sandbox being applied to the plugin is also being incorrectly applied to something involved in parsing and caching the manifest file? Or if there is something I am doing wrong, please let me know. This is using Xcode 16.4 on macOS 15.5.
2
0
86
Sep ’25
SwiftUI Tutorial Question
In the ScoreKeeper tutorial there's the following code: ForEach($players) { $player in GridRow { TextField("Name", text: $player.name) Text("\(player.score)") Stepper("\(player.score)", value: $player.score) .labelsHidden() } } Can someone please explain why the 2 instances of "player.score" are not preceded by "$". Thanks!
0
0
211
Sep ’25
Xcode 26 beta 5 xcodebuild crash
Good day! When your project have total 887 or more SPM local targets and then you try to build it, xcodebuild will be crash. Crash log: SWBBuildService-2025-08-11-151103.ips Thread 2 Crashed:: Dispatch queue: com.apple.root.default-qos.cooperative 0 libxpc.dylib 0x197c4826c _availability_version_check + 8 1 libswiftCore.dylib 0x1a9b44428 __isPlatformVersionAtLeast + 92 2 libswiftCore.dylib 0x1a9a6e054 _swift_allocObject_ + 1100 3 SWBMacro 0x104a9c408 specialized _ArrayBuffer._consumeAndCreateNew(bufferIsUnique:minimumCapacity:growForAppend:) + 116 4 SWBMacro 0x104a97b58 specialized Array.append<A>(contentsOf:) + 116 5 SWBMacro 0x104a954e8 MacroEvaluationProgram.executeInContext(_:withResultBuilder:alwaysEvalAsString:) + 160 6 SWBMacro 0x104a96548 MacroEvaluationProgram.executeInContext(_:withResultBuilder:alwaysEvalAsString:) + 4352 7 SWBMacro 0x104a96548 MacroEvaluationProgram.executeInContext(_:withResultBuilder:alwaysEvalAsString:) + 4352 8 SWBMacro 0x104a96548 MacroEvaluationProgram.executeInContext(_:withResultBuilder:alwaysEvalAsString:) + 4352 9 SWBMacro 0x104a96548 MacroEvaluationProgram.executeInContext(_:withResultBuilder:alwaysEvalAsString:) + 4352 10 SWBMacro 0x104a96548 MacroEvaluationProgram.executeInContext(_:withResultBuilder:alwaysEvalAsString:) + 4352 But if you try to build Package.swift via swift build command, it works. Here you can open sample project: Just Package.swift with SPM 900 targets Open Package.swift via Xcode 26 any beta and try to build Xcode workspace with SPM 900 targets Open MyApp.xcworkspace and try to build You can also make by self the Package.swift (also make required directories for SPM): // swift-tools-version: 5.9 import PackageDescription // let count = 800 // no crash let count = 900 // crash let targetsNames = (1...count).map { "Pkg1Target\($0)" } let targets = targetsNames.map { Target.target(name: $0) } let package = Package( name: "Pkg1TargetLibrary", platforms: [.iOS(.v16)], products: [ .library(name: "Pkg1TargetLibrary", targets: targets.map(\.name)), ], targets: targets )
5
0
323
Sep ’25
Undefined symbol
Is anyone have this problem on xcode 26 ? Undefined symbol: _swift_FORCE_LOAD$_swiftCompatibility50 Undefined symbol: _swift_FORCE_LOAD$_swiftCompatibility51 Undefined symbol: _swift_FORCE_LOAD$_swiftCompatibility56 Undefined symbol: _swift_FORCE_LOAD$_swiftCompatibilityConcurrency Undefined symbol: _swift_FORCE_LOAD$_swiftCompatibilityDynamicReplacements
1
1
1.3k
Sep ’25
Approach Used To Create Song List As In Example
Hi, I am looking for guidance on how to create a scrollable song list, such as the attachment. The song list was originally created in C#, using an RTF object and populated by about 43 lines of song criteria. What similar approach would I use in Swift and MacOS? By the way, I currently play music that resides on the Mac, no external streaming is required or desired. Thanks, Jim
0
0
120
Sep ’25