Post

Replies

Boosts

Views

Activity

Can't get Xcode Cloud to work
I have an app I am toying with and I am seeing the following error in github's Xcode automation from Apple. My other apps work fine fine in xcode cloud with the same project setup. Run scheme_list=$(xcodebuild -list -json | tr -d "\n") 2025-02-05 03:15:56.669 xcodebuild[2841:17672] Writing error result bundle to /var/folders/2s/h6hvv9ps03xgz_krkkstvq_r0000gn/T/ResultBundle_2025-05-02_03-15-0056.xcresult xcodebuild: error: Unable to read project 'Legacy Letters.xcodeproj'. Reason: The project ‘Legacy Letters’ cannot be opened because it is in a future Xcode project file format (70). Adjust the project format using a compatible version of Xcode to allow it to be opened by this version of Xcode. /opt/homebrew/Cellar/ruby@3.0/3.0.7/lib/ruby/3.0.0/json/common.rb:216:in `parse': 809: unexpected token at '' (JSON::ParserError) from /opt/homebrew/Cellar/ruby@3.0/3.0.7/lib/ruby/3.0.0/json/common.rb:216:in `parse' from -e:1:in `<main>'
3
0
252
3w
.sheet or .fullScreenSheet Looping when presenting Image Picker on visionOS
I am having issues with my app on visionOS. It works fine on iOS. The app is presenting a ImagePicker, I had tried converting to PhotoPicker and the behavior did not change. The relevant code is in the EditGreetingCardView - // // Created by Michael Rowe on 1/2/24. // import AVKit import SwiftData import SwiftUI struct EditGreetingCardView: View { @Environment(\.modelContext) private var modelContext @Environment(\.dismiss) private var dismiss @Query(sort: \EventType.eventName) private var events: [EventType] var greetingCard: GreetingCard? private var editorTitle: String { greetingCard == nil ? "Add Greeting Card" : "Edit Greeting Card" } @State var frontImageSelected: Image? = Image("frontImage") @State var sourceType: UIImagePickerController.SourceType = .photoLibrary @State var frontPhoto = false @State var captureFrontImage = false var eventTypePassed: EventType? @State private var eventType: EventType? @State private var cardName = "" @State private var cardManufacturer = "" @State private var cardURL = "" @State private var cardUIImage: UIImage? @State private var cameraNotAuthorized = false @State private var isCameraPresented = false @State private var newEvent = false @AppStorage("walkthrough") var walkthrough = 1 init(eventTypePassed: EventType?) { if let eventTypePassed { _eventType = .init(initialValue: eventTypePassed) } } init(greetingCard: GreetingCard?) { self.greetingCard = greetingCard _eventType = .init(initialValue: greetingCard?.eventType) } var body: some View { NavigationStack { Form { Section("Occasion") { Picker("Select Occasion", selection: $eventType) { Text("Unknown Occasion") .tag(Optional<EventType>.none) //basically added empty tag and it solve the case if events.isEmpty == false { Divider() ForEach(events) { event in Text(event.eventName) .tag(Optional(event)) } } } } .foregroundColor(Color("AccentColor")) Section("Card details") { } .foregroundColor(Color("AccentColor")) Section("Card Image") { HStack(alignment: .center){ Spacer() ZStack { Image(uiImage: cardUIImage ?? UIImage(named: "frontImage")!) .resizable() .aspectRatio(contentMode: .fit) .shadow(radius: 10 ) Image(systemName: "camera.fill") .foregroundColor(.white) .font(.largeTitle) .shadow(radius: 10) .frame(width: 200) .onTapGesture { self.frontPhoto = true } .actionSheet(isPresented: $frontPhoto) { () -> ActionSheet in #if !os(visionOS) ActionSheet( title: Text("Choose mode"), message: Text("Select one."), buttons: [ ActionSheet.Button.default(Text("Camera"), action: { checkCameraAuthorization() self.captureFrontImage.toggle() self.sourceType = .camera }), ActionSheet.Button.default(Text("Photo Library"), action: { self.captureFrontImage.toggle() self.sourceType = .photoLibrary }), ActionSheet.Button.cancel() ] ) #else ActionSheet( title: Text("Choose mode"), message: Text("Select one."), buttons: [ ActionSheet.Button.default(Text("Photo Library"), action: { self.captureFrontImage.toggle() self.sourceType = .photoLibrary }), ActionSheet.Button.cancel() ] ) #endif } .fullScreenCover(isPresented: $captureFrontImage) { #if !os(visionOS) ImagePicker( sourceType: sourceType, image: $frontImageSelected) .interactiveDismissDisabled(true) #else ImagePicker( image: $frontImageSelected) .interactiveDismissDisabled(true) #endif } } .frame(width: 250, height: 250) Spacer() } } } .alert(isPresented: $cameraNotAuthorized) { Alert( title: Text("Unable to access the Camera"), message: Text("To enable access, go to Settings > Privacy > Camera and turn on Camera access for this app."), primaryButton: .default(Text("Settings")) { openSettings() } , secondaryButton: .cancel() ) } .toolbar { } .onAppear { } .onChange(of: frontImageSelected) { oldValue, newValue in cardUIImage = newValue?.asUIImage() } } } }
2
0
186
3w
Cannot find "renamed.swift" in scope
I use xcode to rename a view in my project. It renamed the file, the struct, and all related items. However; since doing that my xcode cloud workflow fails, indicating that the it cannot find it in scope. I have confirmed that the file shows up in my BuildPhases - Compile Sources. I have confirmed it exists in my git repo, but Xcode Cloud still fails to find it in scope. I have confirmed it shows up in the correct Target Membership. I even tried removing it from the BuildPhases and re-adding it. How can I resolve this issue? Is there something else I can look at? btw, application builds fine locally on my machine.
1
0
275
Jan ’25
Error when copying Home Directory
I am trying to move my home directory to a secondary drive, but I am running into to two issues. When I try to do it via Finder I get the error - The operation can’t be completed because “<my account name>” needs to be downloaded. And when I try to do it via the terminal in recovery mode (after mounting the Data directory), It seems to copy a set of directories within ~/Library/Daemon Containers/. These appear to be snapshots of some sort, which when cp runs, end up taking up the entire drive of the target drive, which is 4 times larger than my base volume. Two questions: Why I am getting the message via finder (and how do I get around it? What is the correct process for moving the home directory to a second drive? Thanks!
0
0
323
Dec ’24
Can TestFlight be used to test build for Mac Sequoia
I have an app that I would like to test on Mac Sequoia. But when I build in Xcode Cloud, it seems to fail with a This bundle is invalid. Apple is not currently accepting applications built with this version of the OS. It also complains about the release train being closed, but I created a new release (set to manually be released). And it is pulling an old CFBundleShortVersionString somehow, but the other app versions (iOS and VisIonOS) in the same Xcode Cloud build work fine.
0
3
539
Jun ’24
Main actor-isolated property can not be reference from a Sendable closure
I am working thru the issues of turning on Strict Concurrency Checking. I have a SwiftData application, and I am compressing images before saving them as data. My save function is pretty simple private func save() { ImageCompressor.compress(image: (frontImageSelected?.asUIImage())!, maxByte: 1_048_576) { image in guard image != nil else { print("Error compressing image") return } if let greetingCard { greetingCard.cardName = cardName greetingCard.cardFront = image?.pngData() greetingCard.cardManufacturer = cardManufacturer greetingCard.cardURL = cardURL greetingCard.eventType = eventType } else { let newGreetingCard = GreetingCard(cardName: cardName, cardFront: image?.pngData(), eventType: eventType, cardManufacturer: cardManufacturer, cardURL: cardURL) modelContext.insert(newGreetingCard) } } } I compress the selected image, I had to change my ImageCompressor.compress closure to Sendable, but now every assignment above is flagging with the above warning. I define the greetingCard as var greetingCard: GreetingCard? in my view, since I can have it passed in for edit, or generated if new. I also get the same warning on modelContext, which is defined as @Environment(\.modelContext) private var modelContext. It's not clear to me how to address this warning. Any pointers would be helpful.
1
0
1.7k
Jun ’24
How to End Xcode Cloud
I've been really happy with Xcode Cloud, but as a single developer with a very simple app, I cannot justify the upcoming paid service. I have two apps with minimal amount of work going on for the one that I used to test Xcode Cloud. Two questions: What do I need to do with my Xcode project to successfully disable Xcode cloud? What is the correct approach to disable the upcoming billing for Xcode cloud? Thanks for any pointers.
0
0
702
Oct ’23
Cannot use instance member within property initializer
I've been trying to use the example from this session to tweak the default SwiftData template, allowing for syncing of the data across devices. When I added the following code, I get the above error: @main struct ItemApp: App { let items = ModelConfiguration(schema: Schema([Item.self]), url: URL(filePath: "/path/to/item.store"), cloudKitContainerIdentifier: "iCloud.com.app.Item") let container = try ModelContainer(for: items). // ERROR HERE var body: some Scene { WindowGroup { ContentView() } .modelContainer(container) } } Cannot use instance member 'items' within property initializer; property initializers run before 'self' is available Any pointers would be helpful.
3
1
1.4k
Jun ’23
Error 65 in Xcode Cloud Build
In the last few days my Xcode cloud builds are failing with error 65. After downloading the logs and digging thru them, I am seeing the following error - line 6: $(CURRENT_PROJECT_VERSION) + 1: syntax error: operand expected (error token is "$(CURRENT_PROJECT_VERSION) + 1") This started after I did a check in of my code via the GIT Desktop app instead of Xcode. Since then I have deleted my workflow, recreated it, and reset my release # to try and clear this message, but every build fails with the exact same error. I have raised a feedback, but I am currently stuck to building and distributing my app to my TestFlight users. (I don't want to go back to the manual method, I am really enjoying Xcode cloud). Any suggestions on how to resolve this?
1
0
1.5k
Apr ’22
SiriExtension.entitlements error once Localization is enabled
I just updated my project for localization, when I enabled this for SiriIntents, my signings & capabilities settings for the SiriExtension stopped seeing the info.plist. - ..."/SiriExtension/SiriExtension.entitlements" could not be opened. Verify the value of the CODE_SIGN_ENTITLEMENTS build setting for target "SiriExtension" is correct and that the file exists on disk. I am running Xcode Version 13.1 (13A1030d), which has created a Info.plist which lists all the localizations I have done, and in each directory below it contains a SiriExtension.engitlemetns file. How should I setup the SiriExtension.entitlements correctly?
1
0
2.4k
Dec ’21
WKExtensionsDelegateClassName is Invalid in info.plist
So I am banging my head, I realized my stand along Watch App had a STUPID long name of "App Name - WatchKit App" so I went into my Target and changed the Display Name to "App Name" removing WatchKit App. Well now my app won't validate when uploading to the Appstore. I get the message - Invalid Info.plist key. The key WKExtensionDelegateClassName in bundle App Name.app/Watch/App Name WatchKit App.app is invalid.  My Info.plist has the value of <key>WKExtensionDelegateClassName</key> <string>$(PRODUCT_MODULE_NAME).ExtensionDelegate</string> I have confirmed that I have  @WKExtensionDelegateAdaptor(ExtensionDelegate.self) var delegate in my @main for the SwiftUI App. And when I print a few values in my app launch I get the following confirmations: Super Init - ExtensionDelegate Contentview applicationDidFinishLaunching for watchOS Super Init - ExtensionDelegate Optional(My_App_Extension.Setup) Optional(My_App_Extension.Statistics) Optional(My_App_Extension.Other) applicationDidBecomeActive for watchOS update complication I create three classes at launch and print this in the log with print(ExtensionDelegate.shared.Setup as Any) , etc. The other lines are just confirming where I am at app startup. This is a WatchOS8 application and I am running Xcode version Version 13.1 (13A1030d).
2
1
1.3k
Nov ’21
tvOS App Icon Errors
I made a minor change the UI of my tvOS App, and am now getting errors related to the App Icon. I have confirmed that all the background images DO match the requirements but App Store Connect won't let me upload: App Store Connect Operation Error Invalid Image Asset. The image stack 'App Icon' in 'Payload/My TV.app/Assets.car' has a background layer image that does not match the canvas dimensions '400x240'. App Store Connect Operation Error Invalid Image Asset. The image stack 'App Icon' in 'Payload/My TV.app/Assets.car' has a background layer image that does not match the canvas dimensions '800x480'. App Store Connect Operation Error Invalid Image Asset. The image stack 'App Icon' in 'Payload/My TV.app/Assets.car' has a background layer image that does not match the canvas dimensions '1280x768'. App Store Connect Operation Error Invalid Image Asset. The image stack 'App Icon' in 'Payload/My TV.app/Assets.car' has a background layer image that does not match the canvas dimensions '2560x1536'. App Store Connect Operation Error Invalid Image Asset. The App Store Icon must only contain an image with size (1280pt × 768pt @1x). Refer to https://developer.apple.com/tvos/human-interface-guidelines/icons-and-images/app-icon for more information Have the standards changed? Or is there another issue I should be looking at? Thanks!
2
0
1.9k
Nov ’21
Beta App not receiving CloudKit data
I have an App I've been working on with CloudKit to sync data between App on iOS, iPadOS and macOS. I have updated my iPhone and iPad to latest betas. On the iPad I had to wipe and rebuild from scratch. As of now, the iPhone is working fine and changes are showing up on my Mac, but the iPad is not pulling down the data that is in CloudKit. Is there some security or beta testing change that is causing this? They are all logged into the same iCloud account.
3
0
1.2k
Jun ’21
Errors trying to upload version of app
I have recently installed a new UPS which as a service to automatically shut down my Mac when certain events happen. It required that I install java. It required I install a new version of java from the Oracle site - here's my version info java 15.0.1 2020-10-20 Java(TM) SE Runtime Environment (build 15.0.1+9-18) Java HotSpot(TM) 64-Bit Server VM (build 15.0.1+9-18, mixed mode, sharing) now when ever I try to upload via Organizer in Xcode I get the following message: Could not find or load main class 1.Library.Java.Extensions:.Library.Java.Extensions:.Network.Library.Java.Extensions:.System.Library.Java.Extensions:.usr.lib.java:. Has anyone else seen this? Other than removing the UPS software any ideas how to fix?
2
0
1.2k
Jan ’21