AeroPlus Flight Plan file exchangeĀ technical specifications
Our AeroPlus FlightPlan iOS app offers the possibility to exchange (export/import) flight plan withĀ other apps installed on the same iOS device or received by email. We are using the ICAO flight plan format described as a basis for our exchangeĀ file.
- Fill your info.plist file with information that will tell iOS that you are capable of handling the .icaofpl format.
- Handle the file itself in your app delegate with just a few lines of code.
<key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeMIMETypes</key> <array> <string>application/icaofpl</string> </array> <key>CFBundleTypeName</key> <string>Icao FPL</string> <key>LSHandlerRank</key> <string>Owner</string> <key>LSItemContentTypes</key> <array> <string>com.icaofpl</string> </array> </dict> </array> <key>UTExportedTypeDeclarations</key> <array> <dict> <key>UTTypeConformsTo</key> <array> <string>public.text</string> </array> <key>UTTypeDescription</key> <string>Icao FPL format</string> <key>UTTypeIdentifier</key> <string>com.icaofpl</string> <key>UTTypeTagSpecification</key> <dict> <key>public.filename-extension</key> <string>icaofpl</string> <key>public.mime-type</key> <string>application/icaofpl</string> </dict> </dict> </array>
2. Please implement in your app delegate the method:
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
This method gets called if your application is already opened in the background. In case the app will start at that very moment, the file URL will be provided in theĀ launchOptionsĀ parameter of your launching method:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
Use theĀ launchOptionsĀ to retrieve the URL of the file being transferred. For example, a simple call to the previous method, like this, would be enough:
[self application:application openURL:[launchOptions valueForKey:UIApplicationLaunchOptionsURLKey] sourceApplication:[launchOptions valueForKey:UIApplicationLaunchOptionsSourceApplicationKey] annotation:nil];
The URL specified is the URL to the file being transferred. To retrieve the content of the file as an NSString just use this line:
NSString *fplMessage = [NSString stringWithContentsOfURL:url encoding:NSUTF8StringEncoding error:nil];
A sample output file for an IFR flight from Rotterdam (EHRD) to Antwerp (EBAW) at an altitude of 2000 feet with one waypoint in the route (WOODY) with a level change to 1000 feet is found below:
(FPL-PHTEST-IG -SR22/L-SBDGRY/S -EHRD1145 -N0165A020 WOODY/N0165A010 -EBAW0035 -PBN/B2C2D2O2S1 NAV/GNSS GBAS DOF/130828 RMK/PIC PHONE 0123 456789 FILED USING AEROPLUS -E/0100 P/1 A/ C/PILOT)
For more details, read the Apple specificationsĀ or contact us.Ā