Post

Replies

Boosts

Views

Activity

Xcode Cloud can't access SPM dependencies in GitHub private repo?
Can Xcode Cloud resolve dependencies that are in private GitHub repos? Project is in GitHub Enterprise Cloud. Our GitHub is not self hosted. I am an organization owner in GitHub. Project is private. Project is using swift packages for dependencies. Some dependencies are public repos. Some dependencies are private repos inside the same GitHub organization. I have given permission to the "Xcode Cloud" GitHub app to access all the repos of the organization. This means the "Xcode Cloud" GitHub app is listed in GitHub settings of the project, and the Github settings of every dependency. When I build with Xcode Cloud, during the "xcodebuild -resolvePackageDependencies..." step, it gives these errors. I've blanked out my repo and project name. Command line invocation:     /Applications/Xcode-beta.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies -workspace /Volumes/workspace/repository/___.xcworkspace -scheme ___ -derivedDataPath /Volumes/workspace/DerivedData User defaults from command line:     IDEDerivedDataPathOverride = /Volumes/workspace/DerivedData IDEPackageSupportUseBuiltinSCM = YES Resolve Package Graph Fetching from git@github.com:___.git Fetching from git@github.com:___.git skipping cache due to an error: Failed to clone repository git@github.com:___.git: Cloning into bare repository '/Users/local/Library/Caches/org.swift.swiftpm/repositories/___... fatal: could not read Username for 'http://github.com': terminal prompts disabledan out-of-date resolved file was detected at /Volumes/workspace/repository/___.xcworkspace/xcshareddata/swiftpm/Package.resolved, which is not allowed when automatic dependency resolution is disabled; please make sure to update the file to reflect the changes in dependencies. Running resolver because the following dependencies were added: '___' (git@github.com:___.git) Resolved source packages:   ___: (null) The package.resolved file is in the repo, and it isn't out of date, so I think that error isn't accurate. On appstoreconnect website, in the Xcode cloud tab of the project, under Settings, it says it still needs access to all the swift package repos. The access has already been given and it's checked off in green, yet it still asks for access on the same dependency repos. The following private repositories were discovered from Git submodules, Custom Scripts, and Dependency Managers. Only repositories that have been granted access can be used for building “___”. Access Requested (3) Grant access to the following repositories to allow them to be used for this product. Pressing the "Grant" button on one of the listings just takes me to a white page for a second, then to the default appstoreconnect home page. It looks like it tries get access, realized it's already granted, and just erroneously defaults back to the home page. Furthermore, I tested all of this on some brand new test project with a dummy private swift package dependency, and the exact same looking errors showed up again. When I set the dummy dependency's GitHub access from private to public, Xcode Cloud resolves the dependency without error, and builds the test project as well. So it seems like xcodebuild in the Xcode Cloud instance can't or won't use ssh to access the private repos. I've read the docs on https://developer.apple.com/documentation/xcode/connecting-xcode-cloud-to-github Can Xcode Cloud resolve dependencies that are in private GitHub repos? It's all in the same organization. There are green checkmarks all over in Xcode when setting up the access to github, all the repos have been given access. Thanks!
4
1
2.3k
Sep ’22
Default localization fallback not used for untranslated string in catalog
For an iOS app, I'm using a String Catalog for localization. In the Localizable.xcstrings, I have all the Keys set with IDs, and default to English set, and other languages added. All of the English strings has some English text value assigned. The Key and the values are different. The Swift code only makes references to the Keys. As for the non-English languages, not all of the strings have been translated. Many of the fields are not set, i.e. it's in grey and showing the English text, and I can see the "new" tags for those untranslated strings in the String Catalog. All of that is good and expected. However, when I run the app in a non-English language, for the untranslated strings, I'm seeing the string Key instead of the English value. The screens in the app are shows Key IDs all over the place, along with some translated text, but nothing in default English. Is that how it's suppose to work? It seems like the "Default Localization (en)" should be shown. That's the whole point of having a fallback default language is it not? I understand pre-string catalogs, the fall back default is the key, but now I'd expect it to use the default language as backup since that's what's shown in the catalog.
1
0
339
Sep ’24