Post

Replies

Boosts

Views

Activity

[regression] xcodebuild 15 fails to find destination in scheme
Working on this project. https://github.com/sebsto/amplify-ios-getting-started The project has a scheme named getting started. Using Xcode 14.3.1, I can use this command to build the project: xcodebuild build -workspace getting\ started.xcworkspace -scheme "getting started" -configuration Release But when using Xcode 15, it fails with the following error message: Command line invocation: /Applications/Xcode-15.app/Contents/Developer/usr/bin/xcodebuild build -workspace "getting started.xcworkspace" -scheme "getting started" -configuration Release User defaults from command line: IDEPackageSupportUseBuiltinSCM = YES Resolve Package Graph Resolved source packages: Starscream: https://github.com/daltoniam/Starscream @ 4.0.4 AmplifyUtilsNotifications: https://github.com/aws-amplify/amplify-swift-utils-notifications.git @ 1.1.0 SQLite.swift: https://github.com/stephencelis/SQLite.swift.git @ 0.13.2 XMLCoder: https://github.com/MaxDesiatov/XMLCoder.git @ 0.17.1 AppSyncRealTimeClient: https://github.com/aws-amplify/aws-appsync-realtime-client-ios.git @ 3.1.1 aws-crt-swift: https://github.com/awslabs/aws-crt-swift.git @ 0.6.1 Amplify: https://github.com/aws-amplify/amplify-swift @ 2.19.0 swift-log: https://github.com/apple/swift-log.git @ 1.5.3 swift-collections: https://github.com/apple/swift-collections @ 1.0.5 smithy-swift: https://github.com/awslabs/smithy-swift.git @ 0.15.0 aws-sdk-swift: https://github.com/awslabs/aws-sdk-swift.git @ 0.13.0 2023-10-18 01:51:45.235 xcodebuild[20775:97548] Writing error result bundle to /var/folders/c1/5nv1jx_s5ddcp_3l378t8_500000gn/T/ResultBundle_2023-18-10_01-51-0045.xcresult xcodebuild: error: Found no destinations for the scheme 'getting started' and action build.
1
0
7.7k
Oct ’23
Swift existential types: how to create generic Views that conform to a protcol ?
Hello, I am building a SwiftUI macOS app that manipulates a set of views ("playgrounds"). Each playground has some specific info but all share a generic common View. I also want an enum to list all available views in my app. I struggle with Swift existential types and protocol to model my data structures. In particular, I always end up with the error "Type any View can not conform to protocol View" Despite having read many docs and blog posts on existential types and why a protocol can not conform to itself. I am blocked on this. Here is my code : // the protocol all my playgrounds must implement protocol PlaygroundComponent { associatedtype Body: View @ViewBuilder var component: Self.Body { get } } // a generic type that implements the common part of all the playgrounds + the specific part from subtypes struct PlaygroundView<Content: PlaygroundComponent>: View { let content : Content var body: some View { Text("reused content") content.component } } // a concrete playground, it defines only the specific part struct ListModelsPlayground: PlaygroundComponent { var component: some View { Text("ListModelsPlayground") } } // an enum that lists all the implementations I have (only one to keep this example short) enum Playgrounds { case listModels var info: any PlaygroundView<PlaygroundComponent> { ListModelsPlayground() } // ---> compilation error : Type 'any PlaygroundComponent' cannot conform to 'PlaygroundComponent' } How can I model a generic view with individual subcomponents to later be part of such s or List( ForEach { } ) SwiftUI views ?
1
0
667
Oct ’23
Xcode does not show all folders on a SwiftPM project
I am opening a swiftPM project with Xcode. Under the Examples directory, only one subfolder is visible in Xcode, while there are 8 folders available in the Finder. I tried to reset all Xcode settings and caches but it does not change anything. I also try to "Add Files" or drag'n drop files to Xcode but the missing directories are not added. Any idea why it happens and how to fix this ?
1
0
1.6k
Dec ’22
codesign fails when started from SSH, succeed in Terminal
Hello, I am setting up a build (CICD) machine. I create a keychain and imported certificate and my signing key. I SSH into the machine and run xcodebuild: security unlock-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_NAME xcodebuild build \ -workspace "$WORKSPACE" \ -scheme "$SCHEME" \ -archivePath "$ARCHIVE_PATH" \ -configuration "$CONFIGURATION" It fails with Code Signing /Users/ec2-user/Library/Developer/Xcode/DerivedData/getting_started-cvkdjbhbeisorvewfctokujbqufy/Build/Products/Release-iphoneos/getting started.app/Frameworks/AWSAuthCore.framework with Identity Apple Distribution: Sebastien Stormacq (56U756R2L2) /usr/bin/codesign --force --sign 91C0CBE144634D8B64DFE0AD1676BF956C40D051  --preserve-metadata=identifier,entitlements '/Users/ec2-user/Library/Developer/Xcode/DerivedData/getting_started-cvkdjbhbeisorvewfctokujbqufy/Build/Products/Release-iphoneos/getting started.app/Frameworks/AWSAuthCore.framework' Warning: unable to build chain to self-signed root for signer "Apple Distribution: Sebastien Stormacq (56U756R2L2)" /Users/ec2-user/Library/Developer/Xcode/DerivedData/getting_started-cvkdjbhbeisorvewfctokujbqufy/Build/Products/Release-iphoneos/getting started.app/Frameworks/AWSAuthCore.framework: errSecInternalComponent Notice these two lines Warning: unable to build chain to self-signed root for signer "Apple Distribution: Sebastien Stormacq (56U756R2L2)" errSecInternalComponent I start a GUI session on the same machine, with the same user. I open a Terminal and type the exact same command security unlock-keychain -p Passw0rd dev.keychain xcodebuild build \            -workspace "$WORKSPACE" \            -scheme "$SCHEME" \            -archivePath "$ARCHIVE_PATH" \            -configuration "$CONFIGURATION" the code signing succeeds with ** BUILD SUCCEEDED ** I think this indicates the keychain and signing certificate are correct, I still double checked : All certificates, including the intermediate AppleWWDRCAGA3.cer, are in the keychain. All certificates have "Use System default" as trust. security dump-keychain | grep -i alis      "alis"<blob>="Apple Worldwide Developer Relations Certification Authority"     "alis"<blob>="Apple Worldwide Developer Relations Certification Authority"     "alis"<blob>="Apple Root CA - G2"     "alis"<blob>="Apple Root CA - G3"     "alis"<blob>="Apple Development: Sebastien Stormacq (UF9TVM4GSV)"     "alis"<blob>="Apple Distribution: Sebastien Stormacq (56U756R2L2)"     "alis"<blob>="Apple iPhone Certification Authority"     "alis"<blob>="Apple iPhone OS Provisioning Profile Signing"     "alis"<blob>="Apple Root CA" What is different between SSH session and GUI Terminal session ?
2
2
4.1k
Jan ’22
Unlock keychain on headless system does not work on BigSur
I am trying to setup a headless machine (no GUI session whatsoever, only SSH) to CI/CD My pre-build steps is to setup a keychain, but it looks like unlocking the keychain using just a SSH session is not working on macOS 11.6 ec2-user@ip-172-31-40-2 code % security create-keychain -p Passw0rd dev ec2-user@ip-172-31-40-2 code % security list-keychain -d user -s dev ec2-user@ip-172-31-40-2 code % security set-keychain-settings -t 0 dev security: SecKeychainSetSettings dev: User interaction is not allowed. ec2-user@ip-172-31-40-2 code % security unlock-keychain -p Passw0rd dev ec2-user@ip-172-31-40-2 code % security set-keychain-settings -t 0 dev security: SecKeychainSetSettings dev: User interaction is not allowed. ec2-user@ip-172-31-40-2 code % security import ~/AppleWWDRCA.cer -t cert -k dev -A 1 certificate imported. ec2-user@ip-172-31-40-2 code % security import ~/AppleWWDRCAG3.cer -t cert -k dev -A 1 certificate imported. ec2-user@ip-172-31-40-2 code % security import ~/AppleRoot.cer -t cert -k dev -A 1 certificate imported. ec2-user@ip-172-31-40-2 code % security import ~/DevAuthCA.cer -t cert -k dev -A 1 certificate imported. ec2-user@ip-172-31-40-2 code % security import ~/apple_dev_key.p12 -k dev -A # this is my private key + cert security: SecKeychainItemImport: User interaction is not allowed. ec2-user@ip-172-31-40-2 code % security unlock-keychain -p Passw0rd dev ec2-user@ip-172-31-40-2 code % security import ~/apple_dev_key.p12 -k dev -A security: SecKeychainItemImport: User interaction is not allowed. When doing the same from agri session, I can see that despite the unlock-keychain command, a GUI prompt is presented to the user to unlock the keychain.
2
0
5.7k
Sep ’21
[regression] xcodebuild 15 fails to find destination in scheme
Working on this project. https://github.com/sebsto/amplify-ios-getting-started The project has a scheme named getting started. Using Xcode 14.3.1, I can use this command to build the project: xcodebuild build -workspace getting\ started.xcworkspace -scheme "getting started" -configuration Release But when using Xcode 15, it fails with the following error message: Command line invocation: /Applications/Xcode-15.app/Contents/Developer/usr/bin/xcodebuild build -workspace "getting started.xcworkspace" -scheme "getting started" -configuration Release User defaults from command line: IDEPackageSupportUseBuiltinSCM = YES Resolve Package Graph Resolved source packages: Starscream: https://github.com/daltoniam/Starscream @ 4.0.4 AmplifyUtilsNotifications: https://github.com/aws-amplify/amplify-swift-utils-notifications.git @ 1.1.0 SQLite.swift: https://github.com/stephencelis/SQLite.swift.git @ 0.13.2 XMLCoder: https://github.com/MaxDesiatov/XMLCoder.git @ 0.17.1 AppSyncRealTimeClient: https://github.com/aws-amplify/aws-appsync-realtime-client-ios.git @ 3.1.1 aws-crt-swift: https://github.com/awslabs/aws-crt-swift.git @ 0.6.1 Amplify: https://github.com/aws-amplify/amplify-swift @ 2.19.0 swift-log: https://github.com/apple/swift-log.git @ 1.5.3 swift-collections: https://github.com/apple/swift-collections @ 1.0.5 smithy-swift: https://github.com/awslabs/smithy-swift.git @ 0.15.0 aws-sdk-swift: https://github.com/awslabs/aws-sdk-swift.git @ 0.13.0 2023-10-18 01:51:45.235 xcodebuild[20775:97548] Writing error result bundle to /var/folders/c1/5nv1jx_s5ddcp_3l378t8_500000gn/T/ResultBundle_2023-18-10_01-51-0045.xcresult xcodebuild: error: Found no destinations for the scheme 'getting started' and action build.
Replies
1
Boosts
0
Views
7.7k
Activity
Oct ’23
Swift existential types: how to create generic Views that conform to a protcol ?
Hello, I am building a SwiftUI macOS app that manipulates a set of views ("playgrounds"). Each playground has some specific info but all share a generic common View. I also want an enum to list all available views in my app. I struggle with Swift existential types and protocol to model my data structures. In particular, I always end up with the error "Type any View can not conform to protocol View" Despite having read many docs and blog posts on existential types and why a protocol can not conform to itself. I am blocked on this. Here is my code : // the protocol all my playgrounds must implement protocol PlaygroundComponent { associatedtype Body: View @ViewBuilder var component: Self.Body { get } } // a generic type that implements the common part of all the playgrounds + the specific part from subtypes struct PlaygroundView<Content: PlaygroundComponent>: View { let content : Content var body: some View { Text("reused content") content.component } } // a concrete playground, it defines only the specific part struct ListModelsPlayground: PlaygroundComponent { var component: some View { Text("ListModelsPlayground") } } // an enum that lists all the implementations I have (only one to keep this example short) enum Playgrounds { case listModels var info: any PlaygroundView<PlaygroundComponent> { ListModelsPlayground() } // ---> compilation error : Type 'any PlaygroundComponent' cannot conform to 'PlaygroundComponent' } How can I model a generic view with individual subcomponents to later be part of such s or List( ForEach { } ) SwiftUI views ?
Replies
1
Boosts
0
Views
667
Activity
Oct ’23
Xcode does not show all folders on a SwiftPM project
I am opening a swiftPM project with Xcode. Under the Examples directory, only one subfolder is visible in Xcode, while there are 8 folders available in the Finder. I tried to reset all Xcode settings and caches but it does not change anything. I also try to "Add Files" or drag'n drop files to Xcode but the missing directories are not added. Any idea why it happens and how to fix this ?
Replies
1
Boosts
0
Views
1.6k
Activity
Dec ’22
codesign fails when started from SSH, succeed in Terminal
Hello, I am setting up a build (CICD) machine. I create a keychain and imported certificate and my signing key. I SSH into the machine and run xcodebuild: security unlock-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_NAME xcodebuild build \ -workspace "$WORKSPACE" \ -scheme "$SCHEME" \ -archivePath "$ARCHIVE_PATH" \ -configuration "$CONFIGURATION" It fails with Code Signing /Users/ec2-user/Library/Developer/Xcode/DerivedData/getting_started-cvkdjbhbeisorvewfctokujbqufy/Build/Products/Release-iphoneos/getting started.app/Frameworks/AWSAuthCore.framework with Identity Apple Distribution: Sebastien Stormacq (56U756R2L2) /usr/bin/codesign --force --sign 91C0CBE144634D8B64DFE0AD1676BF956C40D051  --preserve-metadata=identifier,entitlements '/Users/ec2-user/Library/Developer/Xcode/DerivedData/getting_started-cvkdjbhbeisorvewfctokujbqufy/Build/Products/Release-iphoneos/getting started.app/Frameworks/AWSAuthCore.framework' Warning: unable to build chain to self-signed root for signer "Apple Distribution: Sebastien Stormacq (56U756R2L2)" /Users/ec2-user/Library/Developer/Xcode/DerivedData/getting_started-cvkdjbhbeisorvewfctokujbqufy/Build/Products/Release-iphoneos/getting started.app/Frameworks/AWSAuthCore.framework: errSecInternalComponent Notice these two lines Warning: unable to build chain to self-signed root for signer "Apple Distribution: Sebastien Stormacq (56U756R2L2)" errSecInternalComponent I start a GUI session on the same machine, with the same user. I open a Terminal and type the exact same command security unlock-keychain -p Passw0rd dev.keychain xcodebuild build \            -workspace "$WORKSPACE" \            -scheme "$SCHEME" \            -archivePath "$ARCHIVE_PATH" \            -configuration "$CONFIGURATION" the code signing succeeds with ** BUILD SUCCEEDED ** I think this indicates the keychain and signing certificate are correct, I still double checked : All certificates, including the intermediate AppleWWDRCAGA3.cer, are in the keychain. All certificates have "Use System default" as trust. security dump-keychain | grep -i alis      "alis"<blob>="Apple Worldwide Developer Relations Certification Authority"     "alis"<blob>="Apple Worldwide Developer Relations Certification Authority"     "alis"<blob>="Apple Root CA - G2"     "alis"<blob>="Apple Root CA - G3"     "alis"<blob>="Apple Development: Sebastien Stormacq (UF9TVM4GSV)"     "alis"<blob>="Apple Distribution: Sebastien Stormacq (56U756R2L2)"     "alis"<blob>="Apple iPhone Certification Authority"     "alis"<blob>="Apple iPhone OS Provisioning Profile Signing"     "alis"<blob>="Apple Root CA" What is different between SSH session and GUI Terminal session ?
Replies
2
Boosts
2
Views
4.1k
Activity
Jan ’22
Unlock keychain on headless system does not work on BigSur
I am trying to setup a headless machine (no GUI session whatsoever, only SSH) to CI/CD My pre-build steps is to setup a keychain, but it looks like unlocking the keychain using just a SSH session is not working on macOS 11.6 ec2-user@ip-172-31-40-2 code % security create-keychain -p Passw0rd dev ec2-user@ip-172-31-40-2 code % security list-keychain -d user -s dev ec2-user@ip-172-31-40-2 code % security set-keychain-settings -t 0 dev security: SecKeychainSetSettings dev: User interaction is not allowed. ec2-user@ip-172-31-40-2 code % security unlock-keychain -p Passw0rd dev ec2-user@ip-172-31-40-2 code % security set-keychain-settings -t 0 dev security: SecKeychainSetSettings dev: User interaction is not allowed. ec2-user@ip-172-31-40-2 code % security import ~/AppleWWDRCA.cer -t cert -k dev -A 1 certificate imported. ec2-user@ip-172-31-40-2 code % security import ~/AppleWWDRCAG3.cer -t cert -k dev -A 1 certificate imported. ec2-user@ip-172-31-40-2 code % security import ~/AppleRoot.cer -t cert -k dev -A 1 certificate imported. ec2-user@ip-172-31-40-2 code % security import ~/DevAuthCA.cer -t cert -k dev -A 1 certificate imported. ec2-user@ip-172-31-40-2 code % security import ~/apple_dev_key.p12 -k dev -A # this is my private key + cert security: SecKeychainItemImport: User interaction is not allowed. ec2-user@ip-172-31-40-2 code % security unlock-keychain -p Passw0rd dev ec2-user@ip-172-31-40-2 code % security import ~/apple_dev_key.p12 -k dev -A security: SecKeychainItemImport: User interaction is not allowed. When doing the same from agri session, I can see that despite the unlock-keychain command, a GUI prompt is presented to the user to unlock the keychain.
Replies
2
Boosts
0
Views
5.7k
Activity
Sep ’21