Cleanup and Rebuild schemes and it frameworks name & Update metadata with 7.7.5

This commit is contained in:
iziz 2016-11-27 00:14:04 +09:00
parent 34fb4fe743
commit 7572eb5b43
48 changed files with 4872 additions and 4865 deletions

View File

@ -0,0 +1,17 @@
//
// AppDelegate.h
// MetadataGenerator
//
// Created by zen.isis on 26/11/2016.
// Copyright © 2016 ohtalk.me. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end

View File

@ -1,37 +1,41 @@
//
// SampleAppDelegate.m
// libPhoneNumber
// AppDelegate.m
// MetadataGenerator
//
// Created by zen.isis on 26/11/2016.
// Copyright © 2016 ohtalk.me. All rights reserved.
//
#import "SampleAppDelegate.h"
#import "AppDelegate.h"
#import "NBPhoneMetaDataGenerator.h"
@import libPhoneNumber;
@import libPhoneNumberiOS;
@implementation SampleAppDelegate
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor blackColor];
[self.window makeKeyAndVisible];
[self.window setRootViewController:[[UIViewController alloc] init]];
// Generate metadata (do not use in release)
NBPhoneMetaDataGenerator *generator = [[NBPhoneMetaDataGenerator alloc] init];
[generator generateMetadataClasses];
[self testWithRealData];
//[self testWithGCD];
//[self testForGetSupportedRegions];
return YES;
}
- (void)testForGetSupportedRegions
{
NBPhoneNumberUtil *phoneUtil = [[NBPhoneNumberUtil alloc] init];
@ -42,7 +46,7 @@
- (void)testWithRealData
{
NBAsYouTypeFormatter *formatter = [[NBAsYouTypeFormatter alloc] initWithRegionCode:@"US"];
NSLog(@"%@ (%@)", [formatter inputDigit:@"2"], formatter.isSuccessfulFormatting ? @"Y":@"N");
NSLog(@"%@ (%@)", [formatter inputDigit:@"1"], formatter.isSuccessfulFormatting ? @"Y":@"N");
NSLog(@"%@ (%@)", [formatter inputDigit:@"2"], formatter.isSuccessfulFormatting ? @"Y":@"N");
@ -54,7 +58,7 @@
NSLog(@"%@ (%@)", [formatter inputDigit:@"5"], formatter.isSuccessfulFormatting ? @"Y":@"N");
NSLog(@"%@ (%@)", [formatter inputDigit:@"5"], formatter.isSuccessfulFormatting ? @"Y":@"N");
NSLog(@"%@ (%@)", [formatter inputDigit:@"5"], formatter.isSuccessfulFormatting ? @"Y":@"N");
NBAsYouTypeFormatter *f = [[NBAsYouTypeFormatter alloc] initWithRegionCode:@"US"];
NSLog(@"%@", [f inputDigit:@"6"]); // "6"
NSLog(@"%@", [f inputDigit:@"5"]); // "65"
@ -62,7 +66,7 @@
NSLog(@"%@", [f inputDigit:@"2"]); // "650 2"
NSLog(@"%@", [f inputDigit:@"5"]); // "650 25"
NSLog(@"%@", [f inputDigit:@"3"]); // "650 253"
// Note this is how a US local number (without area code) should be formatted.
NSLog(@"%@", [f inputDigit:@"2"]); // "650 2532"
NSLog(@"%@", [f inputDigit:@"2"]); // "650 253 22"
@ -70,13 +74,13 @@
NSLog(@"%@", [f inputDigit:@"2"]); // "650 253 2222"
// Can remove last digit
NSLog(@"%@", [f removeLastDigit]); // "650 253 222"
NSLog(@"%@", [f inputString:@"16502532222"]); // 1 650 253 2222
// Unit test for isValidNumber is failing some valid numbers. #7
NBPhoneNumberUtil *phoneUtil = [[NBPhoneNumberUtil alloc] init];
{
NSError *error = nil;
NBPhoneNumber *phoneNumberUS = [phoneUtil parse:@"(366) 522-8999" defaultRegion:@"US" error:&error];
@ -87,9 +91,9 @@
NSLog(@"- isPossibleNumber [%@]", [phoneUtil isPossibleNumber:phoneNumberUS error:&error] ? @"YES" : @"NO");
NSLog(@"- getRegionCodeForNumber [%@]", [phoneUtil getRegionCodeForNumber:phoneNumberUS]);
}
NSLog(@"- - - - -");
{
NSError *error = nil;
NBPhoneNumber *phoneNumberZZ = [phoneUtil parse:@"+84 74 883313" defaultRegion:NB_UNKNOWN_REGION error:&error];
@ -100,9 +104,9 @@
NSLog(@"- isPossibleNumber [%@]", [phoneUtil isPossibleNumber:phoneNumberZZ error:&error] ? @"YES" : @"NO");
NSLog(@"- getRegionCodeForNumber [%@]", [phoneUtil getRegionCodeForNumber:phoneNumberZZ]);
}
NSLog(@"- - - - - GB / +923406171134");
// I can't validate pakistani numbers #58
{
NSError *error = nil;
@ -114,21 +118,21 @@
NSLog(@"- isPossibleNumber [%@]", [phoneUtil isPossibleNumber:phoneNumberUS error:&error] ? @"YES" : @"NO");
NSLog(@"- getRegionCodeForNumber [%@]", [phoneUtil getRegionCodeForNumber:phoneNumberUS]);
}
// finnish phone number don't get recognised #59
{
NSString *nationalNumber = @"";
NSNumber *countryCode = [phoneUtil extractCountryCode:@"+358401493292" nationalNumber:&nationalNumber];
NSLog(@"- %@ %@", countryCode, nationalNumber);
NBPhoneNumber *phonePN = [phoneUtil parse:@"+358401493292" defaultRegion:@"FIN" error:nil];
NSLog(@"- %@", [phoneUtil format:phonePN numberFormat:NBEPhoneNumberFormatINTERNATIONAL error:nil]);
}
NSLog(@"-------------- customTest");
NSError *anError = nil;
NBPhoneNumber *myNumber = [phoneUtil parse:@"+8617196622520," defaultRegion:nil error:&anError];
if (anError == nil)
{
@ -142,12 +146,12 @@
{
NSLog(@"Error : %@", [anError localizedDescription]);
}
NSLog (@"extractCountryCode [%ld]", (unsigned long)[phoneUtil extractCountryCode:@"823213123123" nationalNumber:nil]);
NSString *res = nil;
NSNumber *dRes = [phoneUtil extractCountryCode:@"823213123123" nationalNumber:&res];
NSLog (@"extractCountryCode [%@] [%@]", dRes, res);
NBAsYouTypeFormatter *fr = [[NBAsYouTypeFormatter alloc] initWithRegionCode:@"FR"];
NSLog(@"%@", [fr inputDigit:@"6"]);
NSLog(@"%@", [fr inputDigit:@"7"]);
@ -155,12 +159,12 @@
NSLog(@"%@", [fr inputDigit:@"9"]);
NSLog(@"%@", [fr inputDigit:@"0"]);
NSLog(@"%@", [fr inputDigit:@"1"]);
// Note this is how a US local number (without area code) should be formatted.
NSLog(@"%@", [fr inputDigit:@"2"]);
NSLog(@"%@", [fr inputDigit:@"3"]);
NSLog(@"%@", [fr inputDigit:@"4"]);
NSLog(@"%@", [fr inputString:@"0678901234"]); // 6 78 90 12 34 // it Should be like this
// JP Test
@ -176,11 +180,11 @@
{
NSString *numbers = @"0123456789";
NSMutableString *randomString = [NSMutableString stringWithCapacity:11];
for (int i=0; i<12; i++) {
[randomString appendFormat: @"%C", [numbers characterAtIndex: arc4random() % [numbers length]]];
}
return randomString;
}
@ -195,7 +199,7 @@
return region;
}
}
return nil;
}
@ -204,29 +208,29 @@
{
NBPhoneNumberUtil *aUtil = [[NBPhoneNumberUtil alloc] init];
NSString *testRegion = [self randomRegion];
if (!testRegion) {
return;
}
NSLog(@"- START [%@]", testRegion);
dispatch_async(dispatch_get_main_queue(), ^{
NSError *error = nil;
for (int i=0; i<10000; i++) {
NBPhoneNumber *phoneNumber = [aUtil parse:[self stringWithRandomNumber] defaultRegion:testRegion error:&error];
if (error && ![error.domain isEqualToString:@"INVALID_COUNTRY_CODE"]) {
NSLog(@"error [%@]", [error localizedDescription]);
}
if (!error) {
error = nil;
[aUtil format:phoneNumber numberFormat:NBEPhoneNumberFormatINTERNATIONAL error:&error];
}
error = nil;
}
NSLog(@"OK [%@]", testRegion);
});
}
@ -245,7 +249,7 @@
- (void)testForExtraDatas
{
NBMetadataHelper *helper = [[NBMetadataHelper alloc] init];
NSArray *arrayData = [helper getAllMetadata];
if (arrayData && arrayData.count > 0) {
NSLog(@"Log sample metadata [%@]", [arrayData firstObject]);
@ -274,26 +278,26 @@
- (void)testAustriaNationalNumberParsing
{
NBPhoneNumberUtil *phoneUtil = [[NBPhoneNumberUtil alloc] init];
NSError *anError = nil;
NSString *internationalNumberForInput = @"436606545646";
NSString *nationalNumberForExpect = @"6606545646";
NSString *defaultRegion = @"AT";
NBPhoneNumber *phoneNumber = [phoneUtil parse:internationalNumberForInput defaultRegion:defaultRegion error:&anError];
NSString *nationalNumberForActual = [NSString stringWithFormat:@"%@", phoneNumber.nationalNumber];
// ALWAYS FAIL need fix "google libPhoneNumber"
NSLog(nationalNumberForExpect, nationalNumberForActual);
}
- (void)testForiOS7
{
NBPhoneNumberUtil *phoneUtil = [[NBPhoneNumberUtil alloc] init];
NSError *anError = nil;
NBPhoneNumber *myNumber = [phoneUtil parse:@"0174 2340XXX" defaultRegion:@"DE" error:&anError];
if (anError == nil) {
@ -308,34 +312,29 @@
}
- (void)applicationWillResignActive:(UIApplication *)application
{
- (void)applicationWillResignActive:(UIApplication *)application {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}
- (void)applicationDidEnterBackground:(UIApplication *)application
{
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
- (void)applicationDidEnterBackground:(UIApplication *)application {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
- (void)applicationWillEnterForeground:(UIApplication *)application
{
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
- (void)applicationWillEnterForeground:(UIApplication *)application {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}
- (void)applicationDidBecomeActive:(UIApplication *)application
{
- (void)applicationDidBecomeActive:(UIApplication *)application {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
- (void)applicationWillTerminate:(UIApplication *)application
{
- (void)applicationWillTerminate:(UIApplication *)application {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

View File

@ -29,36 +29,6 @@
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
}
],
"info" : {

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11134" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11134" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>

View File

@ -4,26 +4,26 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
@ -33,14 +33,6 @@
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>

View File

@ -0,0 +1,15 @@
//
// ViewController.h
// MetadataGenerator
//
// Created by zen.isis on 26/11/2016.
// Copyright © 2016 ohtalk.me. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end

View File

@ -0,0 +1,29 @@
//
// ViewController.m
// MetadataGenerator
//
// Created by zen.isis on 26/11/2016.
// Copyright © 2016 ohtalk.me. All rights reserved.
//
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end

16
MetadataGenerator/main.m Normal file
View File

@ -0,0 +1,16 @@
//
// main.m
// MetadataGenerator
//
// Created by zen.isis on 26/11/2016.
// Copyright © 2016 ohtalk.me. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}

View File

@ -1,7 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8150" systemVersion="15A204g" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11542" systemVersion="16B2555" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8122"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
@ -13,10 +18,9 @@
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>

View File

@ -1,21 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11542" systemVersion="16B2555" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="libPhoneNumberSampleSwift" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>

View File

@ -4,8 +4,14 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>libPhoneNumberSampleSwift</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIcons</key>
<dict/>
<key>CFBundleIcons~ipad</key>
<dict/>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
@ -19,7 +25,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
@ -36,12 +42,5 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>

View File

@ -7,7 +7,7 @@
//
import UIKit
import libPhoneNumber
import libPhoneNumberiOS
class ViewController: UIViewController {

View File

@ -4,6 +4,8 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>libPhoneNumberiOS</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
@ -19,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>

View File

@ -6,14 +6,14 @@
// Copyright © 2015 ohtalk.me. All rights reserved.
//
import libPhoneNumber
import libPhoneNumberiOS
open class NBTextField: UITextField
{
// MARK: Options/Variables for phone number formatting
var phoneNumberUtility: NBPhoneNumberUtil = NBPhoneNumberUtil()
let phoneNumberUtility: NBPhoneNumberUtil = NBPhoneNumberUtil()
var phoneNumberFormatter: NBAsYouTypeFormatter?
var shouldCheckValidationForInputText: Bool = true
@ -62,7 +62,7 @@ open class NBTextField: UITextField
}
func numberTextDidChange() {
let numbersOnly = phoneNumberUtility.normalizePhoneNumber(text)
let numbersOnly = phoneNumberUtility.normalize(text)
text = phoneNumberFormatter!.inputStringAndRememberPosition(numbersOnly)
if phoneNumberFormatter!.isSuccessfulFormatting == false && shouldCheckValidationForInputText {

View File

@ -4,6 +4,8 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>libPhoneNumbertvOS</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>

View File

@ -1,6 +1,6 @@
//
// libPhoneNumber-tvOS.h
// libPhoneNumber-tvOS
// libPhoneNumbertvOS.h
// libPhoneNumbertvOS
//
// Created by Jeff Kelley on 11/16/16.
// Copyright © 2016 ohtalk.me. All rights reserved.

View File

@ -4,6 +4,8 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>libPhoneNumberwatchOS</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
@ -17,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0710"
LastUpgradeVersion = "0810"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@ -14,9 +14,9 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FD7A061B167715A0004BBEB6"
BuildableName = "libPhoneNumberSampleObjectiveC.app"
BlueprintName = "libPhoneNumberSampleObjectiveC"
BlueprintIdentifier = "34ACBB841B7122AC0064B3BD"
BuildableName = "libPhoneNumberiOS.framework"
BlueprintName = "libPhoneNumberiOS"
ReferencedContainer = "container:libPhoneNumber.xcodeproj">
</BuildableReference>
</BuildActionEntry>
@ -28,23 +28,13 @@
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FD7A063C167715A1004BBEB6"
BuildableName = "libPhoneNumberTests.xctest"
BlueprintName = "libPhoneNumberTests"
ReferencedContainer = "container:libPhoneNumber.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FD7A061B167715A0004BBEB6"
BuildableName = "libPhoneNumberSampleObjectiveC.app"
BlueprintName = "libPhoneNumberSampleObjectiveC"
BlueprintIdentifier = "34ACBB841B7122AC0064B3BD"
BuildableName = "libPhoneNumberiOS.framework"
BlueprintName = "libPhoneNumberiOS"
ReferencedContainer = "container:libPhoneNumber.xcodeproj">
</BuildableReference>
</MacroExpansion>
@ -61,16 +51,15 @@
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FD7A061B167715A0004BBEB6"
BuildableName = "libPhoneNumberSampleObjectiveC.app"
BlueprintName = "libPhoneNumberSampleObjectiveC"
BlueprintIdentifier = "34ACBB841B7122AC0064B3BD"
BuildableName = "libPhoneNumberiOS.framework"
BlueprintName = "libPhoneNumberiOS"
ReferencedContainer = "container:libPhoneNumber.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
@ -80,16 +69,15 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FD7A061B167715A0004BBEB6"
BuildableName = "libPhoneNumberSampleObjectiveC.app"
BlueprintName = "libPhoneNumberSampleObjectiveC"
BlueprintIdentifier = "34ACBB841B7122AC0064B3BD"
BuildableName = "libPhoneNumberiOS.framework"
BlueprintName = "libPhoneNumberiOS"
ReferencedContainer = "container:libPhoneNumber.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0710"
LastUpgradeVersion = "0810"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@ -14,9 +14,9 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "34ACBB841B7122AC0064B3BD"
BuildableName = "libPhoneNumber.framework"
BlueprintName = "libPhoneNumber-iOS"
BlueprintIdentifier = "1F31D54C1DDD47B900257818"
BuildableName = "libPhoneNumbertvOS.framework"
BlueprintName = "libPhoneNumbertvOS"
ReferencedContainer = "container:libPhoneNumber.xcodeproj">
</BuildableReference>
</BuildActionEntry>
@ -45,9 +45,9 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "34ACBB841B7122AC0064B3BD"
BuildableName = "libPhoneNumber.framework"
BlueprintName = "libPhoneNumber-iOS"
BlueprintIdentifier = "1F31D54C1DDD47B900257818"
BuildableName = "libPhoneNumbertvOS.framework"
BlueprintName = "libPhoneNumbertvOS"
ReferencedContainer = "container:libPhoneNumber.xcodeproj">
</BuildableReference>
</MacroExpansion>
@ -63,9 +63,9 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "34ACBB841B7122AC0064B3BD"
BuildableName = "libPhoneNumber.framework"
BlueprintName = "libPhoneNumber-iOS"
BlueprintIdentifier = "1F31D54C1DDD47B900257818"
BuildableName = "libPhoneNumbertvOS.framework"
BlueprintName = "libPhoneNumbertvOS"
ReferencedContainer = "container:libPhoneNumber.xcodeproj">
</BuildableReference>
</MacroExpansion>

View File

@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0810"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1F31D5291DDD46B100257818"
BuildableName = "libPhoneNumberwatchOS.framework"
BlueprintName = "libPhoneNumberwatchOS"
ReferencedContainer = "container:libPhoneNumber.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1F31D5291DDD46B100257818"
BuildableName = "libPhoneNumberwatchOS.framework"
BlueprintName = "libPhoneNumberwatchOS"
ReferencedContainer = "container:libPhoneNumber.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1F31D5291DDD46B100257818"
BuildableName = "libPhoneNumberwatchOS.framework"
BlueprintName = "libPhoneNumberwatchOS"
ReferencedContainer = "container:libPhoneNumber.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

@ -273,7 +273,7 @@
/**
* Constructs an AsYouTypeFormatter for the specific region.
*
* @param {string} regionCode the ISO 3166-1 two-letter region code that denotes
* - param regionCode regionCode the ISO 3166-1 two-letter region code that denotes
* the region where the phone number is being entered.
* @constructor
*/
@ -339,7 +339,7 @@
* The metadata needed by this class is the same for all regions sharing the
* same country calling code. Therefore, we return the metadata for "main"
* region for this country calling code.
* @param {string} regionCode an ISO 3166-1 two-letter region code.
* - param regionCode regionCode an ISO 3166-1 two-letter region code.
* @return {i18n.phonenumbers.PhoneMetadata} main metadata for this region.
* @private
*/
@ -409,7 +409,7 @@
/**
* @param {string} leadingThreeDigits first three digits of entered number.
* - param leadingDigits leadingThreeDigits first three digits of entered number.
* @private
*/
- (void)getAvailableFormats_:(NSString*)leadingDigits
@ -442,7 +442,7 @@
/**
* @param {string} format
* - param format format
* @return {BOOL}
* @private
*/
@ -458,7 +458,7 @@
/**
* @param {string} leadingDigits
* - param leadingDigits leadingDigits
* @private
*/
- (void)narrowDownPossibleFormats_:(NSString *)leadingDigits
@ -496,7 +496,7 @@
/**
* @param {i18n.phonenumbers.NumberFormat} format
* - param {i18n.phonenumbers.NumberFormat} format
* @return {BOOL}
* @private
*/
@ -537,8 +537,8 @@
* Gets a formatting template which can be used to efficiently format a
* partial number where digits are added one by one.
*
* @param {string} numberPattern
* @param {string} numberFormat
* - param {string} numberPattern
* - param {string} numberFormat
* @return {string}
* @private
*/
@ -667,7 +667,7 @@
/**
* Formats a phone number on-the-fly as each digit is entered.
*
* @param {string} nextChar the most recently entered digit of a phone number.
* - param {string} nextChar the most recently entered digit of a phone number.
* Formatting characters are allowed, but as soon as they are encountered
* this method formats the number as entered and not 'as you type' anymore.
* Full width digits and Arabic-indic digits are allowed, and will be shown
@ -691,7 +691,7 @@
* adjusted if additional formatting characters are later inserted/removed in
* front of {@code nextChar}.
*
* @param {string} nextChar
* - param {string} nextChar
* @return {string}
*/
- (NSString*)inputDigitAndRememberPosition:(NSString*)nextChar
@ -705,8 +705,8 @@
/**
* @param {string} nextChar
* @param {BOOL} rememberPosition
* - param {string} nextChar
* - param {BOOL} rememberPosition
* @return {string}
* @private
*/
@ -879,7 +879,7 @@
/**
* @param {string} nextChar
* - param {string} nextChar
* @return {BOOL}
* @private
*/
@ -943,7 +943,7 @@
* Combines the national number with any prefix (IDD/+ and country code or
* national prefix) that was collected. A space will be inserted between them if
* the current formatting template indicates this to be suitable.
* @param {string} nationalNumber The number to be appended.
* - param {string} nationalNumber The number to be appended.
* @return {string} The combined number.
* @private
*/
@ -1209,8 +1209,8 @@
* in non-ASCII format. This method assumes its input is either a digit or the
* plus sign.
*
* @param {string} nextChar
* @param {BOOL} rememberPosition
* - param {string} nextChar
* - param {BOOL} rememberPosition
* @return {string}
* @private
*/
@ -1239,7 +1239,7 @@
/**
* @param {string} nextChar
* - param {string} nextChar
* @return {string}
* @private
*/

File diff suppressed because it is too large Load Diff

View File

@ -12,18 +12,21 @@
@interface NBPhoneMetadataTestAU : NBPhoneMetaData
@end
@interface NBPhoneMetadataTestBB : NBPhoneMetaData
@interface NBPhoneMetadataTestAM : NBPhoneMetaData
@end
@interface NBPhoneMetadataTestAE : NBPhoneMetaData
@end
@interface NBPhoneMetadataTestCX : NBPhoneMetaData
@interface NBPhoneMetadataTestBB : NBPhoneMetaData
@end
@interface NBPhoneMetadataTestBS : NBPhoneMetaData
@end
@interface NBPhoneMetadataTestCX : NBPhoneMetaData
@end
@interface NBPhoneMetadataTestDE : NBPhoneMetaData
@end
@ -36,9 +39,6 @@
@interface NBPhoneMetadataTestPL : NBPhoneMetaData
@end
@interface NBPhoneMetadataTestSE : NBPhoneMetaData
@end
@interface NBPhoneMetadataTestCA : NBPhoneMetaData
@end
@ -48,7 +48,7 @@
@interface NBPhoneMetadataTest800 : NBPhoneMetaData
@end
@interface NBPhoneMetadataTestYT : NBPhoneMetaData
@interface NBPhoneMetadataTestSE : NBPhoneMetaData
@end
@interface NBPhoneMetadataTestFR : NBPhoneMetaData
@ -60,6 +60,9 @@
@interface NBPhoneMetadataTestHU : NBPhoneMetaData
@end
@interface NBPhoneMetadataTestYT : NBPhoneMetaData
@end
@interface NBPhoneMetadataTestSG : NBPhoneMetaData
@end

File diff suppressed because it is too large Load Diff

View File

@ -40,6 +40,10 @@ static NSMutableDictionary *kMapCCode2CN;
[countryCode64Array addObject:@"NZ"];
[kMapCCode2CN setObject:countryCode64Array forKey:@"64"];
NSMutableArray *countryCode374Array = [[NSMutableArray alloc] init];
[countryCode374Array addObject:@"AM"];
[kMapCCode2CN setObject:countryCode374Array forKey:@"374"];
NSMutableArray *countryCode800Array = [[NSMutableArray alloc] init];
[countryCode800Array addObject:@"001"];
[kMapCCode2CN setObject:countryCode800Array forKey:@"800"];

View File

@ -241,7 +241,7 @@ static NSMutableDictionary *kMapCCode2CN = nil;
/**
* @param {number} countryCallingCode
* @param countryCallingCode countryCallingCode
* @return {i18n.phonenumbers.PhoneMetadata}
*/
- (NBPhoneMetaData *)getMetadataForNonGeographicalRegion:(NSNumber *)countryCallingCode

View File

@ -22,6 +22,7 @@
_leadingZeroPossible = NO;
_mainCountryForCode = NO;
_sameMobileAndFixedLinePattern = NO;
}
return self;

View File

@ -365,7 +365,7 @@ NSString *letters = @"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
[contents appendFormat:@"\n NSMutableArray *%@ = [[NSMutableArray alloc] init];\n", pllo_var];
for (id num in arrayPLLO) {
if (num && [num isKindOfClass:[NSNumber class]]) {
[contents appendFormat:@" [%@ addObject: [NSNumber numberWithInt:%@]];\n", pl_var, num];
[contents appendFormat:@" [%@ addObject: [NSNumber numberWithInt:%@]];\n", pllo_var, num];
}
}
}

View File

@ -3,5 +3,5 @@
NSString * const NB_UNKNOWN_REGION = @"ZZ";
NSString * const NB_NON_BREAKING_SPACE = @"\u00a0";
NSString * const NB_PLUS_CHARS = @"+";
NSString * const NB_VALID_DIGITS_STRING = @"0-9-٠-٩۰-۹ *";
NSString * const NB_VALID_DIGITS_STRING = @"0-9-٠-٩۰-۹";
NSString * const NB_REGION_CODE_FOR_NON_GEO_ENTITY = @"001";

View File

@ -366,7 +366,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* Gets the national significant number of the a phone number. Note a national
* significant number doesn't contain a national prefix or any formatting.
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone number for which the
* - param {i18n.phonenumbers.PhoneNumber} number the phone number for which the
* national significant number is needed.
* @return {string} the national significant number of the PhoneNumber object
* passed in.
@ -470,7 +470,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
{
if (!DIGIT_MAPPINGS) {
DIGIT_MAPPINGS = [NSDictionary dictionaryWithObjectsAndKeys:
@"0", @"0", @"1", @"1", @"2", @"2", @"3", @"3", @"4", @"4", @"5", @"5", @"6", @"6", @"7", @"7", @"8", @"8", @"9", @"9", @"*", @"\*",
@"0", @"0", @"1", @"1", @"2", @"2", @"3", @"3", @"4", @"4", @"5", @"5", @"6", @"6", @"7", @"7", @"8", @"8", @"9", @"9",
// Fullwidth digit 0 to 9
@"0", @"\uFF10", @"1", @"\uFF11", @"2", @"\uFF12", @"3", @"\uFF13", @"4", @"\uFF14", @"5", @"\uFF15", @"6", @"\uFF16", @"7", @"\uFF17", @"8", @"\uFF18", @"9", @"\uFF19",
// Arabic-indic digit 0 to 9
@ -541,7 +541,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* x2303. We remove the second extension so that the first number is parsed
* correctly.
*
* @param {string} number the string that might contain a phone number.
* - param {string} number the string that might contain a phone number.
* @return {string} the number, stripped of any non-phone-number prefix (such as
* 'Tel:') or an empty string if no character used to start phone numbers
* (such as + or any digit) is found in the number.
@ -585,7 +585,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* that leading non-number symbols have been removed, such as by the method
* extractPossibleNumber.
*
* @param {string} number string to be checked for viability as a phone number.
* - param {string} number string to be checked for viability as a phone number.
* @return {boolean} NO if the number could be a phone number of some sort,
* otherwise NO.
*/
@ -617,7 +617,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* Arabic-Indic numerals are converted to European numerals.
* Spurious alpha characters are stripped.
*
* @param {string} number a string of characters representing a phone number.
* - param {string} number a string of characters representing a phone number.
* @return {string} the normalized string version of the phone number.
*/
- (NSString *)normalize:(NSString *)number
@ -638,7 +638,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* wrapper for normalize(String number) but does in-place normalization of the
* StringBuffer provided.
*
* @param {!goog.string.StringBuffer} number a StringBuffer of characters
* - param {!goog.string.StringBuffer} number a StringBuffer of characters
* representing a phone number that will be normalized in place.
* @private
*/
@ -658,7 +658,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* wide-ascii and arabic-indic numerals to European numerals, and strips
* punctuation and alpha characters.
*
* @param {string} number a string of characters representing a phone number.
* - param {string} number a string of characters representing a phone number.
* @return {string} the normalized string version of the phone number.
*/
- (NSString *)normalizeDigitsOnly:(NSString *)number
@ -675,7 +675,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* keypad, but retains existing formatting. Also converts wide-ascii digits to
* normal ascii digits, and converts Arabic-Indic numerals to European numerals.
*
* @param {string} number a string of characters representing a phone number.
* - param {string} number a string of characters representing a phone number.
* @return {string} the normalized string version of the phone number.
*/
- (NSString *)convertAlphaCharactersInNumber:(NSString *)number
@ -728,7 +728,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* <li> some geographical numbers have no area codes.
* </ul>
*
* @param {i18n.phonenumbers.PhoneNumber} number the PhoneNumber object for
* - param {i18n.phonenumbers.PhoneNumber} number the PhoneNumber object for
* which clients want to know the length of the area code.
* @return {number} the length of area code of the PhoneNumber object passed in.
*/
@ -806,7 +806,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* Refer to the unittests to see the difference between this function and
* {@link #getLengthOfGeographicalAreaCode}.
*
* @param {i18n.phonenumbers.PhoneNumber} number the PhoneNumber object for
* - param {i18n.phonenumbers.PhoneNumber} number the PhoneNumber object for
* which clients want to know the length of the NDC.
* @return {number} the length of NDC of the PhoneNumber object passed in.
*/
@ -892,11 +892,11 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* all characters found in the accompanying map with the values therein, and
* stripping all other characters if removeNonMatches is NO.
*
* @param {string} number a string of characters representing a phone number.
* @param {!Object.<string, string>} normalizationReplacements a mapping of
* - param {string} number a string of characters representing a phone number.
* - param {!Object.<string, string>} normalizationReplacements a mapping of
* characters to what they should be replaced by in the normalized version
* of the phone number.
* @param {boolean} removeNonMatches indicates whether characters that are not
* - param {boolean} removeNonMatches indicates whether characters that are not
* able to be replaced should be stripped from the number. If this is NO,
* they will be left unchanged in the number.
* @return {string} the normalized string version of the phone number.
@ -935,7 +935,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* Helper function to check if the national prefix formatting rule has the first
* group only, i.e., does not start with the national prefix.
*
* @param {string} nationalPrefixFormattingRule The formatting rule for the
* - param {string} nationalPrefixFormattingRule The formatting rule for the
* national prefix.
* @return {boolean} NO if the national prefix formatting rule has the first
* group only.
@ -957,7 +957,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* the number is associated to a certain region in the country where it belongs
* to. Note that this doesn't verify if the number is actually in use.
*
* @param {i18n.phonenumbers.PhoneNumber} phoneNumber The phone number to test.
* - param {i18n.phonenumbers.PhoneNumber} phoneNumber The phone number to test.
* @return {boolean} NO if the phone number has a geographical association.
* @private
*/
@ -978,7 +978,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
/**
* Helper function to check region code is not unknown or nil.
*
* @param {?string} regionCode the ISO 3166-1 two-letter region code.
* - param {?string} regionCode the ISO 3166-1 two-letter region code.
* @return {boolean} NO if region code is valid.
* @private
*/
@ -1000,7 +1000,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
/**
* Helper function to check the country calling code is valid.
*
* @param {number} countryCallingCode the country calling code.
* - param {number} countryCallingCode the country calling code.
* @return {boolean} NO if country calling code code is valid.
* @private
*/
@ -1027,9 +1027,9 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* country calling code, we cannot work out which formatting rules to apply so
* we return the national significant number with no formatting applied.
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone number to be
* - param {i18n.phonenumbers.PhoneNumber} number the phone number to be
* formatted.
* @param {i18n.phonenumbers.PhoneNumberFormat} numberFormat the format the
* - param {i18n.phonenumbers.PhoneNumberFormat} numberFormat the format the
* phone number should be formatted into.
* @return {string} the formatted phone number.
*/
@ -1109,11 +1109,11 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* extensions, so we return the national significant number with no formatting
* applied.
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone number to be
* - param {i18n.phonenumbers.PhoneNumber} number the phone number to be
* formatted.
* @param {i18n.phonenumbers.PhoneNumberFormat} numberFormat the format the
* - param {i18n.phonenumbers.PhoneNumberFormat} numberFormat the format the
* phone number should be formatted into.
* @param {Array.<i18n.phonenumbers.NumberFormat>} userDefinedFormats formatting
* - param {Array.<i18n.phonenumbers.NumberFormat>} userDefinedFormats formatting
* rules specified by clients.
* @return {string} the formatted phone number.
*/
@ -1206,9 +1206,9 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* carrier code stored. If {@code carrierCode} contains an empty string, returns
* the number in national format without any carrier code.
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone number to be
* - param {i18n.phonenumbers.PhoneNumber} number the phone number to be
* formatted.
* @param {string} carrierCode the carrier selection code to be used.
* - param {string} carrierCode the carrier selection code to be used.
* @return {string} the formatted phone number in national format for dialing
* using the carrier as specified in the {@code carrierCode}.
*/
@ -1254,8 +1254,8 @@ static NSArray *GEO_MOBILE_COUNTRIES;
/**
* @param {number} countryCallingCode
* @param {?string} regionCode
* - param {number} countryCallingCode
* - param {?string} regionCode
* @return {i18n.phonenumbers.PhoneMetadata}
* @private
*/
@ -1280,9 +1280,9 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* code passed in should take precedence over the number's
* {@code preferred_domestic_carrier_code} when formatting.
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone number to be
* - param {i18n.phonenumbers.PhoneNumber} number the phone number to be
* formatted.
* @param {string} fallbackCarrierCode the carrier selection code to be used, if
* - param {string} fallbackCarrierCode the carrier selection code to be used, if
* none is found in the phone number itself.
* @return {string} the formatted phone number in national format for dialing
* using the number's preferred_domestic_carrier_code, or the
@ -1320,10 +1320,10 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* (e.g. some countries block toll-free numbers from being called outside of the
* country), the method returns an empty string.
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone number to be
* - param {i18n.phonenumbers.PhoneNumber} number the phone number to be
* formatted.
* @param {string} regionCallingFrom the region where the call is being placed.
* @param {boolean} withFormatting whether the number should be returned with
* - param {string} regionCallingFrom the region where the call is being placed.
* - param {boolean} withFormatting whether the number should be returned with
* formatting symbols, such as spaces and dashes.
* @return {string} the formatted phone number.
*/
@ -1419,9 +1419,9 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* international prefixes, the number in its INTERNATIONAL format will be
* returned instead.
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone number to be
* - param {i18n.phonenumbers.PhoneNumber} number the phone number to be
* formatted.
* @param {string} regionCallingFrom the region where the call is being placed.
* - param {string} regionCallingFrom the region where the call is being placed.
* @return {string} the formatted phone number.
*/
- (NSString *)formatOutOfCountryCallingNumber:(NBPhoneNumber*)number regionCallingFrom:(NSString *)regionCallingFrom error:(NSError**)error
@ -1505,11 +1505,11 @@ static NSArray *GEO_MOBILE_COUNTRIES;
/**
* A helper function that is used by format and formatByPattern.
*
* @param {number} countryCallingCode the country calling code.
* @param {i18n.phonenumbers.PhoneNumberFormat} numberFormat the format the
* - param {number} countryCallingCode the country calling code.
* - param {i18n.phonenumbers.PhoneNumberFormat} numberFormat the format the
* phone number should be formatted into.
* @param {string} formattedNationalNumber
* @param {string} formattedExtension
* - param {string} formattedNationalNumber
* - param {string} formattedExtension
* @return {string} the formatted phone number.
* @private
*/
@ -1544,9 +1544,9 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* Note this method guarantees no digit will be inserted, removed or modified as
* a result of formatting.
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone number that needs to
* - param {i18n.phonenumbers.PhoneNumber} number the phone number that needs to
* be formatted in its original number format.
* @param {string} regionCallingFrom the region whose IDD needs to be prefixed
* - param {string} regionCallingFrom the region whose IDD needs to be prefixed
* if the original number has one.
* @return {string} the formatted phone number in its original number format.
*/
@ -1690,9 +1690,9 @@ static NSArray *GEO_MOBILE_COUNTRIES;
/**
* Check if rawInput, which is assumed to be in the national format, has a
* national prefix. The national prefix is assumed to be in digits-only form.
* @param {string} rawInput
* @param {string} nationalPrefix
* @param {string} regionCode
* - param {string} rawInput
* - param {string} nationalPrefix
* - param {string} regionCode
* @return {boolean}
* @private
*/
@ -1722,7 +1722,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* Returns NO if a number is from a region whose national significant number
* couldn't contain a leading zero, but has the italian_leading_zero field set
* to NO.
* @param {i18n.phonenumbers.PhoneNumber} number
* - param {i18n.phonenumbers.PhoneNumber} number
* @return {boolean}
* @private
*/
@ -1733,7 +1733,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
/**
* @param {i18n.phonenumbers.PhoneNumber} number
* - param {i18n.phonenumbers.PhoneNumber} number
* @return {boolean}
* @private
*/
@ -1775,9 +1775,9 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* a huge problem - and will be fixed if it proves to be so.
* </ul>
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone number that needs to
* - param {i18n.phonenumbers.PhoneNumber} number the phone number that needs to
* be formatted.
* @param {string} regionCallingFrom the region where the call is being placed.
* - param {string} regionCallingFrom the region where the call is being placed.
* @return {string} the formatted phone number.
*/
- (NSString *)formatOutOfCountryKeepingAlphaChars:(NBPhoneNumber*)number regionCallingFrom:(NSString *)regionCallingFrom error:(NSError **)error
@ -1896,12 +1896,12 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* which format to use for those cases. If a carrierCode is specified, this will
* be inserted into the formatted string to replace $CC.
*
* @param {string} number a string of characters representing a phone number.
* @param {i18n.phonenumbers.PhoneMetadata} metadata the metadata for the
* - param {string} number a string of characters representing a phone number.
* - param {i18n.phonenumbers.PhoneMetadata} metadata the metadata for the
* region that we think this number is from.
* @param {i18n.phonenumbers.PhoneNumberFormat} numberFormat the format the
* - param {i18n.phonenumbers.PhoneNumberFormat} numberFormat the format the
* phone number should be formatted into.
* @param {string=} opt_carrierCode
* - param {string=} opt_carrierCode
* @return {string} the formatted phone number.
* @private
*/
@ -1922,9 +1922,9 @@ static NSArray *GEO_MOBILE_COUNTRIES;
/**
* @param {Array.<i18n.phonenumbers.NumberFormat>} availableFormats the
* - param {Array.<i18n.phonenumbers.NumberFormat>} availableFormats the
* available formats the phone number could be formatted into.
* @param {string} nationalNumber a string of characters representing a phone
* - param {string} nationalNumber a string of characters representing a phone
* number.
* @return {i18n.phonenumbers.NumberFormat}
* @private
@ -1949,13 +1949,13 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* Note that carrierCode is optional - if nil or an empty string, no carrier
* code replacement will take place.
*
* @param {string} nationalNumber a string of characters representing a phone
* - param {string} nationalNumber a string of characters representing a phone
* number.
* @param {i18n.phonenumbers.NumberFormat} formattingPattern the formatting rule
* - param {i18n.phonenumbers.NumberFormat} formattingPattern the formatting rule
* the phone number should be formatted into.
* @param {i18n.phonenumbers.PhoneNumberFormat} numberFormat the format the
* - param {i18n.phonenumbers.PhoneNumberFormat} numberFormat the format the
* phone number should be formatted into.
* @param {string=} opt_carrierCode
* - param {string=} opt_carrierCode
* @return {string} the formatted phone number.
* @private
*/
@ -1998,7 +1998,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
/**
* Gets a valid number for the specified region.
*
* @param {string} regionCode the region for which an example number is needed.
* - param {string} regionCode the region for which an example number is needed.
* @return {i18n.phonenumbers.PhoneNumber} a valid fixed-line number for the
* specified region. Returns nil when the metadata does not contain such
* information, or the region 001 is passed in. For 001 (representing non-
@ -2015,8 +2015,8 @@ static NSArray *GEO_MOBILE_COUNTRIES;
/**
* Gets a valid number for the specified region and number type.
*
* @param {string} regionCode the region for which an example number is needed.
* @param {i18n.phonenumbers.PhoneNumberType} type the type of number that is
* - param {string} regionCode the region for which an example number is needed.
* - param {i18n.phonenumbers.PhoneNumberType} type the type of number that is
* needed.
* @return {i18n.phonenumbers.PhoneNumber} a valid number for the specified
* region and type. Returns nil when the metadata does not contain such
@ -2048,14 +2048,14 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* Gets a valid number for the specified country calling code for a
* non-geographical entity.
*
* @param {number} countryCallingCode the country calling code for a
* - param {number} countryCallingCode the country calling code for a
* non-geographical entity.
* @return {i18n.phonenumbers.PhoneNumber} a valid number for the
* non-geographical entity. Returns nil when the metadata does not contain
* such information, or the country calling code passed in does not belong
* to a non-geographical entity.
*/
- (NBPhoneNumber*)getExampleNumberForNonGeoEntity:(NSNumber *)countryCallingCode error:(NSError *__autoreleasing *)error
- (NBPhoneNumber *)getExampleNumberForNonGeoEntity:(NSNumber *)countryCallingCode error:(NSError *__autoreleasing *)error
{
NBPhoneNumber *res = nil;
@ -2063,10 +2063,32 @@ static NSArray *GEO_MOBILE_COUNTRIES;
NBPhoneMetaData *metadata = [helper getMetadataForNonGeographicalRegion:countryCallingCode];
if (metadata != nil) {
NBPhoneNumberDesc *desc = metadata.generalDesc;
if ([NBMetadataHelper hasValue:desc.exampleNumber]) {
NSString *callCode = [NSString stringWithFormat:@"+%@%@", countryCallingCode, desc.exampleNumber];
return [self parse:callCode defaultRegion:NB_UNKNOWN_REGION error:error];
NSString *fetchedExampleNumber = nil;
if ([NBMetadataHelper hasValue:metadata.mobile.exampleNumber]) {
fetchedExampleNumber = metadata.mobile.exampleNumber;
}
else if ([NBMetadataHelper hasValue:metadata.tollFree.exampleNumber]) {
fetchedExampleNumber = metadata.tollFree.exampleNumber;
}
else if ([NBMetadataHelper hasValue:metadata.sharedCost.exampleNumber]) {
fetchedExampleNumber = metadata.sharedCost.exampleNumber;
}
else if ([NBMetadataHelper hasValue:metadata.voip.exampleNumber]) {
fetchedExampleNumber = metadata.voip.exampleNumber;
}
else if ([NBMetadataHelper hasValue:metadata.voicemail.exampleNumber]) {
fetchedExampleNumber = metadata.voicemail.exampleNumber;
}
else if ([NBMetadataHelper hasValue:metadata.uan.exampleNumber]) {
fetchedExampleNumber = metadata.uan.exampleNumber;
}
else if ([NBMetadataHelper hasValue:metadata.premiumRate.exampleNumber]) {
fetchedExampleNumber = metadata.premiumRate.exampleNumber;
}
if (fetchedExampleNumber != nil) {
NSString *callCode = [NSString stringWithFormat:@"+%@%@", countryCallingCode, fetchedExampleNumber];
res = [self parse:callCode defaultRegion:NB_UNKNOWN_REGION error:error];
}
}
@ -2078,11 +2100,11 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* Gets the formatted extension of a phone number, if the phone number had an
* extension specified. If not, it returns an empty string.
*
* @param {i18n.phonenumbers.PhoneNumber} number the PhoneNumber that might have
* - param {i18n.phonenumbers.PhoneNumber} number the PhoneNumber that might have
* an extension.
* @param {i18n.phonenumbers.PhoneMetadata} metadata the metadata for the
* - param {i18n.phonenumbers.PhoneMetadata} metadata the metadata for the
* region that we think this number is from.
* @param {i18n.phonenumbers.PhoneNumberFormat} numberFormat the format the
* - param {i18n.phonenumbers.PhoneNumberFormat} numberFormat the format the
* phone number should be formatted into.
* @return {string} the formatted extension if any.
* @private
@ -2106,8 +2128,8 @@ static NSArray *GEO_MOBILE_COUNTRIES;
/**
* @param {i18n.phonenumbers.PhoneMetadata} metadata
* @param {i18n.phonenumbers.PhoneNumberType} type
* - param {i18n.phonenumbers.PhoneMetadata} metadata
* - param {i18n.phonenumbers.PhoneNumberType} type
* @return {i18n.phonenumbers.PhoneNumberDesc}
* @private
*/
@ -2146,7 +2168,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
/**
* Gets the type of a phone number.
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone number that we want
* - param {i18n.phonenumbers.PhoneNumber} number the phone number that we want
* to know the type.
* @return {i18n.phonenumbers.PhoneNumberType} the type of the phone number.
*/
@ -2165,8 +2187,8 @@ static NSArray *GEO_MOBILE_COUNTRIES;
/**
* @param {string} nationalNumber
* @param {i18n.phonenumbers.PhoneMetadata} metadata
* - param {string} nationalNumber
* - param {i18n.phonenumbers.PhoneMetadata} metadata
* @return {i18n.phonenumbers.PhoneNumberType}
* @private
*/
@ -2232,8 +2254,8 @@ static NSArray *GEO_MOBILE_COUNTRIES;
/**
* @param {string} nationalNumber
* @param {i18n.phonenumbers.PhoneNumberDesc} numberDesc
* - param {string} nationalNumber
* - param {i18n.phonenumbers.PhoneNumberDesc} numberDesc
* @return {boolean}
* @private
*/
@ -2254,7 +2276,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* verify the number is actually in use, which is impossible to tell by just
* looking at a number itself.
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone number that we want
* - param {i18n.phonenumbers.PhoneNumber} number the phone number that we want
* to validate.
* @return {boolean} a boolean that indicates whether the number is of a valid
* pattern.
@ -2279,9 +2301,9 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* as the Isle of Man as invalid for the region "GB" (United Kingdom), since it
* has its own region code, "IM", which may be undesirable.
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone number that we want
* - param {i18n.phonenumbers.PhoneNumber} number the phone number that we want
* to validate.
* @param {?string} regionCode the region that we want to validate the phone
* - param {?string} regionCode the region that we want to validate the phone
* number for.
* @return {boolean} a boolean that indicates whether the number is of a valid
* pattern.
@ -2319,7 +2341,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* Returns the region where a phone number is from. This could be used for
* geocoding at the region level.
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone number whose origin
* - param {i18n.phonenumbers.PhoneNumber} number the phone number whose origin
* we want to know.
* @return {?string} the region where the phone number is from, or nil
* if no region matches this calling code.
@ -2345,8 +2367,8 @@ static NSArray *GEO_MOBILE_COUNTRIES;
/**
* @param {i18n.phonenumbers.PhoneNumber} number
* @param {Array.<string>} regionCodes
* - param {i18n.phonenumbers.PhoneNumber} number
* - param {Array.<string>} regionCodes
* @return {?string}
* @private
@ -2381,7 +2403,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* multiple regions, the one designated in the metadata as the 'main' region for
* this calling code will be returned.
*
* @param {number} countryCallingCode the country calling code.
* - param {number} countryCallingCode the country calling code.
* @return {string}
*/
- (NSString *)getRegionCodeForCountryCode:(NSNumber *)countryCallingCode
@ -2398,7 +2420,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* returned. Also, in the case of no region code being found, an empty list is
* returned.
*
* @param {number} countryCallingCode the country calling code.
* - param {number} countryCallingCode the country calling code.
* @return {Array.<string>}
*/
- (NSArray*)getRegionCodesForCountryCode:(NSNumber *)countryCallingCode
@ -2413,7 +2435,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* Returns the country calling code for a specific region. For example, this
* would be 1 for the United States, and 64 for New Zealand.
*
* @param {?string} regionCode the region that we want to get the country
* - param {?string} regionCode the region that we want to get the country
* calling code for.
* @return {number} the country calling code for the region denoted by
* regionCode.
@ -2439,7 +2461,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* would be 1 for the United States, and 64 for New Zealand. Assumes the region
* is already valid.
*
* @param {?string} regionCode the region that we want to get the country
* - param {?string} regionCode the region that we want to get the country
* calling code for.
* @return {number} the country calling code for the region denoted by
* regionCode.
@ -2477,9 +2499,9 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* numbers. Use the library's formatting functions to prefix the national prefix
* when required.
*
* @param {?string} regionCode the region that we want to get the dialling
* - param {?string} regionCode the region that we want to get the dialling
* prefix for.
* @param {boolean} stripNonDigits NO to strip non-digits from the national
* - param {boolean} stripNonDigits NO to strip non-digits from the national
* dialling prefix.
* @return {?string} the dialling prefix for the region denoted by
* regionCode.
@ -2511,7 +2533,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* Checks if this is a region under the North American Numbering Plan
* Administration (NANPA).
*
* @param {?string} regionCode the ISO 3166-1 two-letter region code.
* - param {?string} regionCode the ISO 3166-1 two-letter region code.
* @return {boolean} NO if regionCode is one of the regions under NANPA.
*/
- (BOOL)isNANPACountry:(NSString *)regionCode
@ -2536,7 +2558,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* such a region is Italy. Returns NO if no metadata for the country is
* found.
*
* @param {number} countryCallingCode the country calling code.
* - param {number} countryCallingCode the country calling code.
* @return {boolean}
*/
- (BOOL)isLeadingZeroPossible:(NSNumber *)countryCallingCode
@ -2556,7 +2578,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* methods such as {@link #isPossibleNumberWithReason} and
* {@link #isValidNumber} should be used.
*
* @param {string} number the number that needs to be checked.
* - param {string} number the number that needs to be checked.
* @return {boolean} NO if the number is a valid vanity number.
*/
- (BOOL)isAlphaNumber:(NSString *)number
@ -2581,7 +2603,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* Convenience wrapper around {@link #isPossibleNumberWithReason}. Instead of
* returning the reason for failure, this method returns a boolean value.
*
* @param {i18n.phonenumbers.PhoneNumber} number the number that needs to be
* - param {i18n.phonenumbers.PhoneNumber} number the number that needs to be
* checked.
* @return {boolean} NO if the number is possible.
*/
@ -2614,22 +2636,42 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* in between these possible lengths is entered, such as of length 8, this will
* return TOO_LONG.
*
* @param {string} numberPattern
* @param {string} number
* @return {ValidationResult}
* - param {string} number
* - param {i18n.phonenumbers.PhoneNumberDesc} phoneNumberDesc
* - return {i18n.phonenumbers.PhoneNumberUtil.ValidationResult}
* @private
*/
- (NBEValidationResult)testNumberLengthAgainstPattern:(NSString *)numberPattern number:(NSString *)number
- (NBEValidationResult)testNumberLength:(NSString *)number desc:(NBPhoneNumberDesc *)phoneNumberDesc
{
if ([self matchesEntirely:numberPattern string:number]) {
NSArray *possibleLengths = phoneNumberDesc.possibleLength;
NSArray *localLengths = phoneNumberDesc.possibleLengthLocalOnly;
NSUInteger actualLength = number.length;
if ([localLengths containsObject:@(actualLength)]) {
return NBEValidationResultIS_POSSIBLE;
}
if ([self stringPositionByRegex:number regex:numberPattern] == 0) {
return NBEValidationResultTOO_LONG;
} else {
// There should always be "possibleLengths" set for every element. This will
// be a build-time check once ShortNumberMetadata.xml is migrated to contain
// this information as well.
NSNumber *minimumLength = possibleLengths[0];
if (minimumLength.unsignedIntegerValue == actualLength) {
return NBEValidationResultIS_POSSIBLE;
} else if (minimumLength.unsignedIntegerValue > actualLength) {
return NBEValidationResultTOO_SHORT;
} else if (possibleLengths.count - 1 < possibleLengths.count) {
if (((NSNumber *)possibleLengths[possibleLengths.count - 1]).integerValue < actualLength) {
return NBEValidationResultTOO_LONG;
}
}
// Note that actually the number is not too long if possible_lengths does not
// contain the length: we know it is less than the highest possible number
// length, and higher than the lowest possible number length. However, we
// don't currently have an enum to express this, so we return TOO_LONG in the
// short-term.
// We skip the first element since we've already checked it.
return [possibleLengths containsObject:@(actualLength)] ? NBEValidationResultIS_POSSIBLE : NBEValidationResultTOO_LONG;
}
@ -2653,7 +2695,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* subscriber-number-only version.
* </ol>
*
* @param {i18n.phonenumbers.PhoneNumber} number the number that needs to be
* - param {i18n.phonenumbers.PhoneNumber} number the number that needs to be
* checked.
* @return {ValidationResult} a
* ValidationResult object which indicates whether the number is possible.
@ -2691,23 +2733,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
NSString *regionCode = [self getRegionCodeForCountryCode:countryCode];
// Metadata cannot be nil because the country calling code is valid.
NBPhoneMetaData *metadata = [self getMetadataForRegionOrCallingCode:countryCode regionCode:regionCode];
NBPhoneNumberDesc *generalNumDesc = metadata.generalDesc;
// Handling case of numbers with no metadata.
if ([NBMetadataHelper hasValue:generalNumDesc.nationalNumberPattern] == NO) {
unsigned int numberLength = (unsigned int)nationalNumber.length;
if (numberLength < MIN_LENGTH_FOR_NSN_) {
return NBEValidationResultTOO_SHORT;
} else if (numberLength > MAX_LENGTH_FOR_NSN_) {
return NBEValidationResultTOO_LONG;
} else {
return NBEValidationResultIS_POSSIBLE;
}
}
NSString *possibleNumberPattern = generalNumDesc.possibleNumberPattern;
return [self testNumberLengthAgainstPattern:possibleNumberPattern number:nationalNumber];
return [self testNumberLength:nationalNumber desc:metadata.generalDesc];
}
@ -2720,9 +2746,9 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* <p>This method first parses the number, then invokes
* {@link #isPossibleNumber} with the resultant PhoneNumber object.
*
* @param {string} number the number that needs to be checked, in the form of a
* - param {string} number the number that needs to be checked, in the form of a
* string.
* @param {string} regionDialingFrom the region that we are expecting the number
* - param {string} regionDialingFrom the region that we are expecting the number
* to be dialed from.
* Note this is different from the region where the number belongs.
* For example, the number +1 650 253 0000 is a number that belongs to US.
@ -2748,7 +2774,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* valid, and resets the PhoneNumber object passed in to that valid version. If
* no valid number could be extracted, the PhoneNumber object passed in will not
* be modified.
* @param {i18n.phonenumbers.PhoneNumber} number a PhoneNumber object which
* - param {i18n.phonenumbers.PhoneNumber} number a PhoneNumber object which
* contains a number that is too long to be valid.
* @return {boolean} NO if a valid phone number can be successfully extracted.
*/
@ -2781,8 +2807,8 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* IDD has already been removed. Returns 0 if fullNumber doesn't start with a
* valid country calling code, and leaves nationalNumber unmodified.
*
* @param {!goog.string.StringBuffer} fullNumber
* @param {!goog.string.StringBuffer} nationalNumber
* - param {!goog.string.StringBuffer} fullNumber
* - param {!goog.string.StringBuffer} nationalNumber
* @return {number}
*/
- (NSNumber *)extractCountryCode:(NSString *)fullNumber nationalNumber:(NSString **)nationalNumber
@ -2895,17 +2921,17 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* the country calling code supplied after this does not match that of any known
* region.
*
* @param {string} number non-normalized telephone number that we wish to
* - param {string} number non-normalized telephone number that we wish to
* extract a country calling code from - may begin with '+'.
* @param {i18n.phonenumbers.PhoneMetadata} defaultRegionMetadata metadata
* - param {i18n.phonenumbers.PhoneMetadata} defaultRegionMetadata metadata
* about the region this number may be from.
* @param {!goog.string.StringBuffer} nationalNumber a string buffer to store
* - param {!goog.string.StringBuffer} nationalNumber a string buffer to store
* the national significant number in, in the case that a country calling
* code was extracted. The number is appended to any existing contents. If
* no country calling code was extracted, this will be left unchanged.
* @param {boolean} keepRawInput NO if the country_code_source and
* - param {boolean} keepRawInput NO if the country_code_source and
* preferred_carrier_code fields of phoneNumber should be populated.
* @param {i18n.phonenumbers.PhoneNumber} phoneNumber the PhoneNumber object
* - param {i18n.phonenumbers.PhoneNumber} phoneNumber the PhoneNumber object
* where the country_code and country_code_source need to be populated.
* Note the country_code is always populated, whereas country_code_source is
* only populated when keepCountryCodeSource is NO.
@ -2982,13 +3008,12 @@ static NSArray *GEO_MOBILE_COUNTRIES;
[self maybeStripNationalPrefixAndCarrierCode:&potentialNationalNumber metadata:defaultRegionMetadata carrierCode:nil];
NSString *potentialNationalNumberStr = [potentialNationalNumber copy];
NSString *possibleNumberPattern = generalDesc.possibleNumberPattern;
// If the number was not valid before but is valid now, or if it was too
// long before, we consider the number with the country calling code
// stripped to be a better result and keep that instead.
if ((![self matchesEntirely:validNumberPattern string:fullNumber] &&
[self matchesEntirely:validNumberPattern string:potentialNationalNumberStr]) ||
[self testNumberLengthAgainstPattern:possibleNumberPattern number:fullNumber] == NBEValidationResultTOO_LONG) {
[self testNumberLength:fullNumber desc:generalDesc] == NBEValidationResultTOO_LONG) {
(*nationalNumber) = [(*nationalNumber) stringByAppendingString:potentialNationalNumberStr];
if (keepRawInput) {
(*phoneNumber).countryCodeSource = [NSNumber numberWithInteger:NBECountryCodeSourceFROM_NUMBER_WITHOUT_PLUS_SIGN];
@ -3008,9 +3033,9 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* Strips the IDD from the start of the number if present. Helper function used
* by maybeStripInternationalPrefixAndNormalize.
*
* @param {!RegExp} iddPattern the regular expression for the international
* - param {!RegExp} iddPattern the regular expression for the international
* prefix.
* @param {!goog.string.StringBuffer} number the phone number that we wish to
* - param {!goog.string.StringBuffer} number the phone number that we wish to
* strip any international dialing prefix from.
* @return {boolean} NO if an international prefix was present.
* @private
@ -3054,9 +3079,9 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* provided, normalizes the resulting number, and indicates if an international
* prefix was present.
*
* @param {!goog.string.StringBuffer} number the non-normalized telephone number
* - param {!goog.string.StringBuffer} number the non-normalized telephone number
* that we wish to strip any international dialing prefix from.
* @param {string} possibleIddPrefix the international direct dialing prefix
* - param {string} possibleIddPrefix the international direct dialing prefix
* from the region we think this number may be dialed in.
* @return {CountryCodeSource} the corresponding
* CountryCodeSource if an international dialing prefix could be removed
@ -3089,11 +3114,11 @@ static NSArray *GEO_MOBILE_COUNTRIES;
/**
* Strips any national prefix (such as 0, 1) present in the number provided.
*
* @param {!goog.string.StringBuffer} number the normalized telephone number
* - param {!goog.string.StringBuffer} number the normalized telephone number
* that we wish to strip any national dialing prefix from.
* @param {i18n.phonenumbers.PhoneMetadata} metadata the metadata for the
* - param {i18n.phonenumbers.PhoneMetadata} metadata the metadata for the
* region that we think this number is from.
* @param {goog.string.StringBuffer} carrierCode a place to insert the carrier
* - param {goog.string.StringBuffer} carrierCode a place to insert the carrier
* code if one is extracted.
* @return {boolean} NO if a national prefix or carrier code (or both) could
* be extracted.
@ -3168,7 +3193,7 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* connected, usually indicated with extn, ext, x or similar) from the end of
* the number, and returns it.
*
* @param {!goog.string.StringBuffer} number the non-normalized telephone number
* - param {!goog.string.StringBuffer} number the non-normalized telephone number
* that we wish to strip the extension from.
* @return {string} the phone extension.
*/
@ -3212,8 +3237,8 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* Checks to see that the region code used is valid, or if it is not valid, that
* the number to parse starts with a + symbol so that we can attempt to infer
* the region from the number.
* @param {string} numberToParse number that we are attempting to parse.
* @param {?string} defaultRegion region that we are expecting the number to be
* - param {string} numberToParse number that we are attempting to parse.
* - param {?string} defaultRegion region that we are expecting the number to be
* from.
* @return {boolean} NO if it cannot use the region provided and the region
* cannot be inferred.
@ -3234,10 +3259,10 @@ static NSArray *GEO_MOBILE_COUNTRIES;
* valid number for a particular region is not performed. This can be done
* separately with {@link #isValidNumber}.
*
* @param {?string} numberToParse number that we are attempting to parse. This
* - param {?string} numberToParse number that we are attempting to parse. This
* can contain formatting such as +, ( and -, as well as a phone number
* extension. It can also be provided in RFC3966 format.
* @param {?string} defaultRegion region that we are expecting the number to be
* - param {?string} defaultRegion region that we are expecting the number to be
* from. This is only used if the number being parsed is not written in
* international format. The country_code for the number in this case would
* be stored as that of the default region supplied. If the number is
@ -3335,10 +3360,10 @@ static CTTelephonyNetworkInfo* _telephonyNetworkInfo;
* from {@link #parse} in that it always populates the raw_input field of the
* protocol buffer with numberToParse as well as the country_code_source field.
*
* @param {string} numberToParse number that we are attempting to parse. This
* - param {string} numberToParse number that we are attempting to parse. This
* can contain formatting such as +, ( and -, as well as a phone number
* extension.
* @param {?string} defaultRegion region that we are expecting the number to be
* - param {?string} defaultRegion region that we are expecting the number to be
* from. This is only used if the number being parsed is not written in
* international format. The country calling code for the number in this
* case would be stored as that of the default region supplied.
@ -3366,8 +3391,8 @@ static CTTelephonyNetworkInfo* _telephonyNetworkInfo;
* A helper function to set the values related to leading zeros in a
* PhoneNumber.
*
* @param {string} nationalNumber the number we are parsing.
* @param {i18n.phonenumbers.PhoneNumber} phoneNumber a phone number proto
* - param {string} nationalNumber the number we are parsing.
* - param {i18n.phonenumbers.PhoneNumber} phoneNumber a phone number proto
* buffer to fill in.
* @private
*/
@ -3394,16 +3419,16 @@ static CTTelephonyNetworkInfo* _telephonyNetworkInfo;
* same as the public {@link #parse} method, with the exception that it allows
* the default region to be nil, for use by {@link #isNumberMatch}.
*
* @param {?string} numberToParse number that we are attempting to parse. This
* - param {?string} numberToParse number that we are attempting to parse. This
* can contain formatting such as +, ( and -, as well as a phone number
* extension.
* @param {?string} defaultRegion region that we are expecting the number to be
* - param {?string} defaultRegion region that we are expecting the number to be
* from. This is only used if the number being parsed is not written in
* international format. The country calling code for the number in this
* case would be stored as that of the default region supplied.
* @param {boolean} keepRawInput whether to populate the raw_input field of the
* - param {boolean} keepRawInput whether to populate the raw_input field of the
* phoneNumber with numberToParse.
* @param {boolean} checkRegion should be set to NO if it is permitted for
* - param {boolean} checkRegion should be set to NO if it is permitted for
* the default coregion to be nil or unknown ('ZZ').
* @return {i18n.phonenumbers.PhoneNumber} a phone number proto buffer filled
* with the parsed number.
@ -3575,10 +3600,10 @@ static CTTelephonyNetworkInfo* _telephonyNetworkInfo;
* nationalNumber if it is written in RFC3966; otherwise extract a possible
* number out of it and write to nationalNumber.
*
* @param {?string} numberToParse number that we are attempting to parse. This
* - param {?string} numberToParse number that we are attempting to parse. This
* can contain formatting such as +, ( and -, as well as a phone number
* extension.
* @param {!goog.string.StringBuffer} nationalNumber a string buffer for storing
* - param {!goog.string.StringBuffer} nationalNumber a string buffer for storing
* the national significant number.
* @private
*/
@ -3655,10 +3680,10 @@ static CTTelephonyNetworkInfo* _telephonyNetworkInfo;
* the numbers +1 345 657 1234 and 657 1234 are a SHORT_NSN_MATCH. The numbers
* +1 345 657 1234 and 345 657 are a NO_MATCH.
*
* @param {i18n.phonenumbers.PhoneNumber|string} firstNumberIn first number to
* - param {i18n.phonenumbers.PhoneNumber|string} firstNumberIn first number to
* compare. If it is a string it can contain formatting, and can have
* country calling code specified with + at the start.
* @param {i18n.phonenumbers.PhoneNumber|string} secondNumberIn second number to
* - param {i18n.phonenumbers.PhoneNumber|string} secondNumberIn second number to
* compare. If it is a string it can contain formatting, and can have
* country calling code specified with + at the start.
* @return {MatchType} NOT_A_NUMBER, NO_MATCH,
@ -3810,9 +3835,9 @@ static CTTelephonyNetworkInfo* _telephonyNetworkInfo;
* Returns NO when one national number is the suffix of the other or both are
* the same.
*
* @param {i18n.phonenumbers.PhoneNumber} firstNumber the first PhoneNumber
* - param {i18n.phonenumbers.PhoneNumber} firstNumber the first PhoneNumber
* object.
* @param {i18n.phonenumbers.PhoneNumber} secondNumber the second PhoneNumber
* - param {i18n.phonenumbers.PhoneNumber} secondNumber the second PhoneNumber
* object.
* @return {boolean} NO if one PhoneNumber is the suffix of the other one.
* @private
@ -3835,7 +3860,7 @@ static CTTelephonyNetworkInfo* _telephonyNetworkInfo;
* TODO: Make this method public when we have enough metadata to make it
* worthwhile. Currently visible for testing purposes only.
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone-number for which we
* - param {i18n.phonenumbers.PhoneNumber} number the phone-number for which we
* want to know whether it is diallable from outside the region.
* @return {boolean} NO if the number can only be dialled from within the
* country.
@ -3873,8 +3898,8 @@ static CTTelephonyNetworkInfo* _telephonyNetworkInfo;
* Check whether the entire input sequence can be matched against the regular
* expression.
*
* @param {!RegExp|string} regex the regular expression to match against.
* @param {string} str the string to test.
* - param {!RegExp|string} regex the regular expression to match against.
* - param {string} str the string to test.
* @return {boolean} NO if str can be matched entirely against regex.
* @private
*/

View File

@ -1,14 +0,0 @@
//
// SampleAppDelegate.h
// libPhoneNumber
//
//
#import <UIKit/UIKit.h>
@interface SampleAppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end

View File

@ -1,2 +0,0 @@
/* Localized versions of Info.plist keys */

View File

@ -1,14 +0,0 @@
//
// Prefix header for all source files of the 'libPhoneNumber' target in the 'libPhoneNumber' project
//
#import <Availability.h>
#ifndef __IPHONE_3_0
#warning "This project uses features only available in iOS SDK 3.0 and later."
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif

View File

@ -1,16 +0,0 @@
//
// main.m
// libPhoneNumber
//
//
#import <UIKit/UIKit.h>
#import "SampleAppDelegate.h"
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([SampleAppDelegate class]));
}
}

View File

@ -5,17 +5,17 @@
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>

View File

@ -285,13 +285,10 @@
XCTAssertEqualObjects(@"(\\d{3})(\\d{3})(\\d{4})", ((NBNumberFormat*)metadata.numberFormats[1]).pattern);
XCTAssertEqualObjects(@"$1 $2 $3", ((NBNumberFormat*)metadata.numberFormats[1]).format);
XCTAssertEqualObjects(@"[13-689]\\d{9}|2[0-35-9]\\d{8}", metadata.generalDesc.nationalNumberPattern);
XCTAssertEqualObjects(@"\\d{7}(?:\\d{3})?", metadata.generalDesc.possibleNumberPattern);
XCTAssertTrue([metadata.generalDesc isEqual:metadata.fixedLine]);
XCTAssertEqualObjects(@"\\d{10}", metadata.tollFree.possibleNumberPattern);
XCTAssertEqualObjects(@"[13-689]\\d{9}|2[0-35-9]\\d{8}", metadata.fixedLine.nationalNumberPattern);
XCTAssertEqualObjects(@"900\\d{7}", metadata.premiumRate.nationalNumberPattern);
// No shared-cost data is available, so it should be initialised to 'NA'.
XCTAssertEqualObjects(@"NA", metadata.sharedCost.nationalNumberPattern);
XCTAssertEqualObjects(@"NA", metadata.sharedCost.possibleNumberPattern);
}
#pragma mark - testGetInstanceLoadDEMetadata
@ -306,10 +303,8 @@
XCTAssertEqualObjects(@"900", ((NBNumberFormat*)metadata.numberFormats[5]).leadingDigitsPatterns[0]);
XCTAssertEqualObjects(@"(\\d{3})(\\d{3,4})(\\d{4})", ((NBNumberFormat*)metadata.numberFormats[5]).pattern);
XCTAssertEqualObjects(@"$1 $2 $3", ((NBNumberFormat*)metadata.numberFormats[5]).format);
XCTAssertEqualObjects(@"(?:[24-6]\\d{2}|3[03-9]\\d|[789](?:[1-9]\\d|0[2-9]))\\d{1,8}", metadata.fixedLine.nationalNumberPattern);
XCTAssertEqualObjects(@"\\d{2,14}", metadata.fixedLine.possibleNumberPattern);
XCTAssertEqualObjects(@"(?:[24-6]\\d{2}|3[03-9]\\d|[789](?:0[2-9]|[1-9]\\d))\\d{1,8}", metadata.fixedLine.nationalNumberPattern);
XCTAssertEqualObjects(@"30123456", metadata.fixedLine.exampleNumber);
XCTAssertEqualObjects(@"\\d{10}", metadata.tollFree.possibleNumberPattern);
XCTAssertEqualObjects(@"900([135]\\d{6}|9\\d{7})", metadata.premiumRate.nationalNumberPattern);
}
@ -337,7 +332,8 @@
XCTAssertEqualObjects(@800, metadata.countryCode);
XCTAssertEqualObjects(@"$1 $2", ((NBNumberFormat*)metadata.numberFormats[0]).format);
XCTAssertEqualObjects(@"(\\d{4})(\\d{4})", ((NBNumberFormat*)metadata.numberFormats[0]).pattern);
XCTAssertEqualObjects(@"12345678", metadata.generalDesc.exampleNumber);
XCTAssertEqual(0, metadata.generalDesc.possibleLengthLocalOnly.count);
XCTAssertEqual(1, metadata.generalDesc.possibleLength.count);
XCTAssertEqualObjects(@"12345678", metadata.tollFree.exampleNumber);
}
@ -1427,21 +1423,6 @@
[number setNationalNumber:@1234567890];
XCTAssertEqual(NBEValidationResultIS_POSSIBLE, [_aUtil isPossibleNumberWithReason:number]);
XCTAssertEqual(NBEValidationResultTOO_LONG, [_aUtil isPossibleNumberWithReason:INTERNATIONAL_TOLL_FREE_TOO_LONG]);
// Try with number that we don't have metadata for.
NBPhoneNumber *adNumber = [[NBPhoneNumber alloc] init];
[adNumber setCountryCode:@376];
[adNumber setNationalNumber:@12345];
XCTAssertEqual(NBEValidationResultIS_POSSIBLE, [_aUtil isPossibleNumberWithReason:adNumber]);
[adNumber setCountryCode:@376];
[adNumber setNationalNumber:@1];
XCTAssertEqual(NBEValidationResultTOO_SHORT, [_aUtil isPossibleNumberWithReason:adNumber]);
[adNumber setCountryCode:@376];
[adNumber setNationalNumber:@12345678901234567];
XCTAssertEqual(NBEValidationResultTOO_LONG, [_aUtil isPossibleNumberWithReason:adNumber]);
}

View File

@ -1041,7 +1041,7 @@
XCTAssertEqualObjects(@"+37612345", [_aUtil format:adNumber numberFormat:NBEPhoneNumberFormatE164]);
XCTAssertEqualObjects(@"12345", [_aUtil format:adNumber numberFormat:NBEPhoneNumberFormatNATIONAL]);
XCTAssertEqual(NBEPhoneNumberTypeUNKNOWN, [_aUtil getNumberType:adNumber]);
XCTAssertTrue([_aUtil isValidNumber:adNumber]);
XCTAssertFalse([_aUtil isValidNumber:adNumber]);
// Test dialing a US number from within Andorra.
XCTAssertEqualObjects(@"00 1 650 253 0000", [_aUtil formatOutOfCountryCallingNumber:US_NUMBER regionCallingFrom:@"AD"]);

View File

@ -1,2 +0,0 @@
/* Localized versions of Info.plist keys */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,17 +0,0 @@
//
// libPhoneNumberTest-Prefix.pch
// libPhoneNumber
//
// Created by tabby on 2015. 2. 8..
// Copyright (c) 2015년 ohtalk.me. All rights reserved.
//
#ifndef libPhoneNumber_libPhoneNumberTest_Prefix_pch
#define libPhoneNumber_libPhoneNumberTest_Prefix_pch
#define LIB_PHONE_NUMBER_TEST 1
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif