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.

Swift Packages Documentation

Posts under Swift Packages tag

263 Posts
Sort by:
Post not yet marked as solved
0 Replies
182 Views
Would like to be able to bring up the iOS keyboard in a SwiftUI view without having to use a TextField? The goal would be to capture each keyup, or keydown, using .onKeyPress While I thought I could create a TextField not visible to the user, was hoping there was a cleaner way.
Posted
by SergioDCQ.
Last updated
.
Post not yet marked as solved
0 Replies
175 Views
Hi, I'm facing an issue with triggering sign in. The button only triggers after a long press, not just simple tap. There's no scrollView, just ZStack. I've already tried deleting all the layers and components except this button, still nothing.
Posted
by akksupper.
Last updated
.
Post not yet marked as solved
2 Replies
389 Views
I am getting the following error after xcode was updated, it is saying that i cant find the googlemobileads framwork, however i have since, restarted my mac, restart xcode, reset simulator, erare all content and settings, delete derivadata, delete the devices and create new one. also check that the framework is being link. see below Apple i need help here
Posted
by yun22.
Last updated
.
Post not yet marked as solved
0 Replies
227 Views
[!] The Runner [Debug] target overrides the ENABLE_BITCODE build setting defined in `Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig'. This can lead to problems with the CocoaPods installation How to fix this error ?
Posted Last updated
.
Post not yet marked as solved
0 Replies
292 Views
Hi, im new to swift development and i'm building ios version for my website chatpdf.so and i'm having trouble parsing server sent event from my server to the mobile app. Is there good library for swift to parse sse easily? I'm trying to implement it natively but im getting parsing error in EventSource.
Posted
by alok10.
Last updated
.
Post not yet marked as solved
4 Replies
2.3k Views
Asset validation failed Invalid MinimumOSVersion. Apps that only support 64-bit devices must specify a deployment target of 8.0 or later. MinimumOSVersion in 'MyApp.app/Frameworks/abseil.framework' is ''. (ID: 976fe056-e7a1-4d39-bacb-df90b8efea9b) Asset validation failed Invalid MinimumOSVersion. Apps that only support 64-bit devices must specify a deployment target of 8.0 or later. MinimumOSVersion in 'MyApp.app/Frameworks/BoringSSL-GRPC.framework' is ''. (ID: c68c6576-9c7d-4b4f-8562-348578079194) Asset validation failed Invalid MinimumOSVersion. Apps that only support 64-bit devices must specify a deployment target of 8.0 or later. MinimumOSVersion in 'MyApp.app/Frameworks/FirebaseAnalytics.framework' is ''. (ID: 098dcfe7-c07f-47e8-b9fa-ad081a0f45a6) Asset validation failed Invalid MinimumOSVersion. Apps that only support 64-bit devices must specify a deployment target of 8.0 or later. MinimumOSVersion in 'MyApp.app/Frameworks/FirebaseFirestore.framework' is ''. (ID: 814fbcf1-cb95-4775-b394-f9d150f577cb) Asset validation failed Invalid MinimumOSVersion. Apps that only support 64-bit devices must specify a deployment target of 8.0 or later. MinimumOSVersion in 'MyApp.app/Frameworks/GoogleAppMeasurement.framework' is ''. (ID: 288331b7-ad05-45e9-8989-4668645f9723) Asset validation failed Invalid MinimumOSVersion. Apps that only support 64-bit devices must specify a deployment target of 8.0 or later. MinimumOSVersion in 'MyApp.app/Frameworks/GoogleAppMeasurementIdentitySupport.framework' is ''. (ID: 83aba61f-862e-400d-a67f-6afd021bd1d2) Asset validation failed Invalid MinimumOSVersion. Apps that only support 64-bit devices must specify a deployment target of 8.0 or later. MinimumOSVersion in 'MyApp.app/Frameworks/gRPC-C++.framework' is ''. (ID: e8494bc6-78bf-496c-bc26-c71e9cb771b2) Asset validation failed Invalid MinimumOSVersion. Apps that only support 64-bit devices must specify a deployment target of 8.0 or later. MinimumOSVersion in 'MyApp.app/Frameworks/gRPC-Core.framework' is ''. (ID: c91250c0-c445-483a-a0e3-6e5b4b01197f) Asset validation failed Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle MyApp.app/Frameworks/abseil.framework is required. (ID: f5adb088-e079-4df9-95ed-107fe244ee33) Asset validation failed Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle MyApp.app/Frameworks/BoringSSL-GRPC.framework is required. (ID: 7e8def5b-283f-4ef7-9d17-562cf4fa0e54) Asset validation failed Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle MyApp.app/Frameworks/FirebaseAnalytics.framework is required. (ID: 39ebde66-fbfc-496c-83f5-92e81b057930) Asset validation failed Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle MyApp.app/Frameworks/FirebaseFirestore.framework is required. (ID: 4f34e998-9151-40d4-9b85-7942076f01ff) Asset validation failed Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle MyApp.app/Frameworks/GoogleAppMeasurement.framework is required. (ID: 6ca3ba96-85df-4cd6-bcb9-4ca0d1faffe5) Asset validation failed Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle MyApp.app/Frameworks/GoogleAppMeasurementIdentitySupport.framework is required. (ID: 6cb9b76b-653a-494b-97b8-88702c6fbee8) Asset validation failed Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle MyApp.app/Frameworks/gRPC-C++.framework is required. (ID: 7a37ef2b-55a9-446a-9eaa-3ffccee0e99b) Asset validation failed Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle MyApp.app/Frameworks/gRPC-Core.framework is required. (ID: a9b0eb06-2cf3-4265-87f4-997b7926e8a8) Asset validation failed The bundle 'Payload/MyApp.app/Frameworks/abseil.framework' is missing plist key. The Info.plist file is missing the required key: CFBundleShortVersionString. Please find more information about CFBundleShortVersionString at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring (ID: f7116884-2736-47e3-8c1a-942572fa6a97) Asset validation failed The bundle 'Payload/MyApp.app/Frameworks/BoringSSL-GRPC.framework' is missing plist key. The Info.plist file is missing the required key: CFBundleShortVersionString. Please find more information about CFBundleShortVersionString at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring (ID: 2faae9e4-78af-4437-8830-b778d4059489) Asset validation failed The bundle 'Payload/MyApp.app/Frameworks/FirebaseAnalytics.framework' is missing plist key. The Info.plist file is missing the required key: CFBundleShortVersionString. Please find more information about CFBundleShortVersionString at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring (ID: 4b53026c-c01c-43a3-ada0-a23340b40844) Asset validation failed The bundle 'Payload/MyApp.app/Frameworks/FirebaseFirestore.framework' is missing plist key. The Info.plist file is missing the required key: CFBundleShortVersionString. Please find more information about CFBundleShortVersionString at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring (ID: 995291aa-028e-432d-b9f9-422398739388) Asset validation failed The bundle 'Payload/MyApp.app/Frameworks/GoogleAppMeasurement.framework' is missing plist key. The Info.plist file is missing the required key: CFBundleShortVersionString. Please find more information about CFBundleShortVersionString at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring (ID: a5e7337e-4504-4119-be9a-b372efa0a95d) Asset validation failed The bundle 'Payload/MyApp.app/Frameworks/GoogleAppMeasurementIdentitySupport.framework' is missing plist key. The Info.plist file is missing the required key: CFBundleShortVersionString. Please find more information about CFBundleShortVersionString at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring (ID: 1ce00379-9d3c-442d-8959-8d400ae22137)
Posted Last updated
.
Post not yet marked as solved
7 Replies
829 Views
I have a Swift Package Manager module with some SwiftUI files that I was using Previews without issues in Xcode 15.2. When I upgraded to Xcode 15.3, it fails with “Cannot preview in this file. Unexpected error occurred”. When I click to get more info, this is the error: == PREVIEW UPDATE ERROR: HumanReadableSwiftError BuildError: failedToGenerateThunkInfo(could not generate preview info: noTargetBuildGraph) Is anyone experiencing the same problems? My preview, which lives in a SPM package, works totally fine in Xcode 15.2, but fails in Xcode 15.3. Any ideas for how to fix it? I've tried deleting DerivedData, resetting package caches, clean building. So frustrating seeing these regression issues popping up still. I filed FB13678356 but it was quickly marked as "Investigation Complete - Unable to diagnose with current information" but there was no request for what further information I could provide! I attached a full sysdiagnose and error log! Would also note, that when I revert back to Xcode 15.2, the previews go back to working...
Posted Last updated
.
Post marked as solved
6 Replies
3.1k Views
Since yesterday, we have experienced Xcode Cloud failing to upload our archives to TestFlight/App Store. Unsupported SDK or Xcode version? Here is one of the error messages we see on Xcode Cloud: Unsupported SDK or Xcode version. Your app was built with an SDK or version of Xcode that isn’t supported. Although you can use beta versions of SDKs and Xcode to build and upload apps to App Store Connect, you need to use the latest Release Candidates (RC) for SDKs and Xcode to submit the app. For details on currently supported SDKs and versions of Xcode, visit: https://developer.apple.com/news/releases. All of our Xcode Cloud workflows are configured to use the 'Latest Release' of Xcode and macOS (Currently Xcode 15.3 Release Candidate (15E5202a)), so I'm unsure why we are getting the above error. Invalid Bundle (SPM)? Some other errors that have just started to pop up are related to our Swift Package dependencies. We use Xcode's in-IDE interface for managing package dependencies (no custom Package.swift file). Here's some of the error messages we've seen: Invalid Bundle. The bundle {MyAppName}.app/Frameworks/{FrameworkName}.framework does not support the minimum OS Version specified in the Info.plist. Invalid MinimumOSVersion. Apps that only support 64-bit devices must specify a deployment target of 8.0 or later. MinimumOSVersion in '{MyAppName}.app/Frameworks/{FrameworkName}.framework' is ''. Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle {MyAppName}.app/Frameworks/{FrameworkName}.framework is required. The bundle 'Payload/{MyAppName}.app/Frameworks/{FrameworkName}.framework' is missing plist key. The Info.plist file is missing the required key: CFBundleShortVersionString. Please find more information about CFBundleShortVersionString at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring I am not sure what to make of these errors, as we have not made any changes to minimum deployment version of any of our project's targets. These errors seemed to start happening out of nowhere, sometime between last Friday and yesterday. Any help would be very appreciated!!
Posted Last updated
.
Post not yet marked as solved
0 Replies
277 Views
// swift-tools-version:5.9 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "RealityKitContent", // platforms check needed platforms: [ .custom("xros", versionString: "1.0") ], products: [ // Products define the executables and libraries a package produces, and make them visible to other packages. .library( name: "RealityKitContent", targets: ["RealityKitContent"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. // .package(url: /* package url */, from: "1.0.0"), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. // Targets can depend on other targets in this package, and on products in packages this package depends on. .target( name: "RealityKitContent", dependencies: []), ] ) and here is the path /Users/momo/b2db2d.github.io/B2D/Packages/RealityKitContent Every time I build, every time it keep showing 'build failed' and there is always same issue. ^^Segmentation fault: 11^^!!!!!!! I'm so annoying about this. I updated to latest package version, deleted cache, resolve package version, clean build folder etc. But IDK why. Please fix this issue or tell me what to do!!
Posted
by B2D.
Last updated
.
Post not yet marked as solved
2 Replies
740 Views
I’m looking for guidance on what to do with the new changes [coming] (https://developer.apple.com/support/third-party-SDK-requirements/) for adding Privacy Manifest to my app. I’m using on of the listed SDK which they include a Privacy Manifest of their own, do I need to include one in my app or do I just use the third-party’s? Also what happens when a developer hasn't updated its swift package to contain one?
Posted Last updated
.
Post not yet marked as solved
0 Replies
165 Views
I can't upload my app file to App Store. Could you tell me why these errors happen and how to solve these errors? Asset validation failed Missing Info.plist value. A value for the Info.plist key 'CFBundleIconName' is missing in the bundle 'monkey.wake'. Apps built with iOS 11 or later SDK must supply app icons in an asset catalog and must also provide a value for this Info.plist key. For more information see http://help.apple.com/xcode/mac/current/#/dev10510b1f7. (ID: 10f275fe-6705-4fd2-92dc-932e498fd797) Asset validation failed Missing required icon file. The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels, in .png format for iOS versions >= 10.0. To support older versions of iOS, the icon may be required in the bundle outside of an asset catalog. Make sure the Info.plist file includes appropriate entries referencing the file. See https://developer.apple.com/documentation/bundleresources/information_property_list/user_interface (ID: fd431f72-fef9-4d7f-af1e-e08c71ee8839) Asset validation failed Missing required icon file. The bundle does not contain an app icon for iPad of exactly '152x152' pixels, in .png format for iOS versions >= 10.0. To support older operating systems, the icon may be required in the bundle outside of an asset catalog. Make sure the Info.plist file includes appropriate entries referencing the file. See https://developer.apple.com/documentation/bundleresources/information_property_list/user_interface (ID: 33b9fe89-d72f-45b1-9488-d2cb31f25811) Asset validation failed Invalid bundle. Because your app supports Multitasking on iPad, you need to include the Main.storyboard launch storyboard file in your monkey.wake bundle. Use UILaunchScreen instead if the app’s MinimumOSVersion is 14 or higher and you prefer to configure the launch screen without storyboards. For details, see: https://developer.apple.com/documentation/bundleresources/information_property_list/uilaunchstoryboardname (ID: 320b5f67-f565-44d8-a3f8-0c0c36965f9e)
Posted Last updated
.
Post not yet marked as solved
0 Replies
107 Views
0 The problem statement is that, i have build a framework which is use socket.io dependency in iOS, but when i create the xcFramework file for the same framework and upload as a Swift package manager, when other user download this swift package manager but project crash with that message: dyld[24850]: Library not loaded: @rpath/SocketIO.framework/SocketIO Referenced from: what i should do? NOTE: I am working with the Swift package manager. "Framework Search Paths" contains the socke.io. "Build Libraries for Distribution" is yes
Posted
by Honto.
Last updated
.
Post not yet marked as solved
0 Replies
1k Views
I've got this SwiftPM project. It has a dependency that I needed to edit, so I forked it on github and checked it out locally. Then I referenced the local repo in the Package.swift file with package(path:) instead of package(url:). This caused it to report Package.swift: error: Missing package product 'WebAuthn' (in target 'App' from project 'server') I had to commit my changes, and re-reference the repo, to get it to see my updates. This problem has been around for some time, but seems to be related to how the path name differs from the built target name (it works fine in another project i have where the package directory and target have the same name). I've submitted FB13677717 about it, but is there a workaround?
Posted
by JetForMe.
Last updated
.
Post not yet marked as solved
2 Replies
1.2k Views
I'm trying to preview a SwiftUI view that resides in a local Swift package. I have the Swift package selected as the current scheme, so all the proper dependencies are available and the build succeeds. But I see this message in the Preview window: Cannot show preview: check whether the preview is compiled for the current scheme and OS of the device used for previewing How do I ensure the preview is compiled for a particular scheme and device OS? I updated MacOS to 14.3.1 and Xcode to 15.3 in the hopes that that might fix this issue, but it did not.
Posted Last updated
.
Post not yet marked as solved
0 Replies
171 Views
Hi, Please help! I have trouble uploading my app to App Store. I'm using Transporter to upload my ipa package, and I always get following error in my email: ITMS-90428: Invalid Swift Support - The files libswift_Concurrency.dylib don’t match /Payload/CreatiApp.app/Frameworks/libswift_Concurrency.dylib. Make sure the files are correct, rebuild your app, and resubmit it. Don’t apply post-processing to /Payload/CreatiApp.app/Frameworks/libswift_Concurrency.dylib. What should I do. I tried copy and paste old libswift_Concurrency.dylib, but it doesn't work at all
Posted Last updated
.
Post not yet marked as solved
0 Replies
292 Views
We have a teleprompter scrolling app that has worked fine up through OS Ventura. Now in Sonoma the text starts to slow down after 20-30 seconds, then if left alone ends up coming to a complete stop after 2-3 minutes and is frozen until we restart the scrolling. An odd work around, not a fix, is that when we switch the display from dark mode to light mode it will restart the scrolling as if we manually stopped and restarted. It was built in Swift Storyboard/Xcode 15 and we have been testing on MacBooks with Intel, Silicon, M1, M2 . OS Sonoma is the only common denominator in which we experience the issue. We submitted a case to Apple yesterday but has anyone else experienced similar issues and heard of a fix?
Posted
by Dklee99.
Last updated
.
Post not yet marked as solved
0 Replies
203 Views
I'm now developing a iOS project and a SPM package project, which both depend on another swift package stored in a private repo. Our private repo has a non-default ssh port, so for commandline tools, I configured like this: // .ssh/config Host repo.private.com User git Port 20022 IdentityFile ~/.ssh/id_rsa PreferredAuthentications publickey AddKeysToAgent yes And I modified defaults to disable xcode integrated git: defaults write com.apple.dt.Xcode IDEPackageSupportUseBuiltinSCM YES For the Package project, I can simply use: .package(url: "git@repo.private.com:some-repo.git", from: "0.0.1"), and it works well. But for iOS project, I tried to add the dependency, and finally find out I have to configure the port, then the project packages shows as: ssh://git@repo.private.com:20022/some-repo.git So does xcode treat these project differently and use different toolchains? Is it possible to configure xcode and make these situation behave exactly?
Posted
by yh0x13f.
Last updated
.
Post not yet marked as solved
0 Replies
198 Views
Preface: The C++ project links to a dynamic library that uses Swift, but CMake does not see this and does not put the necessary libs and i get many errors ld: warning: Could not find or use auto-linked framework 'libswiftCompatibility*' not found *link errors* What did I do: The first option to solve the problem is to add an empty .swift file to the sources, which will trigger xcodebuild and put the libs itself The second option I took it from Apple repository, but it only works for macOS. I need the same functionality for iOS. To get a list of libs for both macOS and iOS, just call the command swiftc -sdk /path/to/sdk/.sdk -target -print-target-info where <triple> is an arm64-apple-macos17.2, for example, and for different platforms, it is obviously different In CMake, I wrote such an implementation execute_process( COMMAND xcrun --show-sdk-path --sdk ${CMAKE_OSX_SYSROOT} OUTPUT_VARIABLE SDK_PATH OUTPUT_STRIP_TRAILING_WHITESPACE) execute_process( COMMAND xcrun --show-sdk-platform-version --sdk ${CMAKE_OSX_SYSROOT} OUTPUT_VARIABLE SDK_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") set(TARGET_PLATFORM "macos") elseif(CMAKE_SYSTEM_NAME STREQUAL "iOS") set(TARGET_PLATFORM "ios") endif() set(SDK_FLAGS "-sdk" "${SDK_PATH}" "-target" "${CMAKE_OSX_ARCHITECTURES}-apple-${TARGET_PLATFORM}${SDK_VERSION}" ) And the question is this: Is there some more beautiful/correct way to get a list of libs (in this case, the way to get <triple> bothers me, it seems to me at one point something will fall off) or maybe in the new CMake there is a way to link all libs without problems?
Posted
by Ygrik.
Last updated
.