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

265 Posts
Sort by:
Post not yet marked as solved
0 Replies
27 Views
大家好,我正在尝试制作一个关于如何检测手机屏幕前是否有物体的演示。如果有物体,屏幕将显示红色,如果没有物体,则显示绿色。这可能需要调用距离传感器,但我不知道如何调用它。希望大家能给我一个回应。谢谢。
Posted
by Esoting.
Last updated
.
Post not yet marked as solved
8 Replies
1.1k Views
Since Xcode 15.3 it has become impossible to build our project more twice in a row without encountering a batch of "internal inconsistency error: never received target ended message for target ID …". This issues appeared a few months ago (15.0 i think, but i'm not sure), but xcode 15.3 makes it almost unusable. We're a team of 3 iOS devs, and we're all having the problem. Our project involves a lot of SPM packages, a few cocoa pods, a few iOS Frameworks, and a bit of swiftgen. Nothing particularly special for a large project, and no custom build steps that does anything fancy. It is now to the point where we're looking for alternative to xcode, because we can't decently kill xcode and restart every time we have to build our code...
Posted Last updated
.
Post not yet marked as solved
0 Replies
62 Views
I've complied with the reason declaration following the links sent by the autogenerated emails for the surface level Runner declaration, however libswift has the incorrect values for the reason codes for UserDefaults. I've checked their github and there is no way to add issues since it is "read-only". I'm also in the dark for who to contact regarding this. Does anyone have any idea how to resolve this aside from manually changing the privacy files? I don't want to have to do this each time I do pod install. ITMS-91055: Invalid API reason declaration - The PrivacyInfo.xcprivacy for the “Frameworks/libswiftObjectiveC.dylib” file contains “DDA9.1” as the value for a NSPrivacyAccessedAPITypeReasons key instead of a valid reason code for using an API in the NSPrivacyAccessedAPICategoryUserDefaults category.
Posted
by DSdevPH.
Last updated
.
Post marked as solved
1 Replies
89 Views
Hello everyone! I am kind a new here and trying to learn Swift. I am getting this error "Expressions are not allowed at the top level" I´ve tried both with an function and without function! func text(){ let number = 120 print(number.isMultiple(of: 3)) } text() Without function let number = 120 print(number.isMultiple(of: 3)) I really appreaciate if you can help me out! My playground app is crashing every time I open it so I´ve got no other choice but to use Xcode Kind regarding Your noob friend!
Posted
by Farrriiaa.
Last updated
.
Post not yet marked as solved
3 Replies
110 Views
I have encountered an issue related to the usage of string catalogs in a Swift package. I created a repository for reproduction. https://github.com/atacan/DiscussionStringCatalogPackage The Readme.md file has all the details. Here is a short summary: The Package.swift file's target has resources: [.process("Resources")], and this Resources folder contains a string catalog. The catalog is correctly populated by the compiler, and German translations are added. Text view is using bundle: .module argument. However, when the scheme run options are changed to German, the UI still displays English text. Xcode throws a warning indicating that the German translation for the text is not found in the Localizable table of the bundle and it says (not loaded). Although the bundle contains translations in the Localizable.strings file. Screenshots of the issue are available in the original README file. I am looking for any insights or solutions to this problem.
Posted Last updated
.
Post not yet marked as solved
2 Replies
153 Views
I've a workspace with multiple packages, and due to the a bug in Xcode I cannot export the app localizations using the Xcode GUI tool, but I need to resort on using a command from terminal xcodebuild -exportLocalizations -localizationPath . -workspace <path_workspace> -sdk iphoneos -exportLanguage en One of my packages contains some macros, and I use them from my code without any problem, the code compile But when I try to export localizations using that command, the build fails due to "compiler plugin not loaded" So I cannot use Xcode normal exporting because Xcode bug, and cannot export by running a command due to the macro problem What should I do? It is very discouraging this situation, do you have any suggestion? I've found a similar problem
Posted
by Playrom.
Last updated
.
Post not yet marked as solved
0 Replies
229 Views
When distributing a 3rd party SDK as an XCFramework in order to include the privacy manifest to the bundle you need to include the resources key in the target configuration to point to the correct file, for example: resources: [.process("Resources/PrivacyInfo.xcprivacy")] However, when distributing the xcframework as a binaryTarget resources is not available. How can I include my privacy manifest when configuring Package.swift ?
Posted
by moshekr.
Last updated
.
Post not yet marked as solved
2 Replies
249 Views
objc[27000]: Class XROS1_1SimRuntime is implemented in both /Library/Developer/CoreSimulator/Volumes/xrOS_21O209/Library/Developer/CoreSimulator/Profiles/Runtimes/xrOS 1.1.simruntime/Contents/MacOS/xrOS 1.1 (0x1025f80e0) and /Library/Developer/CoreSimulator/Volumes/xrOS_21O5181e/Library/Developer/CoreSimulator/Profiles/Runtimes/xrOS 1.1.simruntime/Contents/MacOS/xrOS 1.1 (0x1027c00e0). One of the two will be used. Which one is undefined. error: Tool terminated by signal 'Segmentation fault: 11' This build failed issue occur every time when I play build
Posted
by B2D.
Last updated
.
Post not yet marked as solved
0 Replies
91 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
88 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
1 Replies
150 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
86 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
3 Replies
131 Views
So I am running into a very strange issue. Xcode is deleting the Package.resolved file after every build, resulting in having to manually Reset Package caches after every build/run/test. Extremely annoying, any idea why this is happening?
Posted
by janniet.
Last updated
.
Post not yet marked as solved
0 Replies
79 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
3 Replies
939 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
329 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 not yet marked as solved
2 Replies
646 Views
Hey! I noticed a difference between Xcode 15.2 and 15.3 which causes our production build to fail verification with Apple. This happens with one Swift Package which has xcframeworks as binary targets. There is no issue when exporting the app using Xcode 15.2, as the frameworks are not exported into the Frameworks folder within the app package when inspecting the exported archive. With Xcode 15.3 it is exported which then causes the following error: 2024-03-11 13:53:03.520 *** Error: ERROR: [ContentDelivery.Uploader] Asset validation failed (90208) Invalid Bundle. The bundle App.app/Frameworks/AppCenter.framework does not support the minimum OS Version specified in the Info.plist. (ID: 9e47cf5c-dc23-4cdf-8490-f9befc9e2aa1) 2024-03-11 13:53:03.521 *** Error: ERROR: [ContentDelivery.Uploader] Asset validation failed (90208) Invalid Bundle. The bundle App.app/Frameworks/AppCenterAnalytics.framework does not support the minimum OS Version specified in the Info.plist. (ID: 619289b3-c102-4161-8b63-73d42292a3cf) 2024-03-11 13:53:03.522 *** Error: ERROR: [ContentDelivery.Uploader] Asset validation failed (90208) Invalid Bundle. The bundle App.app/Frameworks/AppCenterCrashes.framework does not support the minimum OS Version specified in the Info.plist. (ID: ac590192-a99b-4aec-ad08-b21afadd10d0) 2024-03-11 13:53:03.522 *** Error: ERROR: [ContentDelivery.Uploader] Asset validation failed (90208) Invalid Bundle. The bundle App.app/Frameworks/AppCenterDistribute.framework does not support the minimum OS Version specified in the Info.plist. (ID: 69e0e8a6-11a7-46e5-9e5a-cf85c8fc15be) 2024-03-11 13:53:21.546 INFO: [ContentDelivery.Uploader] ============= VERIFY FAILED with 4 errors. ============= 2024-03-11 13:53:21.548 *** Error: Validation failed for 'OEBB.ipa'. 2024-03-11 13:53:21.548 *** Error: Asset validation failed Invalid Bundle. The bundle App.app/Frameworks/AppCenter.framework does not support the minimum OS Version specified in the Info.plist. (ID: 9e47cf5c-dc23-4cdf-8490-f9befc9e2aa1) (90208) { NSLocalizedDescription = "Asset validation failed"; NSLocalizedFailureReason = "Invalid Bundle. The bundle App.app/Frameworks/AppCenter.framework does not support the minimum OS Version specified in the Info.plist. (ID: 9e47cf5c-dc23-4cdf-8490-f9befc9e2aa1)"; NSUnderlyingError = "Error Domain=IrisAPI Code=-19241 \"Asset validation failed\" UserInfo={status=409, detail=Invalid Bundle. The bundle App.app/Frameworks/AppCenter.framework does not support the minimum OS Version specified in the Info.plist., id=9e47cf5c-dc23-4cdf-8490-f9befc9e2aa1, code=STATE_ERROR.VALIDATION_ERROR.90208, title=Asset validation failed, NSLocalizedFailureReason=Invalid Bundle. The bundle App.app/Frameworks/AppCenter.framework does not support the minimum OS Version specified in the Info.plist., NSLocalizedDescription=Asset validation failed}"; "iris-code" = "STATE_ERROR.VALIDATION_ERROR.90208"; } 2024-03-11 13:53:21.548 *** Error: Asset validation failed Invalid Bundle. The bundle App.app/Frameworks/AppCenterAnalytics.framework does not support the minimum OS Version specified in the Info.plist. (ID: 619289b3-c102-4161-8b63-73d42292a3cf) (90208) { NSLocalizedDescription = "Asset validation failed"; NSLocalizedFailureReason = "Invalid Bundle. The bundle App.app/Frameworks/AppCenterAnalytics.framework does not support the minimum OS Version specified in the Info.plist. (ID: 619289b3-c102-4161-8b63-73d42292a3cf)"; NSUnderlyingError = "Error Domain=IrisAPI Code=-19241 \"Asset validation failed\" UserInfo={status=409, detail=Invalid Bundle. The bundle App.app/Frameworks/AppCenterAnalytics.framework does not support the minimum OS Version specified in the Info.plist., id=619289b3-c102-4161-8b63-73d42292a3cf, code=STATE_ERROR.VALIDATION_ERROR.90208, title=Asset validation failed, NSLocalizedFailureReason=Invalid Bundle. The bundle App.app/Frameworks/AppCenterAnalytics.framework does not support the minimum OS Version specified in the Info.plist., NSLocalizedDescription=Asset validation failed}"; "iris-code" = "STATE_ERROR.VALIDATION_ERROR.90208"; } 2024-03-11 13:53:21.548 *** Error: Asset validation failed Invalid Bundle. The bundle App.app/Frameworks/AppCenterCrashes.framework does not support the minimum OS Version specified in the Info.plist. (ID: ac590192-a99b-4aec-ad08-b21afadd10d0) (90208) { NSLocalizedDescription = "Asset validation failed"; NSLocalizedFailureReason = "Invalid Bundle. The bundle App.app/Frameworks/AppCenterCrashes.framework does not support the minimum OS Version specified in the Info.plist. (ID: ac590192-a99b-4aec-ad08-b21afadd10d0)"; NSUnderlyingError = "Error Domain=IrisAPI Code=-19241 \"Asset validation failed\" UserInfo={status=409, detail=Invalid Bundle. The bundle App.app/Frameworks/AppCenterCrashes.framework does not support the minimum OS Version specified in the Info.plist., id=ac590192-a99b-4aec-ad08-b21afadd10d0, code=STATE_ERROR.VALIDATION_ERROR.90208, title=Asset validation failed, NSLocalizedFailureReason=Invalid Bundle. The bundle App.app/Frameworks/AppCenterCrashes.framework does not support the minimum OS Version specified in the Info.plist., NSLocalizedDescription=Asset validation failed}"; "iris-code" = "STATE_ERROR.VALIDATION_ERROR.90208"; } 2024-03-11 13:53:21.548 *** Error: Asset validation failed Invalid Bundle. The bundle App.app/Frameworks/AppCenterDistribute.framework does not support the minimum OS Version specified in the Info.plist. (ID: 69e0e8a6-11a7-46e5-9e5a-cf85c8fc15be) (90208) { NSLocalizedDescription = "Asset validation failed"; NSLocalizedFailureReason = "Invalid Bundle. The bundle App.app/Frameworks/AppCenterDistribute.framework does not support the minimum OS Version specified in the Info.plist. (ID: 69e0e8a6-11a7-46e5-9e5a-cf85c8fc15be)"; NSUnderlyingError = "Error Domain=IrisAPI Code=-19241 \"Asset validation failed\" UserInfo={status=409, detail=Invalid Bundle. The bundle App.app/Frameworks/AppCenterDistribute.framework does not support the minimum OS Version specified in the Info.plist., id=69e0e8a6-11a7-46e5-9e5a-cf85c8fc15be, code=STATE_ERROR.VALIDATION_ERROR.90208, title=Asset validation failed, NSLocalizedFailureReason=Invalid Bundle. The bundle App.app/Frameworks/AppCenterDistribute.framework does not support the minimum OS Version specified in the Info.plist., NSLocalizedDescription=Asset validation failed}"; "iris-code" = "STATE_ERROR.VALIDATION_ERROR.90208"; } The package used is the following: https://github.com/ilendemli/appcenter-sdk-apple-spm (package by me, using binary packages to avoid building AppCenter every time) Comparison image: Left exported using Xcode 15.2 (works), right exported using 15.3 (fails)
Posted
by ilendemli.
Last updated
.
Post marked as solved
6 Replies
1.9k 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
.