Commit Graph

492 Commits

Author SHA1 Message Date
Frank
e50f018bc6
Update Google libPhoneNumber URL to a new location
This repository has been moved from googlei18n to google
(b/129494448#comment32).
2019-06-24 10:22:58 -07:00
iziz
cb0d5fac1c Update podspec 2019-06-09 23:35:13 +09:00
iziz
e40941e899 Update test code 2019-06-09 23:30:11 +09:00
iziz
16f5d25a6d Remove useless code & update metadata 2019-06-09 20:13:28 +09:00
Frank
4c9a17e1bd
Merge pull request #261 from gonzula/patch-1
Fix README typos
2019-02-04 10:53:26 -08:00
Gonzo Fialho
dbd4d9358e
Fix README typos 2019-02-04 08:36:01 -02:00
Frank
167e72455b
Merge pull request #251 from joshuakcockrell/fix-xcode-warnings
Fixed xcode warnings for build phases and recommended warnings
2018-10-10 13:23:51 -07:00
Frank
29185e57df
Merge pull request #249 from speramusinc/master
Fix regex references in podspec
2018-10-10 11:28:08 -07:00
Frank
099a34bf1e
Merge pull request #256 from pakistancan/master
updated metadata with googlei18n/libphonenumber
2018-10-10 11:27:21 -07:00
Muhammad Ali
fddde3c990 updated metadata from googlei18n/libphonenumber 2018-10-10 18:36:57 +02:00
Muhammad Ali
c801e2df11 updated metadata to latest 2018-10-10 17:49:04 +02:00
Joshua Cockrell
c9f693085a Fixed xcode warnings 2018-09-14 14:51:44 -07:00
Adam Lickel
64902173c6 Fix regex podspec 2018-09-04 17:46:50 -07:00
Frank
d5c22b8116
Merge pull request #246 from paween/mobileMapping
Add support to get country mobile token
2018-08-30 17:49:20 -07:00
Paween Itthipalkul
e8214731cf Add support to get country mobile token
See: https://github.com/googlei18n/libphonenumber/blob/master/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L908
2018-08-06 16:31:52 -07:00
Frank
3a84f89c04
Merge pull request #245 from JishnuM/master
Update metadata for 8.9.10, 8.9.11
2018-07-26 13:04:50 -07:00
Jishnu Mohan
21d4d2b3a4 Update metadata for 8.9.10, 8.9.11 2018-07-26 17:06:55 +08:00
Frank
be281e24ae
Merge pull request #241 from JishnuM/master
Update metadata.
2018-06-21 16:46:49 -07:00
Jishnu Mohan
31e7057c07 Update metadata.
Updated with metadataGenerator and GeneratePhoneNumberHeader.sh
2018-06-20 12:02:30 +08:00
dmaclach
91ecf9ed7e
Merge pull request #237 from xezero/fix-podspec
Fix podspec to include NBRegExMatcher
2018-05-04 11:55:20 -07:00
Kevin Bui
8e1880312c Fix podspec to include NBRegExMatcher 2018-05-04 11:18:37 -07:00
Frank
4dbb6b2732
Merge pull request #230 from Audioy/patch-1
Fix module name typo
2018-03-09 07:27:39 -08:00
Audioy
97c3cc9aa9
Fix module name typo 2018-03-09 11:53:32 +00:00
Frank
751357c4eb
Merge pull request #229 from paween/metadataGenerator
New JSON metadata generator
2018-03-05 13:04:49 -08:00
Frank
e66bd2993a
Merge pull request #227 from paween/perfTest
Improve phone number parsing performance by 28-32%
2018-02-27 14:19:35 -08:00
Paween Itthipalkul
d3d39d47d5 Made changes from PR review 2018-02-21 15:15:57 -08:00
Paween Itthipalkul
18b48c90f5 Fixed isNan from comparing NSNotFound with length to location 2018-02-21 14:40:05 -08:00
Paween Itthipalkul
4d6b867ae2 Add SHORT_NUMBER_SUPPORT define when initializing _shortNumberMetadataCache 2018-02-20 13:27:33 -08:00
Paween Itthipalkul
47f20db73d Updated PR to respond to review comments
- Removed NSLog in NBPhoneNumberParsingPerfTest
- Converted isNan from a method to a function.
- isNan is now only checking for integer value instead of a float, as the intended use for the function is to remove non-geological calling code, which can only be an integer.
2018-02-20 11:26:43 -08:00
Paween Itthipalkul
59b9a629c3 New JSON metadata generator
New JSON metadata generator that can be run directly from command line (using `swift` command) without any dependencies — however, currently, this must be run on the Mac.

This generator pulls in metadata, metadata for testing, and short number metadata directly from the latest commit on canonical libPhoneNumber GitHub repo.
2018-02-16 17:42:47 -08:00
Frank
6781d23491
Merge pull request #228 from paween/newMetadata
Updated short number/emergency number metadata
2018-02-16 16:46:32 -08:00
Paween Itthipalkul
75aedc6757 Updated short number/emergency number metadata 2018-02-16 16:15:37 -08:00
Paween Itthipalkul
e6592fe801 Improve phone number parsing performance ~10-15%
Improve phone number parsing performance by:
- Using NSCache to cache metadata, so when parsing phone numbers from different regions, the metadata cache is still going to be valid.
- Improve various methods in NBPhoneNumberUtil by removing redundant operations, or using a different construct that’s more performant (such as using NSCharacterSet instead of NSScanner to check if a string is a number).

Also added a performance test that reads sample phone numbers from the metadata, and parse them.

Performance improvement result:
Machine:
Mac Pro (Late 2013)
2.7 GHz. 12-Core Intel Xeon E5
64 GB 1866 MHz DDR3
macOS High Sierra 10.13.3

Phone number to parse count: 2688

Baseline (5 runs -- in seconds):
0.362
0.372
0.385
0.363
0.365

After Change (5 runs -- in seconds):
0.312 (14% faster)
0.315 (13% faster)
0.317 (12% faster)
0.327 (10% faster)
0.308 (15% faster)
2018-02-16 15:51:16 -08:00
Paween Itthipalkul
b0f3a6bcec Improve phone number parsing performance ~10-15%
Improve phone number parsing performance by:
- Using NSCache to cache metadata, so when parsing phone numbers from different regions, the metadata cache is still going to be valid.
- Improve various methods in NBPhoneNumberUtil by removing redundant operations, or using a different construct that’s more performant (such as using NSCharacterSet instead of NSScanner to check if a string is a number).

Also added a performance test that reads sample phone numbers from the metadata, and parse them.

Performance improvement result:
Machine:
Mac Pro (Late 2013)
2.7 GHz. 12-Core Intel Xeon E5
64 GB 1866 MHz DDR3
macOS High Sierra 10.13.3

Phone number to parse count: 2688

Baseline (5 runs -- in seconds):
0.362
0.372
0.385
0.363
0.365

After Change (5 runs -- in seconds):
0.312 (14% faster)
0.315 (13% faster)
0.317 (12% faster)
0.327 (10% faster)
0.308 (15% faster)
2018-02-16 15:48:30 -08:00
Paween Itthipalkul
d2e0056f36 Improve phone number parsing performance ~10-14%
Improve phone number parsing performance by:
- Using NSCache to cache metadata, so when parsing phone numbers from different regions, the metadata cache is still going to be valid.
- Improve various methods in NBPhoneNumberUtil by removing redundant operations, or using a different construct that’s more performant (such as using NSCharacterSet instead of NSScanner to check if a string is a number).

Also added a performance test that reads sample phone numbers from the metadata, and parse them.

Performance improvement result:
Machine:
Mac Pro (Late 2013)
2.7 GHz. 12-Core Intel Xeon E5
64 GB 1866 MHz DDR3
macOS High Sierra 10.13.3

Phone number to parse count: 2688

Baseline (5 runs -- in seconds):
0.362
0.372
0.385
0.363
0.365

After Change (5 runs -- in seconds):
Serial Parsing:
0.312 (14% faster)
0.315 (13% faster)
0.317 (12% faster)
0.327 (10% faster)
0.317 (12% faster)
2018-02-16 14:47:15 -08:00
dmaclach
c9fec5c606
Merge pull request #220 from paween/shortNumber
Add support for short number and emegerncy number in libPhoneNumber-iOS
2018-01-30 10:34:45 -08:00
Paween Itthipalkul
13479163c8 Polish NBRegularExpressionCache/NBMetadataHelper
- Add NSError ** parameter to -[NBRegularExpressionCache regularExpressionForPattern:error] method.
- Consolidating the expansion of gzipped data into one method.
2018-01-19 11:08:12 -08:00
iziz
41385e341c Update podspec version to 0.9.13 2017-12-19 08:37:53 +09:00
iziz
1bab2b07be Update metadata from "7bbeabda0791b19a3f3c0d672cff622415874a8a [7bbeabd]" 2017-12-19 08:33:26 +09:00
Paween Itthipalkul
a3cc1b1b7f Remove NBPhoneNumberUtil+Category 2017-12-18 12:59:36 -08:00
Paween Itthipalkul
b590e9098a Merge branch 'master' of https://github.com/paween/libPhoneNumber-iOS into shortNumber 2017-12-18 12:58:11 -08:00
Paween Itthipalkul
c2a70f7187 Merge branch 'shortNumber' of https://github.com/paween/libPhoneNumber-iOS into shortNumber
# Conflicts:
#	libPhoneNumber.xcodeproj/project.pbxproj
#	libPhoneNumber/Internal/NBRegExMatcher.m
#	libPhoneNumber/Internal/NBRegularExpressionCache.m
#	libPhoneNumber/NBPhoneMetaData.h
#	libPhoneNumber/NBPhoneMetaData.m
#	libPhoneNumber/NBPhoneNumberUtil+ShortNumber.m
#	libPhoneNumber/NBPhoneNumberUtil.m
#	libPhoneNumberTests/NBPhoneNumberUtil+ShortNumberTestHelper.m
2017-12-18 12:52:49 -08:00
Paween Itthipalkul
0c3e4566b7 Made changes according to code review
- Removed NBPhoneNumberUtil+Category
2017-12-18 12:46:02 -08:00
Paween Itthipalkul
c6fde0103c Add support for short number and emegerncy number in libPhoneNumber-iOS
This is a port of ShortNumberInfo class from Java version of libPhoneNumber into a category on NBPhoneNumberUtil class
2017-12-18 12:45:33 -08:00
Paween Itthipalkul
79bb46ba89 Add support for short number and emegerncy number in libPhoneNumber-iOS
This is a port of ShortNumberInfo class from Java version of libPhoneNumber into a category on NBPhoneNumberUtil class
2017-12-18 12:44:14 -08:00
dmaclach
10d200e781
Merge pull request #222 from paween/xctoolChange
Updated .travis.yml to use the latest actions to run tests with xctool
2017-12-18 11:54:16 -08:00
Paween Itthipalkul
58f7b15ea2 Updated .travis.yml to use the latest supported action to run tests with xctool 2017-12-18 10:20:22 -08:00
dmaclach
31c3ae2ede
Merge pull request #218 from iziz/formatting
Standardize formatting across project
2017-12-16 12:44:18 -08:00
Paween Itthipalkul
b8b391c69a Update .travis.yml to clean and build the project before running tests 2017-12-15 14:21:54 -08:00
Paween Itthipalkul
9132e8baf9 Updated .travis.yml to use the latest supported action to run tests with xctool 2017-12-08 12:55:21 -08:00