Posts under Developer Tools & Services topic

Post

Replies

Boosts

Views

Activity

Xcode cloud GitLab Integration failing
Hello, im trying to configure my Gitlab Community Edition Instance for Xcode Cloud, but it always fails that Xcode Cloud is not able to find the repository. I have tried different things. Also tried with the admin user. The rights are also matching (Scopes: api, read_user, , read_repository). And I’m also the owner of the repository. Then I have looked into the logs of the GitLab instance and noticed something weird: 127.0.0.1 - - [11/Dec/2024:22:19:58 +0100] "GET /api/v4/projects HTTP/1.1" 200 1590 "" "Xcode Cloud" 7.56 127.0.0.1 - - [11/Dec/2024:22:19:58 +0100] "GET /api/v3/meta HTTP/1.1" 410 62 "" "Xcode Cloud" - 127.0.0.1 - - [11/Dec/2024:22:19:58 +0100] "GET /api/v4/projects HTTP/1.1" 200 1590 "" "Xcode Cloud" 7.56 Like the first and third api call makes sense. Trying to fetch the projects and is also successful (status code 200). But then I see Xcode Cloud is trying to access another API, which seems to be from GitHub. At some other location in the log I have seen a API call from Bitbucket. So why does Xcode cloud tries to call APIs from other providers, when I have selected the GitLab one at the configuration? Is this a bug or is this intended? Have tried now many things and I have absolutely no idea what the problem is, because Xcode cloud is also not giving really detailed logs about the errors.
0
0
417
Dec ’24
How I successfully enrolled for the Apple Developer Program!
Hey guys! I believe I've found the solution to successfully enrol for the Apple Developer Program. This is for all of us who have tried enrolling and waiting in vain for the confirmation email from Apple after the acknowledgement email. First, you should know that the whole time I was attempting to enrol I was using my iCloud account and I was trying to do so via my MacBook with the browser. I tried both Firefox and Safari just to be sure it wasn't a browser thing. Then a thought came to me... since I knew Apple also had an Apple Developer app on its store that according to its articles it claims can be used to enrol... I chose to go for it, and this time I opted to enrol with my iPhone for good measure... I downloaded the Apple Developer app... logged into my iCloud account and attempted to enrol. However, this still didn't work. The message said that I couldn't use that email to enrol... And so I signed out and opted to use my Gmail account and voila! I was able to enrol!! The payment went through successfully! I received the SMS notification from my bank and I also got the subscription confirmation from Apple. That's how I did it. I really hope this helps someone 🙏.
0
0
294
Nov ’24
Xcodebuild command compiles macro with wrong target
Hello, today I encountered strange xcodebuild command behaviour when building an application on my company CICD machine. Our app has the standard settings for the IOS platform, without any changes to the Build Settings, but building on the machine for CICD (mac mini M1) fails during build of SPM library. The aforementioned library is simple local SPM Package which wrapps swift-dependencies library, adds macros and few structures. Build log show that the process attempted to build a macro with the x86_64 architecture(log fragment at the end). Building on my local machine succeeds. Unfortunately I've run out of ideas, so I'm hoping that maybe someone here has encountered something similar and will be able to help me solve the problem. Used command: xcodebuild -workspace $WorkSpaceName.xcworkspace -scheme SchemeName -configuration Release -destination generic/platform=iOS -skipPackagePluginValidation -skipMacroValidation clean archive Package.swift: https://gist.github.com/pelekon/4a563b7f279c0d2f02060b8c554d76b2 Basic system env info: MacOS 15.1.1, Xcode 16.1 (16B40) Log fragment: https://gist.github.com/pelekon/d008ff366124e333d4318fa152062797
0
0
380
Nov ’24
How to run Catalyst xctest bundle with xcrun
I'm trying to run an xctest bundle, built for catalyst, with xcrun. i.e. xcrun xctest path_to_my_test.xctest It fails, complaining that: The bundle "MyBundle" couldn't be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle.....but incompatible platform (have 'MacCatalyst', need 'macOS') So it seems like because I'm not executing it in a sim it wants the bundle to be a macOS bundle. But I would have thought it would be possible to run a Mac Catalyst target directly on a macOS host the same as a native macOS test target. Is this not possible?
0
0
402
Nov ’24
Debug Memory Graph does not show memory leaks.
Here is a modified code from the documentation example https://www.swift.org/documentation/server/guides/memory-leaks-and-usage.html#troubleshooting : class ViewController: UIViewController { var closure: () -> Void = { () } public func doNothing() {} public func doSomethingThatLeaks() { self.closure = { // This will leak as it'll create a permanent reference cycle: // // self -> self.closure -> self self.doNothing() } } override func viewDidLoad() { super.viewDidLoad() // Memory leak example: doSomethingThatLeaks() // Abandoned memory example: // NotificationCenter.default.addObserver(forName: .init("Abandoned"), object: nil, queue: nil) { _ in // print("\(self)") // } } deinit { print(#function, Self.self) } } If you place it, for example, in a navigation controller, do a push-pop several times, deinit will not be printed. But if you look in the Debug Memory Graph, it will not even show that there is a strong reference to this controller: Only if you manually select: You can see that it is held by the closure context, which it holds: This is definitely not abandoned memory (like the commented piece of the code example), but it is not shown either in the Debug Memory Graph or in Instruments Leaks. Why?
0
1
463
Nov ’24
How does DerivedData really work on Xcode Cloud?
Currently Im trying to save few files in it but on every run this folder is empty. I have the following script in ci_post_clone.sh mkdir ${CI_DERIVED_DATA_PATH} cd ${CI_DERIVED_DATA_PATH} ls -als touch test return 1 My expectation is that on the second run it would show test file in DerivedData or fail at creating the directory, but the issue is that this file is not created. does it need a successful build for this folder to be saved? in Xcode Cloud, in workflow environment I have unchecked Clean build Xcode Cloud will not restore derived data or caches for your builds, which may take significantly longer as a result.. One more question here would be what is meant by caches? are there other folders being saved? Also a bit of context. Im trying to build a Kotlin Multiplatform project but it fails with Showing All Issues > Could not resolve all files for configuration ':composeApp:iosArm64CompileKlibraries'. > Could not download lifecycle-viewmodel.klib (androidx.lifecycle:lifecycle-viewmodel-iosarm64:2.9.0-alpha03) > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-viewmodel-iosarm64/2.9.0-alpha03/lifecycle-viewmodel-iosarm64-2.9.0-alpha03.klib'. > Could not GET 'https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-viewmodel-iosarm64/2.9.0-alpha03/lifecycle-viewmodel-iosarm64-2.9.0-alpha03.klib'. > Got socket exception during request. It might be caused by SSL misconfiguration > Connection reset by peer my guess is that Xcode Cloud or Google servers probably has some limitation. So if I cache those libraries my project will hopefuly compile once again.
0
1
500
Dec ’24
IBInspectable was deprecated.
I noticed that IBDesignable was deprecated in the Xcode 16 release notes, and IBInspectable was deprecated in the Xcode 16.1 release notes. So, I performed some tests on IBDesignable and IBInspectable in Xcode. I wrote the following code: @IBDesignable extension UIView { @IBInspectable var cornerRadius: CGFloat { get { layer.cornerRadius } set { layer.cornerRadius = newValue } } @IBInspectable var borderWidth: CGFloat { get { layer.borderWidth } set { layer.borderWidth = newValue } } @IBInspectable var borderColor: UIColor { get { UIColor(cgColor: layer.borderColor ?? .init(red: 1, green: 1, blue: 1, alpha: 0)) } set { layer.borderColor = newValue.cgColor } } } I cannot access the IBInspectable property in Xcode 16. However, I can access the IBInspectable property in Xcode 16.1 and Xcode 16.2 Beta, where the Interface Builder shows it in the Attributes Inspector. Is it possible that this will be updated later, as it differs from the release notes? Thank you.
0
0
873
Nov ’24
Settingup External Users to Test my App
Hi I'm trying to setup external users to test my app. When I get to the screen attached its not letting me complete the setup because it says I have to only use numbers for the phone number. I have only used numbers, I've ensure I've done so but its not recognizing this. Has anyone else had this issue? Could you make suggestions as to how to fix the problem? [Image Edited by Moderator to Remove Personal Information]
0
0
165
Dec ’24
Localized Folder Created After Installing App with Same Name as Existing Application
I have two macOS applications: Application A, named My App.app with the bundle ID com.comp.myapp, and Application B, named My App.app with the bundle ID com.comp.myapp2. Both applications have the same name. Application A is installed at /Applications/My App.app. When I run the installer for Application B, it gets installed in a folder at /Applications/My App.localized/My App.app. Even if I remove Application A using the preinstall script of Application B's installer, the result remains the same. Does the installer determine the installation path with the new folder before the preinstall script executes? How can it be addressed so the new folder will not be created? Notes: We have a composite package that contains multiple components. Instead of just running pkgbuild, we use our own components.plist rather than a synthesized one. The components.plist is attached. The PackageInfo for Application B is also attached. components.plist PackageInfo packageInfo.xml components.plist
0
0
475
Nov ’24
Does 'swift build' execute Test Code on macOS even for iOS Only Apps?
Hi, I have a library for my iOS Apps. It uses among other things the Combine framework, Core Location and OSLog. I manage the library using the Swift Package Manager (SPM) and usually build via XCode, which works fine. However for CI I would like to build everything from the terminal. So I do call 'swift build' on the terminal. This produces errors such as: 'PassthroughSubject' is only available in macOS 10.15 or newer 'os_log(:dso:log::_:)' is only available in macOS 10.14 or newer 'eraseToAnyPublisher()' is only available in macOS 10.15 or newer 'authorizedWhenInUse' is unavailable in macOS 'AnyPublisher' is only available in macOS 10.15 or newer 'showsBackgroundLocationIndicator' is unavailable in macOS ... These are all from the used frameworks. However, I do not care on which version of macOS, for example, PassthroughSubject is only available at, since the library is iOS only. Too make sure of that I added "platforms: [.iOS(.v14)]" to my Package.swift and thought this would be sufficient, so the project does not get build for macOS. Can anyone please tell me or give me a hint on what I am getting wrong here?
0
0
263
Nov ’24
Apple Wallet extension
I'm implementing Apple wallet extension in an iOS app. Currently following this documentation https://developer.apple.com/documentation/passkit/implementing-wallet-extensions I'm facing challages while testing the extension. Any suggestion how can i test it during developmet. Like if i want to test the storyboard from Wallet UI extension. Any suggestions or helping material would be appriciated.
0
0
491
Dec ’24
Response Time for Apple Developer Enterprise Program Registration
Our company has been trying to register for the Apple Developer Enterprise Program since September 15, 2024. However, it wasn’t until early November that we received an email requesting our business information. Following that, we contacted Apple’s team on November 15, 2024, to answer their interview questions. Now, more than a month has passed since that call, and we still have no idea about the status of our approval. When I check the account, it always shows 'Your enrollment is being processed. Your enrollment ID is 8K8SXNKA89.' I’ve also emailed Apple Support but have not received any further response. How much longer will this process take? Apple’s handling of this is excessively slow and frustrating
0
0
620
Dec ’24