I was watching WWDC 2014 video A Look Inside Presentation Controllers
I downloaded the source code (written in Objective-C) for the session, try to build it and I got this error:
No visible #interface for UIPresentationController declares the
selector initWithPresentingViewController:presentedViewController.
Is the method suppose to be in the UIPresentationController?
I found the answer from the documentation of UIPresentationController the method is supposed to be
- (instancetype)initWithPresentedViewController (UIViewController *)presentedViewController presentingViewController:(UIViewController*)presentingViewController; not -(instancetype)initWithPresentingViewController:(UIViewController *)presentingViewController presentedViewController:(UIViewController *)presentedViewController.
As soon as I changed that it fixed the problem
No visible #interface for 'GIDSignIn' declares the selector 'signInWithConfiguration:presentingViewController:callback:'
Google SDK is updated there for in v6.2.x version signInWithConfiguration:presentingViewController:callback: is using but in updated version v7.0.0 using signInWithPresentingViewController:completion: — check this blow link - and check what version you are using .
https://developers.google.com/identity/sign-in/ios/quick-migration-guide
Related
I am tinkering with the sample project "SpatialAudio" from Google VR SDK for Unity, to implement it in iOS.
I built it in Unity using the latest GVR SDK, so I had to replace a few deprecated keywords (GvrAudioSource instead of CardboardAudioSource, etc.)
If I build it in Xcode just as Unity gives it to me, it runs fine in the physical device.
Then, I tried to edit the Unity-generated file 'main.mm' to change the default App Controller (UnityAppController) to a new one, let's call it NewAppController.
// main.mm
...
const char* AppControllerClassName = "UnityAppController";
...
//UIApplicationMain(argc, argv, nil, [NSString stringWithUTF8String:AppControllerClassName]); // old
UIApplicationMain(argc, argv, nil, [NSString stringWithUTF8String:"NewAppController"]); // new
NewAppController is a class which inherits from UnityAppController and does not override any of its methods or properties, like this:
#interface NewAppController : UnityAppController
#end
#implementation NewAppController
#end
I thought that it should work exactly the same as before, but now I get the following warning in runtime:
"Audio effect GVR Audio Renderer could not be found. Check that the project contains the correct native audio plugin libraries and that the importer settings are set up correctly."
Everything else works just fine: I can see the video and even hear the sounds, but only they are not 'spatialized'.
I am using:
GVR SDK 1.1,
Unity 5.5.0f3,
iOS 10.1.1
I found the solution. I was missing two important things: First, messing with main.mm causes a lot of trouble. The correct approach for defining a custom App Controller is to create a subclass of UnityAppController and adding the macro IMPL_APP_CONTROLLER_SUBCLASS(name_of_the_class) at the bottom of its .mm file. Second, Unity automatically generates a custom app controller, called CardboardAppController, which is located in the build directory, under 'Libraries/Plugins/iOS'. One of its functions is registering the unity audio effect plugin. I was bypassing this file without knowing, causing the audio renderer to not initialize properly. So my solution was to comment out the macro at the end of the file CardboardAppController.mm (line 71):
//IMPL_APP_CONTROLLER_SUBCLASS(CardboardAppController)
And defining the new custom controller as a subclass of CardboardAppController:
#import "CardboardAppController.h"
#interface NewAppController : CardboardAppController
#end
#implementation NewAppController
#end
IMPL_APP_CONTROLLER_SUBCLASS(NewAppController)
I need to call methods in the custom view in iOS module from titanium project. I have followed the tutorials in Appcelarator documentation about creating iOS module. I could create the custom view in Titanium using below code.
var manage = require('com.test');
var manageView = manage.createView({
left:40,
right:40,
top:40,
height: 250,
backgroundColor:'blue' }); manageView.customMethodInView();
But i got error like "customMethodInView is not a function" when i run the app.
#import "TiViewProxy.h"
#import "CustomView.h"
#interface ComTestViewProxy : TiViewProxy {
CustomView *customView;
}
- (void) customMethodInView;
#end
This is the code in viewProxy class in iOS Module project.
Please help.
I know this is late, but for any wondering soul out there, it is my understanding that even if you don't intend to pass an argument for your method, the signature of the method in the native module should always take one:
your method
- (void) customMethodInView;
should look like this :
- (void)customMethodInView:(id)unused;
My code was fine before, but it tips me :
cannot find protocol declaration for 'CAAnimationDelegate';did you mean 'UIApplicationDelegate'?
when I run it today.
I have tried import QuartzCore/CAAnimation.h but doesn't work.
CAAnimationDelegate is a new protocol that was added in the iOS 10 SDK. That means it is there if you build with Xcode 8, but not there if you build with Xcode 7.
When you build with Xcode 8, you'll get a warning to say:
Assigning to 'id<CAAnimationDelegate> _Nullable' from incompatible type 'WhateverUIViewController *const __strong'
If you add the CAAnimationDelegate, your code won't build in Xcode 7 anymore. If you need to build with both Xcode's, you need to use ifdefs:
#if __IPHONE_OS_VERSION_MAX_ALLOWED < 100000
// CAAnimationDelegate is not available before iOS 10 SDK
#interface WhateverUIViewController ()
#else
#interface WhateverUIViewController () <CAAnimationDelegate>
#endif
CAAnimationDelegate is not a protocol. There is no need to tell your class is going to implement the CAAnimationDelegate.
First you need to import QuartzCore/QuartzCore.h.Then, You just pass your class's (in which you want to implement the animation delegate methods) object as delegate to your CAAnimation object. It will automatically calls animationDidStart while starting the animation and calls animationDidStop method while finishing the animation.
I'm using the wit.ai iOS SDK for the first time and I followed step by step what is written in the getting started page in official website https://wit.ai/docs/ios/3.1.1/quickstart. I got this error:
Method 'witDidGraspIntent:entities:body:error:' in protocol 'WitDelegate' not implemented.
I could still run the app and the message is shown in my inbox (in console) but not response is being sent back and the application crashes. I got this error:
Error when enqueuing buffer from callback
Here is my code
ViewController.m
#import "ViewController.h"
#interface ViewController ()
#end
#implementation ViewController {
UILabel *labelView;
}
- (void)witDidGraspIntent:(NSArray *)outcomes
messageId:(NSString *)messageId
customData:(id)customData
error:(NSError*)e {
//Implementation here...
labelView.text = #"Hey what's up";
[self.view addSubview:labelView];
}
ViewController.h
#import <UIKit/UIKit.h>
#import <Wit/Wit.h>
#interface ViewController : UIViewController <WitDelegate>
#end
Thanks.
Dude, the crash message you are getting is telling you exactly what is wrong.
Method 'witDidGraspIntent:entities:body:error:' in protocol
'WitDelegate' not implemented.
You are missing a method (witDidGraspIntent:entities:body:error:) in your implementation of the protocol. You must implement all the required methods in a protocol. In this case the missing method is witDidGraspIntent:entities:body:error:.
You ask "Should I add a new -void ??" By that, if you mean should you add an implementation of the witDidGraspIntent:entities:body:error: method, the answer is YES!
I haven't used the wit.ai SDK before. You might want to edit your question and ask people who have used that SDK for help in implementing the method if you can't figure out how to do it on your own. You might also want to add "(using wit.ai SDK)" to your question title so people familiar with that framework notice your question.
Im getting the following issue in ios how to clear and run the code successfully.
The issue is:
"No visible #interface for 'ViewController' declares the selector 'performSelector:afterDelay:'".
There is no such function performSelector:afterDelay:.
Looking at the docs the only function that includes "performSelector" and "afterDelay" is...
performSelector:withObject:afterDelay:
and
performSelector:withObject:afterDelay:inModes: