ios - Obj-C - Xcode 控制台中的 TIC 读取状态?

标签 ios objective-c xcode

直到昨天,我的应用程序运行良好。现在,突然之间,出于某种原因,当我启动我的应用程序时,我没有像往常一样连接到我的数据库,而是在我的 Xcode 控制台中多次收到以下错误:

2018-09-28 22:18:55.376987-0700 [2378:1001370] TIC Read Status [2:0x0]: 1:57 2018-09-28 22:18:56.927081-0700 [2378:1001370] TIC Read Status [3:0x0]: 1:57 2018-09-28 22:18:56.927210-0700 [2378:1001370] TIC Read Status [3:0x0]: 1:57

我完全不知道为什么 - 但现在我根本无法登录我的应用程序。知道为什么会这样吗?

NOT a duplicate: The answer to this cannot possibly be "SOLUTION: Just wait for newer versions/updates of Xcode 9." Also, the above error is keeping my app from connecting to the database - others reporting this error have stated that it doesnt affect the performance of their app.

编辑:这是我尝试连接的方式(使用 Drupal iOS SDK)。

UPDATE (OCT 1, 2018): Epic update...as soon as I take DIOSSession out of AppDelegate and put it into my initial ViewController, I'm able to connect as normal again. Anyone know why this is? I'm thrilled...but I imagine there's some sort of repercussion for doing this in ViewController and not in AppDelegate.

AppDelegate.m

#import "AppDelegate.h"
#import "DIOSSession.h"
#import "AFNetworking.h"
#import "DIOSSystem.h"


@interface AppDelegate  ()

@end

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    [DIOSSession setupDios];

   }

ViewController.m

- (void)viewDidLoad {
    [super viewDidLoad];


    if ([[NSUserDefaults standardUserDefaults] boolForKey:@"HasLaunchedOnce"])

    {
      //  NSLog(@"not first launch");

    }

    else

    {


        [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"HasLaunchedOnce"];
        [[NSUserDefaults standardUserDefaults] synchronize];


    }



    NSDictionary *user = (NSDictionary*) [NSKeyedUnarchiver unarchiveObjectWithData:[[NSUserDefaults standardUserDefaults] objectForKey:@"diosSession"]];

    NSString *token = [[NSUserDefaults standardUserDefaults] objectForKey:@"diosToken"];


    if (user && token) {


        [[DIOSSession sharedSession] setUser:user];

        [[DIOSSession sharedSession] setCsrfToken:token];


        UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
        UITabBarController *yourViewController = (UITabBarController *)[storyboard instantiateViewControllerWithIdentifier:@"tabBar"];
        [self.navigationController pushViewController:yourViewController animated:YES];


    } else {

        NSLog(@"No session present");

    }

}

最佳答案

通过将 DIOSSession 移出 AppDelegate 并移入我初始的 ViewController 的 viewDidLoad 方法,我能够重新连接到我的数据库。出于某种原因,iOS 12 似乎不喜欢 AppDelegate 中的 didFinishLaunchingWithOptions ...我放入该方法中的任何内容都不会执行或崩溃我的应用程序。如果你们都有的话,希望对此有所了解。

关于ios - Obj-C - Xcode 控制台中的 TIC 读取状态?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52565371/

相关文章:

xcode - 从启动守护程序启动带有 GUI 的用户应用程序

ios - 在 iPhone 的单个 View Controller 中的一个 UIScrollView 中添加两个表

objective-c - 将 KVO 添加到 UITableViewCell

objective-c - 在 Mac 上创建自定义文件扩展名

iphone - 在 App Store 中验证应用程序 - 初学者

iphone - 在彼此下方添加多个 UILabel,每个标签具有可变行

objective-c - iOS - 核心数据模型与邮件框架冲突?

iPad 和内存问题

ios - 如何从函数内的解析查询生成的函数返回值?

iphone - 如何检测 View 中任意位置的点击?