Hi,
I'm trying the new Swift Testing instead of XCTest for my new project. I am using RxSwift+UIKit. And when I am trying to test my ViewModel that has a Driver in it, it crashes due to the driver is not being called form main thread.
Thread 5: Fatal error: `drive*` family of methods can be only called from `MainThread`.
Here is the test code:
struct PlayerViewModelTest {
@Test func testInit_shouldPopulateTable_withEmpty() async throws {
// Arrange
let disposeBag = DisposeBag()
var expectedSongTableCellViewData: [SongTableCellViewData]?
// Act
let sut = PlayerViewModel(provideAllSongs: { return .just(mockSongList) },
provideSongByArtist: { _ in return .just(mockSongList) },
disposeBag: disposeBag)
sut.populateTable
.drive(onNext: { expectedSongTableCellViewData = $0 })
.disposed(by: disposeBag)
// Assert
#expect(expectedSongTableCellViewData != nil, "Should emit something so it should not be nil")
#expect(expectedSongTableCellViewData!.isEmpty, "Should emit empty array")
}
}
This never happen in XCTest. So I assume Swift Testing is not being run in the main thread? How do I fix this?
Thanks
This is a dedicated space for developers to connect, share ideas, collaborate, and ask questions. Introduce yourself, network with other developers, and join us in fostering a supportive community.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hello,
I have a question regarding the ethernet-over-USB-C stack within iOS/iPadOS.
It seems that when manually assigning an IP on this interface within iOS, the IP is stored. Therefore, when disconnecting (the USB-C cable) and reconnecting to another device for a subsequent ethernet connection, the iOS device will always default to the previously assigned IP address (obviously, this isn't the case if the other end is a DHCP server).
So, within the iPhone's Ethernet-over-USB-C driver, I was curious if iOS just keeps the assignment based on the MAC of the local USB-C interface, or is stored information tied to some other identifier? Is there a way to override this behavior?
Thank you
I have an idea for an app for awhile (5+ years) and it took awhile (a year or more to figure out how to develop on - I know C/C++/FORTRAN, started in the punch card era). I ended up using the MacBook I had, some books and chatGPT and plunged into development. BTW this was all happening while I'm retired, included moving to FL from MD. There are times where development stops for months at a time, I've started and stopped at least four or five times on different portions of the project. I've realized that I can actually skip the user interface until the end if ever.
At the beginning of code development, I did little more that "Hello world" programs to get my feet wet. Golf, pickleball, doctor appointments, etc. interrupts development. When I get back to it, my code has "disappeared", I open Xcode, open the project and I don't see any of my code - where did it go?
I did find the code using the Finder in Directory/projname/projname/ContentView.swift (I'm not sure why projname is duplicated, no doubt my ignorance!) - so the code is still present, somewhere!
Topic:
Community
SubTopic:
Apple Developers
Apple announces a Japanese game (Assassin's Creed) in Japanese in Japan but then states "the App is currently not available in your country or region"... that is, Japan!
https://developer.apple.com/jp/news/?id=q2zte70j
Game is unavailable so why announce it?
Hi all, after installing ios 18.4 beta here in Europe (and also resetting and restoring my iphone given Apple Intelligence features were not working at all initially) my phone decided to reoptimise my whole photo library which took a while and I understand it was a battery consuming process. Nonetheless, this is all done, all Apple intelligence features supposedly work and my phone is still in ongoing device setup burning through the battery to the point I am sure this will make my battery health drop.
does anyone know what is going on (indexing?), how long it will take and why is it happening? Is it because of the 18.4 beta or because of having Apple Intelligence for the first time?
can someone please confirm that at the very least this will NOT have to take place again after moving to the official 18.4?
thanks
Topic:
Community
SubTopic:
Apple Developers
Hello Devs,
I wanted to bring this up to display the frustration that I have obtaining the CarPlay entitlements. First and foremost they don't give you a set timeline and there is no contact number to speak to someone about this. When you call developer support they go on and say it is a different department. There is an email but all I have received is an automated response back to me.
Has anyone received the navigation entitlements and if so what was the timeline of you receiving it?
My mail app keeps crashing? Can Anyone help?
I'm using Mac OS Ventura 13.7.5 - updated yesterday and having this issue ever since:
Translated Report (Full Report Below)
Process: Mail [924]
Path: /System/Applications/Mail.app/Contents/MacOS/Mail
Identifier: com.apple.mail
Version: 16.0 (3731.700.6.1.10)
Build Info: Mail_App-3731700006001010~2
Code Type: X86-64 (Native)
Parent Process: launchd [1]
User ID: 502
Date/Time: 2025-03-31 23:17:55.8952 +0100
OS Version: macOS 13.7.5 (22H527)
Report Version: 12
Anonymous UUID: 2B9E5AC3-9B82-567C-8B10-A0555BEEE9BC
Time Awake Since Boot: 990 seconds
System Integrity Protection: enabled
Crashed Thread: 3 Dispatch queue: MCTaskHandler queue (QOS: BACKGROUND)
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process: Mail [924]
Application Specific Information:
abort() called
Topic:
Community
SubTopic:
Apple Developers
Since macOS 15.4 Beta 2, my App Store has been unable to install or download any new applications; it can only download applications I have previously purchased.
It appears as follows: when I click 'Get,' the system spins to load and then returns to the initial state.
Upon checking system error reports, it seems there's an issue with AMSUIPaymentViewService_macOS [2113]. This problem persists despite changing credit cards or even removing all credit cards.
macOS 15.4 Beta 3 has not fixed this error.
I am using HelloPhotogrammetry in Xcode
I can make one model with something like
HelloPhotogrammetry.main([path_to_folder_of images, path_to_output/model.usdz, "-d", "medium", "-o", "unordered", "-f", "high" ])
But how would I request several models simultaneously? I only want to vary the detail.
[
("/Users/you/Desktop/model_medium.usdz", detail: .medium),
("/Users/you/Desktop/model_full.usdz", detail: .full),
("/Users/you/Desktop/model_raw.usdz", detail: .raw
]
Hello Apple Developer Community,
I'd like to propose a system-wide enhancement for future versions of iOS: the integration of native utility apps — Calculator, Compass, Voice Memos, Magnifier, Measure, Weather, and Translate — into a single unified app, tentatively called Apple Assist.
The vision is to provide:
A modular interface where users can enable/disable tools as needed.
Smarter workflows with proactive suggestions based on context (time, location, task).
AI-powered interaction through voice and Apple Intelligence (Advanced Siri).
Benefits:
Reduces icon clutter on the Home Screen.
Simplifies the user experience with a single access point.
Creates opportunities for automation and accessibility.
Imagine saying:
“Hey Siri, record a quick note and measure the table” — and the app smartly loads those modules on demand.
Would love to hear feedback from the community — and whether Apple might consider something in this direction for iOS 19 or beyond.
Best regards,
Jose Luiz Horta Barbosa Maurity Cruz
Topic:
Community
SubTopic:
Apple Developers
i am using this code
public static bool CheckForForceUpdate()
{
try
{
Version latestVersion = new(GetLatestVersion());
Version currentVersion = new(AppInfo.VersionString);
if (latestVersion != null && currentVersion < latestVersion)
{
NSUserDefaults.StandardUserDefaults.SetBool(true, StorageKey.IsForceUpdate);
return true;
}
else
{
NSUserDefaults.StandardUserDefaults.SetBool(false, StorageKey.IsForceUpdate);
return false;
}
}
catch (Exception ex)
{
Console.WriteLine("CheckForForceUpdate....." + ex.Message);
return false;
}
}
public static string GetLatestVersion()
{
try
{
string appId = "1586153397"; // Replace with your App Store app ID
string url = $"https://itunes.apple.com/lookup?id={appId}";
using (HttpClient client = new HttpClient())
{
var response = client.GetStringAsync(url).GetAwaiter().GetResult();
var json = JObject.Parse(response);
var latestVersion = json["results"]?[0]?["version"]?.ToString();
return latestVersion;
}
}
catch (Exception ex)
{
Console.WriteLine("GetLatestVersion..." + ex.Message);
return null;
}
}
The value of latestVersion should 2.1 in my production app i am not able to get this
hence i am not able to achieve Force Update functionality
Topic:
Community
SubTopic:
Apple Developers
Back in December 2024 I noticed when I go through the steps to print I would get an error to cancel or retry. We have 4 iPhones and 3 had the newest IOS and those 3 would get the same error. The phone that had old ios 17 something the print would work. Called Apple and did troubleshooting, the opened something on apples end for the developer to investigate. Within 2 weeks a new ios was available and fixed the issue on the 3 phones that could not print. I did the latest update February and March 2025 on all 4 phones thinking no way the issue will happen again and if did all 4 phone cannot print. Is there an iOS bug that is affecting printing ios 18.3.2.
Topic:
Community
SubTopic:
Apple Developers
We have an Angular web application which gets installed as a webclip on client iPads. The web application has buttons that will take the user directly to our native iOS application. We also would like a way for our webclip application when opened to perform some data lookups and if certain conditions are met, then take the user directly to our native iOS app.
We're using vanilla JS window.open. This works well when the user manually taps button. However, this does not work when the webclip application tries to open the native iOS app without user interaction. In that case the window.open does nothing. The window.open target URL is the exact same in both cases.
We tried using URL Schemes instead of Universal Links but with this the iPad displays a modal asking "Do you want to open ?". For our use case, this is unacceptable. Is there any way for us to skip this prompt? We'd like there to be no additional action needed from the user to be able to get from webclip to native iOS app beyond simply opening the webclip.
I have been working on telecommunication testing of ALE Softwar. Since no invite email received, I can’t unable to test in my IPhone.
there is no options to add my test app.
this that app url
https://apps.apple.com/in/app/ale-softphone/id1588713865
Topic:
Community
SubTopic:
Apple Developers
Hi!I‘ve bought my iphone in june 2024 and battery health was at 100% untill March this year.Now its April its at 94%.I’ve been always charging my phone to 80% and would never let it drop below 20%. Is this good or bad?
Topic:
Community
SubTopic:
Apple Developers
Hi,
I needed some help in understanding the crash logs which is as below. Any help is very much appreciated.
Translated Report (Full Report Below)
Process: WindowServer [440]
Path: /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/Resources/WindowServer
Identifier: WindowServer
Version: 600.00 (???)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
User ID: 88
Date/Time: 2025-03-13 12:58:55.0091 +0800
OS Version: macOS 15.3.1 (24D70)
Report Version: 12
Anonymous UUID: C795BDC3-66F0-6CF9-7533-B788D0B2DD80
Sleep/Wake UUID: 6F927AA6-3C7B-4EE9-AB68-B77F0D1D622A
Time Awake Since Boot: 4400 seconds
Time Since Wake: 996 seconds
System Integrity Protection: enabled
C
Topic:
Community
SubTopic:
Apple Developers
我们App的搜索功能,以前使用系统键盘进行输入中文搜索时,只有当输入完整,点击键盘上的对应词后,才会开始搜索, 现在没按下一个字母,就会触发搜索。
Topic:
Community
SubTopic:
Apple Developers
Hi everyone,
We're hoping someone here can help us out.
We've run into a consistent issue when trying to enroll a new Apple Developer account as an organisation using our DUNS number. Here's what we've experienced:
Individual enrollment through the Developer app works perfectly with a new Apple ID.
However, when using an existing Apple ID and selecting organization enrollment, the process gets stuck:
The payment button is greyed out in the Developer app.
We're then locked out of enrolling through the app entirely.
4. When trying to complete the enrollment via the Developer website, there’s no valid payment method available (e.g., VISA option missing CVV field), and any attempts to proceed just loop without success.
We're essentially stuck in a limbo state where we can’t proceed.
We’ve gone through all the support channels:
The automated assistant (Gaby) is unable to resolve the issue or understand the full context.
Live chat support for both individual and business accounts told us they can’t assist and referred us back to the developer support system—which leads us back to square one.
All members of our team were able to enroll individually without issue, but organisation enrollment consistently failed.
Business support and Commercial support (spoken to supervisors) are unable to assist. They really tried and made an effort.
Has anyone experienced this before? Is there a way to get in touch with a real person at Apple who can actually resolve this? What are our next steps?
Any advice would be greatly appreciated.
Thanks!
Topic:
Community
SubTopic:
Apple Developers
After connecting to a Passpoint network on macOS, the SSID field is displayed as empty.
Bugs ?
Passpoint connections are established and function correctly, with network communication unimpeded. However, a display issue where the SSID field is blank is present on macOS versions 13 through 15 inclusive. This issue persists even when utilizing connection profiles created with Apple Configurator.
Help me. Thks
Topic:
Community
SubTopic:
Apple Developers
I'm building a Live Activity using ActivityKit in iOS, and I'm trying to understand how apps like Uber or Lyft manage to keep the Dynamic Island always in its expanded state, without transitioning through the compact phase.
In my implementation, the Live Activity always starts in the compact state, and only expands temporarily when I interact with it. I've tried the following:
Updating the ContentState frequently using activity.update(using:)
I tried updating the activity every 1 second, but it didn’t make a difference.
Leaving the compactLeading, compactTrailing, and minimal regions empty using EmptyView() — also didn’t change the behavior.
Delaying the initial update by 1 second — no effect.
What I'm trying to figure out:
Is there any way to programmatically force or request the Dynamic Island to stay in the expanded state?
Could this behavior be achieved through push updates, using apns-push-type: liveactivity and a high priority (apns-priority)?
What I’m trying to achieve is similar to the behavior shown in the images below — the apps do not transition to the compact island, but instead displays the expanded view immediately.
Example: