IMessageExt application Error starting application

I created my iMessage extension, when I try to open it, the first screen appears, but it is completely frozen and it does not react in any way.

I put the logs in viewDidLoad of this first view and nothing appears there, after a few seconds I already see these logs.

To make the application freeze lose this status, the user needs to shift the screen left or right and back.

I tried looking all over the Internet to those who seemed to be the same, but I couldn't find anything.

No more screenshots or code snippets occurred to me, if you think I should provide more information, just let me know

Any help would be appreciated.

Thanks.

UPDATE:

This is my project structure.

enter image description here

This is my viewDidLoad code.

 - (void)viewDidLoad { [super viewDidLoad]; NSLog(@"here viewDidLoad iMessage ext~~~!"); [self applyCornerRadiusToBtn]; [self registerPresentationAction]; NSDictionary *user = [self getUserInfoFromHostApp]; if (user) { NSLog(@"Here != null user info"); //It is assumed that when you enter this point and run this log, the app should navigate to the next screen, but it does not. [self performSegueWithIdentifier:@"goToYoutubeListIm" sender:nil]; } else { NSLog(@"Here userInfo null"); } } - (NSDictionary *)getUserInfoFromHostApp { NSUserDefaults *myDefaults = [[NSUserDefaults alloc] initWithSuiteName:@"group.com.xxxxx"]; NSDictionary *userNameSaved = [myDefaults objectForKey:@"userInfoExt"];; NSLog(@"userNameSaved in xxxx Ext ==> %@",userNameSaved); NSURL *groupURL = [[NSFileManager defaultManager] containerURLForSecurityApplicationGroupIdentifier:@"group.com.xxxx"]; NSLog(@"groupURL ==> %@",groupURL); return userNameSaved; } 
+6
source share
1 answer

For everyone concerned, I found the problem or problems accurate.

1) I created my controllers like MSMessagesAppViewController . Apparently, there should be only one controller of this type.

2) I had logic in viewDidAppear in my MSMessagesAppViewController . For some strange reason, it also caused a problem, I had to get the logic and force the user to interact with the button to execute the logic that was in the didAppear file

0
source

Source: https://habr.com/ru/post/1014860/


All Articles