Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added button initializers #129

Open
wants to merge 3 commits into
base: stable
Choose a base branch
from

Conversation

Rspoon3
Copy link

@Rspoon3 Rspoon3 commented Feb 7, 2024

Added multiple initializers for SwiftUI Button.

@Rspoon3
Copy link
Author

Rspoon3 commented Feb 21, 2024

Hi @StevenSorial. I see that some tests are failing. When I try to run them locally, I get "Command AppIntentsSSUTraining failed with a nonzero exit code". How can I run them on my machine to ensure everything is working correctly?

@StevenSorial
Copy link
Member

try to rebase your branch on the latest stable.

@Rspoon3
Copy link
Author

Rspoon3 commented Feb 22, 2024

I just rebased on the latest stable branch and I’m still getting the same error.

@StevenSorial
Copy link
Member

I get "Command AppIntentsSSUTraining failed with a nonzero exit code"

This is the error I'm also seeing. seems to be a familiar issue. https://forums.developer.apple.com/forums/thread/732535

@Rspoon3
Copy link
Author

Rspoon3 commented Mar 5, 2024

@StevenSorial any suggestions on getting this moving?

@StevenSorial
Copy link
Member

@Rspoon3 I'm open to merging the PR if the test build issue is solved.
I've found that this piece of code is the problem:

    @available(iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0, *)
    struct OrderSoupIntent: AppIntent {
        static var title = LocalizedStringResource("Order Soup")
        static var description = IntentDescription("Orders a soup from your favorite restaurant.")
        
        init() { }
        
        func perform() async throws -> some IntentResult {
            return .result()
        }
    }

@Rspoon3
Copy link
Author

Rspoon3 commented May 29, 2024

@StevenSorial I removed the problematic code. Seems like this is now good to merge in.

@StevenSorial
Copy link
Member

@Rspoon3 can you please look into #63 and see if we have the same issue with these new initializers?
if you take a look at /Applications/Xcode-15.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/SwiftUI.framework/Modules/SwiftUI.swiftmodule/arm64-apple-ios.swiftinterface you will see that some of these initialzers should be marked with @_disfavoredOverload

@Rspoon3
Copy link
Author

Rspoon3 commented Jun 18, 2024

@StevenSorial Great callout, I had no idea about this. I just pushed the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants