Blog

Updates, examples and tips from the inside.

Aeris iOS Weather Framework 1.1.6 Released

by nshipes on Dec 10, 2012

We pushed out a minor update to our Aeris iOS Weather framework today that fixes a few bugs with the interactive map and auto-rotation as well as improving the way the core account initialization is performed when launching your custom app. Refer to the complete 1.1.6 change log for more details as to the fixes and changes included in this release.

Better Initialization at App Launch
With this 1.1.6 update, we've improved the way in which the SDK is initialized at app launch, allowing your app to respond when the SDK has properly initialized with your account settings. This is especially critical if you are using our interactive weather map as the root view that appears once the app has launched and using the built-in AFWeatherMapOptionsViewController to display the map overlay options. This options view only displays map overlays that your active account has access to, so you would want to wait until the SDK had finished loading your account information before trying to display this options view or adding weather-specific overlays to the map. For this, we utilize NSNotificationCenter to broadcast to all observers when the SDK is fully ready with the key kAFEngineReady.

For example, your custom app displays the interactive map with the radar overlay at app launch. But the SDK verifies that your account has access to this overlay before displaying it. So your app would want to wait to display the overlay until the SDK receives your account information and settings by listening for the proper event from NSNotificationCenter:


// CustomViewController.m (subclass of AFWeatherMapViewController)

- (void)viewDidAppear:(BOOL)animated {
	[super viewDidAppear:animated];
	
	if (![[AerisEngine currentEngine] isEngineReady]) {
		[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(initializeMap) name:kAFEngineReady object:nil];
	}
	else {
		[self initializeMap];
	}
}

- (void)initializeMap {
	[self.weatherMap showOverlayForType:AFOverlayTypeRadar];
}

The SDK will cache your account information for an extended amount of time, so they will not need to be loaded every time your app is launched.

posted in Aeris Mobile, General, News, Product

Submit a comment

Commenting is not available in this channel entry.

Comments

  • There are no comments for this entry.

Archive