I've been publishing iOS apps since 2009, a couple of which have grown quite large in that time (over 200 classes in the largest), all in the original Objective-C language. I've kept an eye on Swift and started some new projects in Swift, but the task of rewriting my existing apps has been too big to make a priority. Then this year, the economic slowdown from COVID has given me more time, and I've decided to tackle it this fall. At the same time, I've been noticing a stronger bias toward Swift in Apple's documentation and code samples. For example, new framework documentation only includes Swift code samples, while older documentation includes both. This confirms that the time is right to make this investment.
I've found some good tips for managing the migration, including this article:
https://developer.apple.com/documentation/swift/migrating_your_objective-c_code_to_swift
My question is more general: if you migrated a large project, I'd be curious to hear something about your overall experience. What made you decide to go for it, was it easier or harder than you expected, are you happy with the results?
BTW, I ported some of my apps to Android back in 2013, so I have some sense of the scale of the project. I'm expecting this to be easier than that since most of the classes and frameworks are the same, but with slightly different names and a very different syntax. Simply retyping thousands of lines of code with a new syntax can be exhausting, though.
Post
Replies
Boosts
Views
Activity
App Store Connect requires four different screen resolutions for preview videos -- full screen iPhone, home button iPhone, iPad and Mac. Will the app store display the video for a different device than the device the app store is viewed on? For example, if I create only an iPad video, will it display to users browsing on an iPhone?
Or do I really need to record and edit four separate versions of each video for all users to see it?
I'm trying to use Xcode UI tests for the first time. I added a UI Tests target and set up the signing, then opened the default AppnameUITests.swift file. I added a new function named testAboutPage(), clicked inside the block and clicked the Record UI Test button (red circle) at the bottom of the editor window. If the app is already running when I do this, Xcode crashes immediately. If the app is not running, Xcode builds and runs the app, then crashes.
I've seen reports of this going back years, but none of the posts have a solution. I do have a crash log to share. Does anyone know how to get past this?
This forum won't let me upload the complete crash log because it exceeds the size limit, but here's the first part through the stack trace of the crashed thread:
Process: Xcode [46652]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 16.2 (23507)
Build Info: IDEApplication-23507000000000000~2 (16C5032a)
App Item ID: 497799835
App External ID: 870964517
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
User ID: 503
Date/Time: 2025-02-04 12:58:05.5200 -0800
OS Version: macOS 15.3 (24D60)
Report Version: 12
Anonymous UUID: 144B0B99-8D44-736B-0D9A-1F6FA6DF85F7
Time Awake Since Boot: 48000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process: Xcode [46652]
Application Specific Information:
abort() called
Application Specific Signatures:
((result)) != nil
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x18a3b3720 __pthread_kill + 8
1 libsystem_pthread.dylib 0x18a3ebf70 pthread_kill + 288
2 libsystem_c.dylib 0x18a2f8908 abort + 128
3 IDEKit 0x109e81554 +[IDEAssertionHandler _handleAssertionWithLogString:assertionSignature:assertionReason:extraBacktrace:] + 964
4 IDEKit 0x109e819e4 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] + 876
5 DVTFoundation 0x10600d358 _DVTAssertionHandler + 424
6 DVTFoundation 0x10600d4d8 _DVTAssertionFailureHandler + 196
7 IDEKit 0x10a1f99e4 -[IDEUIRecordingManager _workspaceTabController] + 176
8 IDEKit 0x10a1fa528 __94-[IDEUIRecordingManager _startRecordingWithLaunchSession:alwaysAskForAPIAccess:reservedNames:]_block_invoke_3 + 252
9 DVTFoundation 0x10611fc9c __DVT_CALLING_CLIENT_BLOCK__ + 16
10 DVTFoundation 0x1061206c4 __DVTDispatchAsync_block_invoke + 152
11 libdispatch.dylib 0x18a237854 _dispatch_call_block_and_release + 32
12 libdispatch.dylib 0x18a2395b4 _dispatch_client_callout + 20
13 libdispatch.dylib 0x18a248040 _dispatch_main_queue_drain + 984
14 libdispatch.dylib 0x18a247c58 _dispatch_main_queue_callback_4CF + 44
15 CoreFoundation 0x18a5139d0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
16 CoreFoundation 0x18a4d35bc __CFRunLoopRun + 1996
17 CoreFoundation 0x18a4d2734 CFRunLoopRunSpecific + 588
18 HIToolbox 0x195a41530 RunCurrentEventLoopInMode + 292
19 HIToolbox 0x195a47348 ReceiveNextEventCommon + 676
20 HIToolbox 0x195a47508 _BlockUntilNextEventMatchingListInModeWithFilter + 76
21 AppKit 0x18e04a848 _DPSNextEvent + 660
22 AppKit 0x18e9b0c24 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688
23 AppKit 0x18e03d874 -[NSApplication run] + 480
24 IDEKit 0x109e50f14 -[IDEApplication run] + 192
25 AppKit 0x18e014068 NSApplicationMain + 888
26 dyld 0x18a06c274 start + 2840