Quantcast
Channel: Questions in topic: "xcode"
Viewing all articles
Browse latest Browse all 1047

Unable to compile in XCode: Expected identifier or '('

$
0
0
Hello, when trying to compile my XCode project, I receive an error stating "Expected identifier or '(' ". This error occurs in the AppDelegateListener.h file, which is a Unity supplied file. This error occurs for each of the following lines... extern "C" __attribute__((visibility ("default"))) NSString* const kUnityDidRegisterForRemoteNotificationsWithDeviceToken; extern "C" __attribute__((visibility ("default"))) NSString* const kUnityDidFailToRegisterForRemoteNotificationsWithError; extern "C" __attribute__((visibility ("default"))) NSString* const kUnityDidReceiveRemoteNotification; extern "C" __attribute__((visibility ("default"))) NSString* const kUnityDidReceiveLocalNotification; extern "C" __attribute__((visibility ("default"))) NSString* const kUnityOnOpenURL; What's stranger is that an empty Unity project with an identical AppDelegateListener.h file compiles without issue. Possibly worth noting, I'm using CocoaPods, specifically the Google-Mobile-Ads-SDK pod. This means that instead of opening the actual XCode project, I open a workspace created by CocoaPods. As far as I can tell, my real project and the empty project that compiles are configured the same in XCode. Therefore, I'm at a loss why the error is occurring. I'm using Unity 5.3.6f1 and XCode 8.0 Thanks in advance for any help you can provide. Edit: Here's the entire contents of AppDelegateListener.h as the specific error often relates to earlier code (tho I don't think that's the issue in this case)... #pragma once #include "LifeCycleListener.h" @protocol AppDelegateListener @optional // these do not have apple defined notifications, so we use our own notifications // notification will be posted from // - (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken // notification user data is deviceToken - (void)didRegisterForRemoteNotificationsWithDeviceToken:(NSNotification*)notification; // notification will be posted from // - (void)application:(UIApplication*)application didFailToRegisterForRemoteNotificationsWithError:(NSError*)error // notification user data is error - (void)didFailToRegisterForRemoteNotificationsWithError:(NSNotification*)notification; // notification will be posted from // - (void)application:(UIApplication*)application didReceiveRemoteNotification:(NSDictionary*)userInfo // notification user data is userInfo - (void)didReceiveRemoteNotification:(NSNotification*)notification; // notification will be posted from // - (void)application:(UIApplication*)application didReceiveLocalNotification:(UILocalNotification*)notification // notification user data is notification - (void)didReceiveLocalNotification:(NSNotification*)notification; // notification will be posted from // - (BOOL)application:(UIApplication*)application openURL:(NSURL*)url sourceApplication:(NSString*)sourceApplication annotation:(id)annotation // notification user data is the NSDictionary containing all the params - (void)onOpenURL:(NSNotification*)notification; // these are just hooks to existing notifications - (void)applicationDidReceiveMemoryWarning:(NSNotification*)notification; - (void)applicationSignificantTimeChange:(NSNotification*)notification; - (void)applicationWillChangeStatusBarFrame:(NSNotification*)notification; - (void)applicationWillChangeStatusBarOrientation:(NSNotification*)notification; @end void UnityRegisterAppDelegateListener(id obj); void UnityUnregisterAppDelegateListener(id obj); extern "C" __attribute__((visibility ("default"))) NSString* const kUnityDidRegisterForRemoteNotificationsWithDeviceToken; extern "C" __attribute__((visibility ("default"))) NSString* const kUnityDidFailToRegisterForRemoteNotificationsWithError; extern "C" __attribute__((visibility ("default"))) NSString* const kUnityDidReceiveRemoteNotification; extern "C" __attribute__((visibility ("default"))) NSString* const kUnityDidReceiveLocalNotification; extern "C" __attribute__((visibility ("default"))) NSString* const kUnityOnOpenURL;

Viewing all articles
Browse latest Browse all 1047

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>