How to fix error – "No Visible #interface for ARCamera"? - unity3d

I'm trying to build a project that I downloaded from git and I got some errors in the Xcode beta 9.
I noticed that there are some things that are deprecated like ARWorldTrackingSessionConfiguration so I changed them and they were fixed. But I get an error that I can't fix, this is the part from the code:
matrix_float4x4 projectionMatrix = [frame.camera projectionMatrixWithViewportSize: nativeSize
orientation:[[UIApplication sharedApplication] statusBarOrientation]
zNear:(CGFloat)unityCameraNearZ
zFar:(CGFloat)unityCameraFarZ];
I could not fix this and I don't know what to do.
the error for that is this:
No visible #interface for 'ARCamera' declares the selector 'projectionMatrixWithViewportSize:orientation:zNear:zFar
Hope you can help me with this issue?
Thank you.

First of all you should update your XCode from beta to a stable version.
As for
No visible #interface for 'ARCamera' declares the selector 'projectionMatrixWithViewportSize:orientation:zNear:zFar
Here is official Apple documentation about ARCamera class which shows that there is no method projectionMatrixWithViewportSize:orientation:zNear:zFar and it's most possibly was changed to projectionMatrixForOrientation:viewportSize:zNear:zFar:. Signatures of this two methods requires the same parameters, so it won't be problem to replace the old method with a new one.

Related

Flutter ml kit not working , possibly after Catalina update

I'm using Flutters mlkit plugin, which was working about 5 days ago. I'm now getting errors in Xcode. I'm not sure if its from Flutter upgrading. I am in the stable channel and my flutter doctor has no issues. I have run Flutter clean and updated my pods, but still get errors. I have also updated my macs OS to Catalina since then and not sure if this is a contributor.
Some of the issues are:
No visible #interface for 'FIRRemoteModel' declares the selector 'initWithName:allowsModelUpdates:initialConditions:updateConditions:'
No visible #interface for 'FIRModelManager' declares the selector 'registerRemoteModel:'
No visible #interface for 'FIRLocalModel' declares the selector 'initWithName:path:'
No visible #interface for 'FIRModelManager' declares the selector 'registerLocalModel:'
No known class method for selector 'modelInterpreterWithOptions:'

MFMailComposeViewController.h Broken

After successfully implementing the MFMailComposeViewController in my app, run it in the simulator and my iPhone, where it still works fine, it just crashed.
I get 5 MFMailComposeViewController.h issues: Cannot find protocol declaration, Expected identifier or '(', etc,...
My Controller header includes:
MessageUI/MessageUI.h
MessageUI/MFMailComposeViewController.h
and conforms to protocol:
#interface DetallViewController : UIViewController < UIActionSheetDelegate,
MFMailComposeViewControllerDelegate>
I've tried to:
1) remove and add the framework
2) Restart the device and Xcode as suggested in many posts
3) Create a separate controller to handle MFMailComposeViewController
After 3 days with this issue I'm completely stuck on this. As you can imagine, any help would be appreciate.
I would think this is a kind of reference issue since it appears whether the framework is selected or not.
Thanks in advance
Just to anybody it may help, I finally found the issue:
A missing #end in an imported header.
Thanks to everybody for the efforts.

Error when registering for Multiple Remote Notification Types

XCode is driving me nuts, when I register for multiple notification types:
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeSound|UIRemoteNotificationTypeBadge];
or
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeSound|UIRemoteNotificationTypeBadge)];
It throws and error not a warning:
error: Semantic Issue: Cannot initialize a parameter of type 'UIRemoteNotificationType' with an rvalue of type 'int'
Even though this is the same line that everyone uses (even Apple in their demos). I'm using the iOS 5 SDK (first one that came out after release of iOS 5) & XCode 4.2. The project is a older project (XCode 3 & iOS 4) that is being upgraded and targeted for iOS 5.
I had this problem too. The trick is if this code is in a .mm file (Objective C++), this error occurs. If you aren't using any C++ features, change the filename extension from .mm to .m and it will compile OK.
Try casting to UIRemoteNotificationType:
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationType)(UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeSound|UIRemoteNotificationTypeBadge)];
For the record I was never able to solve this problem completely. It is definitely a problem with the developer tools. The line in my UIApplicationDelegate didn't work. I was able to work around this by placing this line in my MainViewController rather than my ApplicationDelegate.
put parentheses around the parameters like
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeSound|UIRemoteNotificationTypeBadge)];

expected expression before '.' token

Can someone tell me why this doesn't work?
-(IBAction) website_btn {
[myAppDelegate viewGallery];
}
Because I am getting this error.
error: expected expression before '.' token
I know it sounds strange. Need someone to throw me a life jacket here.
If you are compiling with GCC in Xcode, try switching to clang, clang is much better at identifying where there error is, GCC will sometime claim an error is at one location when the actually error is much higher up or even in a header file.
The code you have posted has no issues. It may be due to the error in the code above it. If still the code is fine. Then clean all your target and Build again hope this will work. As it works for many of us..
Thanks everyone!!!!
It was an error I had causing this error.
Just remember to extend your class with UIApplicationDelegate.
...
#interface YourClass : UIViewController <UIApplicationDelegate> {
....
Sorry, I am new to iPhone so I know I am not using proper terms here.

How to fix "Cannot find interface declaration for 'NSManagedObject', superclass of"?

Can anyone please help me to solve the following error:
Error cannot find interface declaration for 'NSManagedObject', superclass of
Try
#import <CoreData/CoreData.h>
Are you missing an include statement?
Are you subclassing NSManagedObject? If so, go here in Apple's documentation and scroll to Xcode Generated Subclasses. They give you instructions to have Xcode generate class files from your data model.
A suggestion: Core Data is rather difficult, and you should be comfortable with iPhone development before you start working with it.
import CoreData to your xxx-Bridging-Header.h will make sense.