FREELessons: 10Length: 37 minutes

• Overview
• Transcript

# 2.3 iOS Preferences

In this lesson, I'll discuss the iOS-specific preferences in the config.xml file.

## 4.Conclusion1 lesson, 00:40

### 2.3 iOS Preferences

Hello everyone, this is Reggie Dawson. Welcome to the Publish an App with cordova Course for Tuts+. Now granted, I am not building an iOS app locally since I am on an PC, but I will still show you the device specific preferences of iOS devices. First, EnableViewportScale allows a view port metatag in your index.html file to disable the ability of a user to scale the view. And if we look in our index.html, you will see that metatag that says use-scalable=no. This is set to false by default. Then we have MediaPlaybackRequiresUserAction, which disables video or audio from automatically playing. The default is false. Then the AllowInlineMediaPlayback preference specifies that the HTML5 media will playback inline using browser controls versus native controls. For this to work, we need to add webkit-playsinline to any video element. This defaults to false. Then the BackupWebStorage preference will allow you to configure your web storage backups. The default is cloud, which will backup through iCloud. If we set it to local it will allow backups to iTunes Sync. If we set it to none, there will be no web storage backups. The TopActivityIndicator preference controls the appearance of the icon in the status bar that indicates activity. Possible values of white-large, white, and the default grey. Then the KeyboardDisplayRequiresUserAction set to false, allows the keyboard to display when focused on foreign inputs. This defaults to true. Then we have the SuppressedIncrementalRendering preference, which if set to true will wait until all content has been received before displaying on-screen. This defaults to false. Now these next four options work together, but I'm going to explain them individually. First, we have the GapBetweenPages preference, which controls the GapBetween endpoints, which defaults to 0. Then we have the PageLength preference, which specifies the page size in points. Depending on the PaginationMode, which we will get to in a second, this can specify the width or height of the page. Right to left or left to right pagination will set the width of the page. Top to bottom or bottom to top pagination will set the height of the page. The default value of 0 will use the size of the viewport to set the size of the page. Next, PaginaitonBreakingMode determines how column or page breaking happens. It determines whether CSS properties for column breaking are used in place of page breaking. The default is page and the other option is column. And then the PaginationMode preference determines how your content is broken up into pages or one long scrolling view. The options are unpaginated, which is the default, left to right, right to left, top to bottom, or bottom to top. If set to a paginated style, this will also make use of the page length and the GapBetweenPages preference. Then we have the UIWebViewDecelerationSpeed, which controls the speed of momentum scrolling. The default is normal, or you can use fast. And then finally, we have the ErrorURL preference, which will display the specified local page when an error encountered. Again, I know this was a lot of information, but in building your apps, it might be useful to refer to this video to give you an idea of what you can configure for your app. In the next video we will actually build our app and get it ready for the app stores.

Back to the top