Post

Replies

Boosts

Views

Activity

Reply to Unit test never runs
BTW, this is my Podfile, if it has anything to do with it: use_frameworks! platform :ios, '11.0' target 'bimb-authenticate-ios' do # Pods for bimb-authenticate-ios pod 'Rudder', '~> 1.15.1' pod 'RxSwift', '6.6.0' pod 'RxCocoa', '6.6.0' pod 'KeychainAccess' pod 'Swinject' pod 'SwiftOTP', :git => 'https://github.com/lachlanbell/SwiftOTP.git', :branch => 'swift-5.0-cryptoswift' pod "RecaptchaEnterprise", "18.3.0" pod 'RealmSwift', '~>10' pod "RxRealm" pod 'SwiftLint' end target 'bimb-authenticate-iosTests' do inherit! :complete # Pods for testing pod 'RxBlocking', '6.6.0' pod 'RxTest', '6.6.0' end target 'bimb-authenticate-iosUITests' do inherit! :complete # Pods for testing pod 'RxBlocking', '6.6.0' pod 'RxTest', '6.6.0' end # FORCE SET DEPLOYMENT TARGET TO 11.0 SINCE platform :ios, '11.0' DIDN'T SEEM TO DO ANYTHING! post_install do |pi| pi.pods_project.targets.each do |t| t.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0' end end end
Nov ’23
Reply to App crashed with NSInvalidUnarchiveOperationException when run from different target and scheme.
I've fixed this by using a custom NSKeyedUnarchiver based on this SO answer: https://stackoverflow.com/a/46832840/4124849. Here's the class: class KeyedUnarchiver: NSKeyedUnarchiver { override open func `class`(forClassName codedName: String) -> Swift.AnyClass? { let legacyModuleString = "cdx_ios." if let range = codedName.range(of: legacyModuleString), range.lowerBound.encodedOffset == 0 { return NSClassFromString(codedName.replacingOccurrences(of: legacyModuleString, with: "")) } return NSClassFromString(codedName) } } So I guess the problem is that my object has nested object so NSKeyedUnarchiver.setClass(_:forClassName:) doesn't work.
Topic: App & System Services SubTopic: General Tags:
Jun ’24
Reply to Unit test never runs
BTW, this is my Podfile, if it has anything to do with it: use_frameworks! platform :ios, '11.0' target 'bimb-authenticate-ios' do # Pods for bimb-authenticate-ios pod 'Rudder', '~> 1.15.1' pod 'RxSwift', '6.6.0' pod 'RxCocoa', '6.6.0' pod 'KeychainAccess' pod 'Swinject' pod 'SwiftOTP', :git => 'https://github.com/lachlanbell/SwiftOTP.git', :branch => 'swift-5.0-cryptoswift' pod "RecaptchaEnterprise", "18.3.0" pod 'RealmSwift', '~>10' pod "RxRealm" pod 'SwiftLint' end target 'bimb-authenticate-iosTests' do inherit! :complete # Pods for testing pod 'RxBlocking', '6.6.0' pod 'RxTest', '6.6.0' end target 'bimb-authenticate-iosUITests' do inherit! :complete # Pods for testing pod 'RxBlocking', '6.6.0' pod 'RxTest', '6.6.0' end # FORCE SET DEPLOYMENT TARGET TO 11.0 SINCE platform :ios, '11.0' DIDN'T SEEM TO DO ANYTHING! post_install do |pi| pi.pods_project.targets.each do |t| t.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0' end end end
Replies
Boosts
Views
Activity
Nov ’23
Reply to Unit test never runs
It's okay now. I've fixed it by changing the simulator from iPhone 12 to iPhone 14. Weird.
Replies
Boosts
Views
Activity
Nov ’23
Reply to Custom view animates from bottom - up at first, but not afterwards.
I've fixed it. It's actually not caused by the code above but one extension for UIView that didn't layout after changing the constraints. Thanks anyway.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Dec ’23
Reply to Push notification is untappable in iPhone X/XS with iOS 16.2
Anybody?
Replies
Boosts
Views
Activity
Mar ’24
Reply to App crashed with NSInvalidUnarchiveOperationException when run from different target and scheme.
I've fixed this by using a custom NSKeyedUnarchiver based on this SO answer: https://stackoverflow.com/a/46832840/4124849. Here's the class: class KeyedUnarchiver: NSKeyedUnarchiver { override open func `class`(forClassName codedName: String) -> Swift.AnyClass? { let legacyModuleString = "cdx_ios." if let range = codedName.range(of: legacyModuleString), range.lowerBound.encodedOffset == 0 { return NSClassFromString(codedName.replacingOccurrences(of: legacyModuleString, with: "")) } return NSClassFromString(codedName) } } So I guess the problem is that my object has nested object so NSKeyedUnarchiver.setClass(_:forClassName:) doesn't work.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jun ’24