Note that there are some explanatory texts on larger screens.

plurals
  1. POUndeclare identifier
    primarykey
    data
    text
    <p>I am trying to add libUAirship-1.4.0.a by going to Build Phases > Link Binary With Libraries and locating the library on disk, after doing so i am still getting an error saying use of undeclared identifier: UAirshipTakeOffOptionsLaunchOptionsKey, UAirship, UAPush.</p> <pre><code>@implementation SampleAppDelegate //@synthesize UAirshipTakeOffOptionsLaunchOptionsKey; -(void)dealloc { self.controller = nil; self.window = nil; [super dealloc]; } -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { CustomPushHandler *customHandler = [[CustomPushHandler alloc] init]; [UAPush shared].delegate = customHandler; // Override point for customization after application launch [_window addSubview:_controller.view]; [_window makeKeyAndVisible]; // Override point for customization after application launch [self.window setRootViewController:_controller]; [self.window makeKeyAndVisible]; // Display a UIAlertView warning developers that push notifications do not work in the simulator // You should remove this in your app. [self failIfSimulator]; // This prevents the UA Library from registering with UIApplication by default. This will allow // you to prompt your users at a later time. This gives your app the opportunity to explain the // benefits of push or allows users to turn it on explicitly in a settings screen. // // If you just want everyone to immediately be prompted for push, you can // leave this line out. [UAPush setDefaultPushEnabledValue:NO]; //Create Airship options dictionary and add the required UIApplication launchOptions NSMutableDictionary *takeOffOptions = [NSMutableDictionary dictionary]; [takeOffOptions setValue:launchOptions forKey:[UAirshipTakeOffOptionsLaunchOptionsKey]]; //[takeOffOptions setValue:launchOptions forKey:UAirshipTakeOffOptionsLaunchOptionsKey]; // Set log level for debugging config loading (optional) // It will be set to the value in the loaded config upon takeOff [UAirship setLogLevel:UALogLevelTrace]; // Populate AirshipConfig.plist with your app's info from https://go.urbanairship.com // or set runtime properties here. UAConfig *config = [UAConfig defaultConfig]; // You can then programatically override the plist values: // config.developmentAppKey = @"YourKey"; // etc. // Call takeOff (which creates the UAirship singleton) [UAirship takeOff:config]; // Print out the application configuration for debugging (optional) UA_LDEBUG(@"Config:\n%@", [config description]); // Set the icon badge to zero on startup (optional) [[UAPush shared] resetBadge]; // Set the notification types required for the app (optional). With the default value of push set to no, // UAPush will record the desired remote notification types, but not register for // push notifications as mentioned above. When push is enabled at a later time, the registration // will occur normally. This value defaults to badge, alert and sound, so it's only necessary to // set it if you want to add or remove types. [UAPush shared].notificationTypes = (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert); // Register for remote notfications with the UA Library. With the default value of push set to no, // UAPush will record the desired remote notifcation types, but not register for // push notfications as mentioned above. When push is enabled at a later time, the registration // will occur normally. This call is required. [[UAPush shared] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)]; // Handle any incoming incoming push notifications. // This will invoke `handleBackgroundNotification` on your UAPushNotificationDelegate. [[UAPush shared] handleNotification:[launchOptions valueForKey:UIApplicationLaunchOptionsRemoteNotificationKey] applicationState:application.applicationState]; return YES; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload