Code Monkey home page Code Monkey logo

Comments (1)

iziz avatar iziz commented on August 29, 2024

I don't know why (so i'll remove that plist file future)
But i have some solution, see below.

[SOLUTION? 1]
HI even i am facing the same issue. i tracked the work flow to NSKeyedUnarchiver unarchiveObjectWithData:fileData] and i checked the value of file fileData its nearly .4mb so the file and its contents data are definitely getting there .

Apparently NSKeyedUnarchiver unarchiveObjectWithData: has bugs.

http://stackoverflow.com/questions/1352001/nskeyedunarchiver-unarchiveobjectwithfile-returns-nil-in-init-method

by suds89 (https://github.com/suds89)

[SOLUTION? 2]
I've struggled with this exact issue for a while too, and figured that unarchiving worked properly on the emulator, but not on the device.

I noticed that the byte size of the fileData differed:
180085 on device and 496050 on the emulator, so while having incomplete data the unarchiving obviously cannot work properly.

The solution is to make sure to place the NBPhoneNumberMetadata.plist not just into the Resources folder, but actually into the Supporting Files folder and then do a clean on the project, rebuild and run it.
Works like a charm! :-)

by irinutze (https://github.com/irinutze)

from libphonenumber-ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.