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
Sort by:

Post

Replies

Boosts

Views

Activity

Exporting localization using xcodebuild with a project containing macros
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
2
0
691
Mar ’24
SwiftUI Previews that work in Xcode 15.2 now fail in Xcode 15.3 with failedToGenerateThunkInfo error
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...
10
1
1.9k
Jun ’24
Build Export differences between Xcode 15.2 and 15.3
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)
5
3
3.4k
May ’24
Invalid MinimumOSVersion
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)
6
2
6.1k
Mar ’24
Showing All Messages Tool terminated by signal 'Segmentation fault: 11'
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
2
0
554
Mar ’24
Tool terminated by signal 'Segmentation fault: 11'
// 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!!
4
1
522
Mar ’24
Xcode 15.3 crippled with "internal inconsistency error"
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...
23
17
9.7k
Jun ’24
Icon error
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)
0
0
381
Mar ’24
"dyld[24850]: Library not loaded: ", while loading swift package manager. Is it my fault to build the XCFramework?
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
0
0
220
Mar ’24
Xcode 15 "Missing package product" error when using local package path instead of url
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?
0
1
2.2k
Mar ’24
Invalid Swift Support - The files libswift_Concurrency.dylib don’t match
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
0
0
386
Mar ’24
"Cannot show preview" message in Preview window
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.
2
0
2.2k
Mar ’24
Text scrolling Issue with Swift/Xcode started in OS Sonoma
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?
0
0
616
Mar ’24
Privacy Manifest Third-Party SDK
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?
2
0
1.1k
Mar ’24
Xcode behave differently on SPM between Package project and iOS project.
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?
0
0
474
Mar ’24
Get a list of swift's system libraries on macOS for different systems in CMake3.28
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?
0
0
372
Feb ’24
Xcode Cloud failing to upload to TestFlight/App Store
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!!
10
9
5.9k
Mar ’24
Failed to produce diagnostic for expression
// Unsure why this error is occuring. Can someone please asist struct CustomiseUserType: View { @State private var isInfoVisible = false @State private var showBusinessSetUpView = false @State private var showPersonalSetUpView = false @State private var selectedImage: UIImage? = nil @State private var isImagePickerPresented = false @ObservedObject private var viewModel = SignUpViewModel() @ObservedObject private var userAccount = UserAccount() let sandColor = Color(red: 240/255, green: 195/255, blue: 160/255) var body: some View { ScrollView { VStack { Button(action: { isImagePickerPresented.toggle() }) { if let selectedImage = selectedImage { Image(uiImage: selectedImage) .resizable() .scaledToFill() .frame(width: 140, height: 140) .clipShape(Circle()) .padding() } else { Image(systemName: "person.circle.fill") .resizable() .scaledToFill() .frame(width: 140, height: 140) .foregroundColor(Color(sandColor)) .clipShape(Circle()) .padding() } } .sheet(isPresented: $isImagePickerPresented, onDismiss: loadImage) { ImagePicker(userAccount: userAccount) } Text("HAVEN") .font(.largeTitle) .foregroundColor(Color.black.opacity(0.8)) .multilineTextAlignment(.center) .dynamicTypeSize(.xxxLarge) .bold() Text("OK EVERYDAY") .font(.headline) .foregroundColor(Color.black.opacity(0.8)) .multilineTextAlignment(.center) .dynamicTypeSize(.medium) VStack(alignment: .leading, spacing: 16) { Text("\n") Text("Long Term Goals") .font(.headline) TextField("Enter your long term goals", text: $userAccount.longTermGoals?) .textFieldStyle(DefaultTextFieldStyle()) .frame(maxWidth: .infinity) .frame(height: .infinity) .lineLimit(4) VStack{Divider()} Text("Profile Biography") .font(.headline) TextField("Enter your profile bio", text: userAccount.biography) .textFieldStyle(DefaultTextFieldStyle()) .frame(maxWidth: .infinity) .lineLimit(2) VStack{Divider()} VStack { Text("Haven Profile Type") .font(.headline) .multilineTextAlignment(.center) HStack { Button(action: { withAnimation { self.showBusinessSetUpView.toggle() } }) { Text("Business") .foregroundColor(.white) .padding() .frame(width: 150) .background(Color.teal) .cornerRadius(10) } Spacer() .sheet(isPresented: $showBusinessSetUpView) { BusinessSetUpView(userAccount: $userAccount) } Button(action: { withAnimation { viewModel.reset() self.showPersonalSetUpView.toggle() } }) { Text("Personal") .foregroundColor(.white) .padding() .frame(width: 150) .background(Color(sandColor)) .cornerRadius(10) } .sheet(isPresented: $showPersonalSetUpView) { // PersonalSetUpView(PersonalUser: personalUser) } } .padding() } InfoButton { isInfoVisible.toggle() } .overlay( VStack { if isInfoVisible { Text("Business profile limits visibility of survey settings to the super user only") .multilineTextAlignment(.center) .background(Color.white.opacity(0.9)) .cornerRadius(10) Button(action: { withAnimation { isInfoVisible = false } }) { Text("Close") .foregroundColor(.white) .padding() .frame(width: 75) .background(Color.teal.opacity(0.7)) .cornerRadius(10) } } } ) } } } .padding() } private func loadImage() { userAccount.profilePicture = selectedImage } }
0
0
315
Feb ’24
how to navigate to a list from a category
Hello Everyone, This is my first post as i'm a beginner in swifUI and in coding. I hope I will be clear enough. I'm working on a app that can allow me to find easily information about a factory. I have a list of factories where columns are mostly geographic information about the factory and numbers. I have sorted my list by categories where my variable is "state number - state name" in String. in each category I have a list of factory located in this state. I have a view (UsineRow) with selected detail from the factory, a view (UsineListe) displaying the list of all the factory's selected detail and another view with all details of the factory (reachable by clicking on one factory from the UsineListe view. Now I need a view where I will be able to display my categories and after that the list of factories inside my categories. For the moment, I have a view with all my categories and between directly the list of my factory selected details. ForEach(modelData.categories.keys.sorted(), id: \.self) { key in CategoryRow(categoryName: key, items: modelData.categories[key]!) that gives me: I have also an alternative view with only the list of my categories: obtained by: ForEach(modelData.categories.keys.sorted(), id: \.self) { key in Button(action: {}, label: { Text(key) }) This is the view I would prefer. BUT, I don't know how to make it clickable to the view of the list of selected details linked to the category only. I hope someone can help me and I hope to gave you clear information. Many thanks for your help. BR Julien
0
0
295
Feb ’24