In my appDelegate.m I'm running this:
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
NSLog(@"url recieved: %@", url);
NSLog(@"query string: %@", [url query]);
NSLog(@"host: %@", [url host]);
NSLog(@"url path: %@", [url path]);
NSDictionary *dict = [self parseQueryString:[url query]];
NSLog(@"query dict: %@", dict);
if([[url host] isEqual: @"success"]){
RegistrationController *rc = [RegistrationController alloc];
[rc regSuccess];
}
else if([[url host] isEqual: @"fail"]){
RegistrationController *rc = [RegistrationController alloc];
[rc regFailed];
}
return YES;
}
In my registrationcontroller.m I have this
-(void)regSuccess{
NSLog(@"REGSUCCESS!!!:D");
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
WaitController *rc = [storyboard instantiateViewControllerWithIdentifier:@"waitcontroller"];
[self.navigationController pushViewController:rc animated:NO];
}
-(void)regFailed{
NSLog(@"REGFAILED!!!:(");
[UIView animateWithDuration:1.0 animations:^{
_wheel.alpha = 0.0;
}];
}
When I connect to my url scheme on my phone, I get redirected to the app, and the console does print out REGSUCCESS!!!:D so I know that the method inside of registrationcontroller.m was called. The problem that I'm having, is that the wait controller is not pushed, or any other manipulation of objects from within the regSuccess method is working. Been searching a fix for this for hours with no luck :(. Please Help.
Notes: I have already implemented the regSuccess and regFailed methods inside the registrationcontroller.h
Thanks!