我有CustomClass:UIApplication
在main.m
中 with t as (
select MainRentAccountReference,EffectiveFromDate,CollectionDay,NumberOfCollections,DirectDebitTotalOverrideAmount
from DirectDebitApportionment
where id = 1
),
cte as (
select 1 as collection
,t.MainRentAccountReference
,convert(decimal(18,2),DirectDebitTotalOverrideAmount / NumberOfCollections) as collection_amount
,NumberOfCollections
,convert(datetime,DATEFROMPARTS ( DATEPART(YEAR,EffectiveFromDate), DATEPART(MONTH,EffectiveFromDate), CollectionDay )) AS EffectiveFromDate
,CollectionDay
from t
union all
select collection + 1,MainRentAccountReference,collection_amount,NumberOfCollections,DATEADD(M,1,EffectiveFromDate),CollectionDay
from cte
where collection < cte.NumberOfCollections
)
select *
from cte
Order by MainRentAccountReference,collection
;
当我在iOS 11.2.2中启动时,没关系。如果我在iOS 11.3 beta应用程序中启动崩溃,理由是:
retVal = UIApplicationMain(argc, argv, NSStringFromClass([CustomClass class]), NSStringFromClass([AppDelegate class]));
+[CustomClass registerAsSystemApp]: unrecognized selector sent to class 0x1b4ff8648
我不明白为什么?
UPD 在模拟器iOS 11.3工作得很好...但从设备我崩溃
UPD2 CustomClass
·H
Call stack: (
0 CoreFoundation 0x00000001836bc250 <redacted> + 252
1 libobjc.A.dylib 0x00000001828845ec objc_exception_throw + 56
2 CoreFoundation 0x00000001836c9488 <redacted> + 0
3 CoreFoundation 0x00000001836c1a74 <redacted> + 1380
4 CoreFoundation 0x00000001835a7b0c _CF_forwarding_prep_0 + 92
5 UIKit 0x000000018dbcb744 <redacted> + 852
6 UIKit 0x000000018d9cc1e8 UIApplicationMain + 184
7 company.product 0x0000000100ceb264 main + 176
8 libdyld.dylib 0x0000000183021fc0 <redacted> + 4
) libc++abi.dylib: terminate_handler unexpectedly threw an exception
的.m
@interface CustomClass : UIApplication {
TCBIdleService *_idleService;
LocationManager *_locationManager;
TCBUserSession *_userSession;
}
+ (CustomClass *)sharedApp;
+ (NSString *)pushNotificationTokenKey;
- (void)loginWithUserInfo:(UserInfoMto *)userInfo;
- (void)logout;
- (void)registerPushNotifications;
答案 0 :(得分:0)
问题是我的项目中的类被命名为MBApp
(这是CustomClass),事实证明这个名称与已经拥有此类的MobileBackup.framework
的类相交。因此,方法registerAsSystemApp
是从MobileBackup.framework
调用的,当然在那里找不到它。也就是说,我的解决方案是更改MBApp
类的名称。唯一的难题是它之前没有发生过的原因,因为带有类的库存在iOS 5.感谢所有的帮助和抱歉,我没有写出原始的类名,因为这是一个重要的信息。