A library to handle Apple Property List format in binary or XML

Overview

libplist

A small portable C library to handle Apple Property List files in binary or XML format.

Features

The project provides an interface to read and write plist files in binary or XML format alongside a command-line utility named plistutil.

Some key features are:

  • Formats: Supports binary and XML format
  • Utility: Provides a plistutil utility for the command-line
  • Python: Provides Cython based bindings for Python
  • Tested: Uses fuzzing and data compliance tests
  • Efficient: Lean library with performance and resources in mind

Installation / Getting started

Debian / Ubuntu Linux

First install all required dependencies and build tools:

sudo apt-get install \
	build-essential \
	checkinstall \
	git \
	autoconf \
	automake \
	libtool-bin

If you want to optionally build the documentation or Python bindings use:

sudo apt-get install \
	doxygen \
	cython

Then clone the actual project repository:

git clone https://github.com/libimobiledevice/libplist.git
cd libplist

Now you can build and install it:

./autogen.sh
make
sudo make install

Usage

Then simply run:

plistutil -i foobar.plist -o output.plist

This converts the foobar.plist file to the opposite format, e.g. binary to XML or vice versa, and outputs it to the output.plist file.

Please consult the usage information or manual page for a full documentation of available command line options:

plistutil --help
man plistutil

Contributing

We welcome contributions from anyone and are grateful for every pull request!

If you'd like to contribute, please fork the master branch, change, commit and send a pull request for review. Once approved it can be merged into the main code base.

If you plan to contribute larger changes or a major refactoring, please create a ticket first to discuss the idea upfront to ensure less effort for everyone.

Please make sure your contribution adheres to:

  • Try to follow the code style of the project
  • Commit messages should describe the change well without being too short
  • Try to split larger changes into individual commits of a common domain
  • Use your real name and a valid email address for your commits

We are still working on the guidelines so bear with us!

Links

License

This project is licensed under the GNU Lesser General Public License v2.1, also included in the repository in the COPYING file.

Credits

Apple, iPhone, iPad, iPod, iPod Touch, Apple TV, Apple Watch, Mac, iOS, iPadOS, tvOS, watchOS, and macOS are trademarks of Apple Inc.

This project is an independent software library and has not been authorized, sponsored, or otherwise approved by Apple Inc.

README Updated on: 2020-06-12

Comments
  • Testsuite failures on Linux sparc64 (Bus error)

    Testsuite failures on Linux sparc64 (Bus error)

    The testsuite fails on Linux sparc64 machines due to bus errors:

    Making check in test
    make[2]: Entering directory '/<<PKGBUILDDIR>>/test'
    make  check-TESTS
    make[3]: Entering directory '/<<PKGBUILDDIR>>/test'
    make[4]: Entering directory '/<<PKGBUILDDIR>>/test'
    FAIL: empty.test
    FAIL: small.test
    FAIL: medium.test
    FAIL: large.test
    FAIL: huge.test
    PASS: bigarray.test
    FAIL: emptycmp.test
    FAIL: smallcmp.test
    FAIL: mediumcmp.test
    FAIL: largecmp.test
    FAIL: hugecmp.test
    PASS: bigarraycmp.test
    FAIL: dates.test
    FAIL: timezone1.test
    FAIL: timezone2.test
    PASS: signedunsigned1.test
    PASS: signedunsigned2.test
    PASS: signedunsigned3.test
    PASS: hex.test
    PASS: order.test
    PASS: recursion.test
    FAIL: entities.test
    PASS: empty_keys.test
    PASS: amp.test
    PASS: invalid_tag.test
    PASS: cdata.test
    PASS: offsetsize.test
    PASS: refsize.test
    PASS: malformed_dict.test
    =========================================
       libplist 2.0.0: test/test-suite.log
    =========================================
    
    # TOTAL: 29
    # PASS:  15
    # SKIP:  0
    # XFAIL: 0
    # FAIL:  14
    # XPASS: 0
    # ERROR: 0
    
    .. contents:: :depth: 2
    
    FAIL: empty
    ===========
    
    ./empty.test: line 11:  7023 Bus error               $top_builddir/test/plist_test $DATASRC/$TESTFILE $DATAOUT/$TESTFILE.out
    FAIL empty.test (exit status: 138)
    
    FAIL: small
    ===========
    
    ./small.test: line 11:  7043 Bus error               $top_builddir/test/plist_test $DATASRC/$TESTFILE $DATAOUT/$TESTFILE.out
    FAIL small.test (exit status: 138)
    
    FAIL: medium
    ============
    
    ./medium.test: line 11:  7063 Bus error               $top_builddir/test/plist_test $DATASRC/$TESTFILE $DATAOUT/$TESTFILE.out
    FAIL medium.test (exit status: 138)
    
    FAIL: large
    ===========
    
    ./large.test: line 11:  7083 Bus error               $top_builddir/test/plist_test $DATASRC/$TESTFILE $DATAOUT/$TESTFILE.out
    FAIL large.test (exit status: 138)
    
    FAIL: huge
    ==========
    
    ./huge.test: line 11:  7103 Bus error               $top_builddir/test/plist_test $DATASRC/$TESTFILE $DATAOUT/$TESTFILE.out
    FAIL huge.test (exit status: 138)
    
    FAIL: emptycmp
    ==============
    
    File does not exists
    FAIL emptycmp.test (exit status: 2)
    
    FAIL: smallcmp
    ==============
    
    File does not exists
    FAIL smallcmp.test (exit status: 2)
    
    FAIL: mediumcmp
    ===============
    
    File does not exists
    FAIL mediumcmp.test (exit status: 2)
    
    FAIL: largecmp
    ==============
    
    File does not exists
    FAIL largecmp.test (exit status: 2)
    
    FAIL: hugecmp
    =============
    
    File does not exists
    FAIL hugecmp.test (exit status: 2)
    
    FAIL: dates
    ===========
    
    ./dates.test: line 12:  7313 Bus error               $top_builddir/tools/plistutil -i $DATAOUT0 -o $DATAOUT1
    FAIL dates.test (exit status: 138)
    
    FAIL: timezone1
    ===============
    
    ./timezone1.test: line 16:  7375 Bus error               $top_builddir/test/plist_cmp $DATAOUT0 $DATAOUT1
    FAIL timezone1.test (exit status: 138)
    
    FAIL: timezone2
    ===============
    
    ./timezone2.test: line 15:  7409 Bus error               TZ=UTC $top_builddir/tools/plistutil -i $DATAOUT0 -o $DATAOUT1
    FAIL timezone2.test (exit status: 138)
    
    FAIL: entities
    ==============
    
    ./entities.test: line 12:  7639 Bus error               $top_builddir/test/plist_cmp $DATAIN0 $DATAOUT0
    FAIL entities.test (exit status: 138)
    
    ============================================================================
    Testsuite summary for libplist 2.0.0
    ============================================================================
    # TOTAL: 29
    # PASS:  15
    # SKIP:  0
    # XFAIL: 0
    # FAIL:  14
    # XPASS: 0
    # ERROR: 0
    ============================================================================
    See test/test-suite.log
    Please report to https://github.com/libimobiledevice/libplist/issues
    ============================================================================
    make[4]: *** [Makefile:772: test-suite.log] Error 1
    make[4]: Leaving directory '/<<PKGBUILDDIR>>/test'
    make[3]: *** [Makefile:880: check-TESTS] Error 2
    make[3]: Leaving directory '/<<PKGBUILDDIR>>/test'
    make[2]: *** [Makefile:943: check-am] Error 2
    make[2]: Leaving directory '/<<PKGBUILDDIR>>/test'
    make[1]: *** [Makefile:438: check-recursive] Error 1
    make[1]: Leaving directory '/<<PKGBUILDDIR>>'```
    
    This is usually a result of unaligned access. I'll provide a gdb backtrace later.
    opened by glaubitz 13
  • Latest libplist does not link properly

    Latest libplist does not link properly

    Latest libplist does not link properly

    The following error occurs:

    ../src/.libs/libplist.so: undefined reference to `fmin'

    (Tested with Ubuntu 18.04)

    Should libplist link against libm as well?

    opened by pekn 12
  • Not compiling on Mac OS X 10.9 Mavericks

    Not compiling on Mac OS X 10.9 Mavericks

    It stops here: [ 44%] Building CXX object src/CMakeFiles/plist++.dir/Dictionary.cpp.o /Volumes/HDD/Downloads/libplist-1.8/build/libplist/src/Dictionary.cpp:154:12: error: no matching conversion for functional-style cast from 'long' to 'iterator' (aka '__map_iterator') return iterator(NULL); ^~~~~~~~~~~~~ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/map:539:24: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'long' to 'const std::__1::__map_iteratorstd::__1::__tree_iterator<std::__1::pair<std::__1::basic_string<char, PList::Node _>, std::__1::__tree_nodestd::__1::pair<std::__1::basic_string<char, PList::Node *>, void *> *, long> >' for 1st argument class _LIBCPP_TYPE_VIS __map_iterator ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/map:563:5: note: candidate constructor not viable: no known conversion from 'long' to 'std::__1::__tree_iteratorstd::__1::pair<std::__1::basic_string<char, PList::Node *>, std::__1::__tree_nodestd::__1::pair<std::__1::basic_string<char, PList::Node *>, void *> *, long>' for 1st argument __map_iterator(_TreeIterator __i) _NOEXCEPT : _i(__i) {} ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/map:560:5: note: candidate constructor not viable: requires 0 arguments, but 1 was provided __map_iterator() NOEXCEPT {} ^ 1 error generated. make[2]: ** [src/CMakeFiles/plist++.dir/Dictionary.cpp.o] Error 1 make[1]: *** [src/CMakeFiles/plist++.dir/all] Error 2 make: *** [all] Error 2

    bug 
    opened by jerrykil 11
  • fail to build use android-ndk-r13b

    fail to build use android-ndk-r13b

    i use following command to build libplist for android(ndk-r13b)

    ./autogen.sh --host=arm-linux-androideabi
    

    but the configure command fail since it can not find pthread_once

    checking for pthread_once in -lpthread... no
    configure: error: pthread with pthread_once required to build libplist
    

    here is the complete output message:

    libtoolize: putting auxiliary files in '.'.
    libtoolize: linking file './ltmain.sh'
    libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
    libtoolize: linking file 'm4/libtool.m4'
    libtoolize: linking file 'm4/ltoptions.m4'
    libtoolize: linking file 'm4/ltsugar.m4'
    libtoolize: linking file 'm4/ltversion.m4'
    libtoolize: linking file 'm4/lt~obsolete.m4'
    configure.ac:23: installing './compile'
    configure.ac:6: installing './missing'
    cython/Makefile.am: installing './depcomp'
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for arm-linux-androideabi-strip... arm-linux-androideabi-strip
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking whether make supports nested variables... (cached) yes
    checking for arm-linux-androideabi-gcc... arm-linux-androideabi-gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... yes
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether arm-linux-androideabi-gcc accepts -g... yes
    checking for arm-linux-androideabi-gcc option to accept ISO C89... none needed
    checking whether arm-linux-androideabi-gcc understands -c and -o together... yes
    checking for style of include used by make... GNU
    checking dependency style of arm-linux-androideabi-gcc... gcc3
    checking for arm-linux-androideabi-g++... arm-linux-androideabi-g++
    checking whether we are using the GNU C++ compiler... yes
    checking whether arm-linux-androideabi-g++ accepts -g... yes
    checking dependency style of arm-linux-androideabi-g++... gcc3
    checking whether arm-linux-androideabi-g++ is available and compiles a program... yes
    checking build system type... x86_64-pc-linux-gnu
    checking host system type... arm-unknown-linux-androideabi
    checking how to print strings... printf
    checking for a sed that does not truncate output... /bin/sed
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for fgrep... /bin/grep -F
    checking for ld used by arm-linux-androideabi-gcc... /home/guorongfei/Android/standalone-toolchains/android-toolchain-arm/arm-linux-androideabi/bin/ld
    checking if the linker (/home/guorongfei/Android/standalone-toolchains/android-toolchain-arm/arm-linux-androideabi/bin/ld) is GNU ld... yes
    checking for BSD- or MS-compatible name lister (nm)... /home/guorongfei/Android/standalone-toolchains/android-toolchain-arm/bin//arm-linux-androideabi-nm -B
    checking the name lister (/home/guorongfei/Android/standalone-toolchains/android-toolchain-arm/bin//arm-linux-androideabi-nm -B) interface... BSD nm
    checking whether ln -s works... yes
    checking the maximum length of command line arguments... 1572864
    checking how to convert x86_64-pc-linux-gnu file names to arm-unknown-linux-androideabi format... func_convert_file_noop
    checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
    checking for /home/guorongfei/Android/standalone-toolchains/android-toolchain-arm/arm-linux-androideabi/bin/ld option to reload object files... -r
    checking for arm-linux-androideabi-objdump... arm-linux-androideabi-objdump
    checking how to recognize dependent libraries... pass_all
    checking for arm-linux-androideabi-dlltool... no
    checking for dlltool... no
    checking how to associate runtime and link libraries... printf %s\n
    checking for arm-linux-androideabi-ar... arm-linux-androideabi-ar
    checking for archiver @FILE support... @
    checking for arm-linux-androideabi-strip... (cached) arm-linux-androideabi-strip
    checking for arm-linux-androideabi-ranlib... arm-linux-androideabi-ranlib
    checking command to parse /home/guorongfei/Android/standalone-toolchains/android-toolchain-arm/bin//arm-linux-androideabi-nm -B output from arm-linux-androideabi-gcc object... ok
    checking for sysroot... no
    checking for a working dd... /bin/dd
    checking how to truncate binary pipes... /bin/dd bs=4096 count=1
    checking for arm-linux-androideabi-mt... no
    checking for mt... mt
    configure: WARNING: using cross tools not prefixed with host triplet
    checking if mt is a manifest tool... no
    checking how to run the C preprocessor... arm-linux-androideabi-gcc -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for dlfcn.h... yes
    checking for objdir... .libs
    checking if arm-linux-androideabi-gcc supports -fno-rtti -fno-exceptions... no
    checking for arm-linux-androideabi-gcc option to produce PIC... -fPIC -DPIC
    checking if arm-linux-androideabi-gcc PIC flag -fPIC -DPIC works... yes
    checking if arm-linux-androideabi-gcc static flag -static works... yes
    checking if arm-linux-androideabi-gcc supports -c -o file.o... yes
    checking if arm-linux-androideabi-gcc supports -c -o file.o... (cached) yes
    checking whether the arm-linux-androideabi-gcc linker (/home/guorongfei/Android/standalone-toolchains/android-toolchain-arm/arm-linux-androideabi/bin/ld) supports shared libraries... yes
    checking whether -lc should be explicitly linked in... no
    checking dynamic linker characteristics... Android linker
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... yes
    checking how to run the C++ preprocessor... arm-linux-androideabi-g++ -E
    checking for ld used by arm-linux-androideabi-g++... /home/guorongfei/Android/standalone-toolchains/android-toolchain-arm/arm-linux-androideabi/bin/ld
    checking if the linker (/home/guorongfei/Android/standalone-toolchains/android-toolchain-arm/arm-linux-androideabi/bin/ld) is GNU ld... yes
    checking whether the arm-linux-androideabi-g++ linker (/home/guorongfei/Android/standalone-toolchains/android-toolchain-arm/arm-linux-androideabi/bin/ld) supports shared libraries... yes
    checking for arm-linux-androideabi-g++ option to produce PIC... -fPIC -DPIC
    checking if arm-linux-androideabi-g++ PIC flag -fPIC -DPIC works... yes
    checking if arm-linux-androideabi-g++ static flag -static works... yes
    checking if arm-linux-androideabi-g++ supports -c -o file.o... yes
    checking if arm-linux-androideabi-g++ supports -c -o file.o... (cached) yes
    checking whether the arm-linux-androideabi-g++ linker (/home/guorongfei/Android/standalone-toolchains/android-toolchain-arm/arm-linux-androideabi/bin/ld) supports shared libraries... yes
    checking dynamic linker characteristics... Android linker
    checking how to hardcode library paths into programs... immediate
    checking for ANSI C header files... (cached) yes
    checking for stdint.h... (cached) yes
    checking for stdlib.h... (cached) yes
    checking for string.h... (cached) yes
    checking for an ANSI C-conforming const... yes
    checking for size_t... yes
    checking for ssize_t... yes
    checking for uint16_t... yes
    checking for uint32_t... yes
    checking for uint8_t... yes
    checking for asprintf... yes
    checking for strcasecmp... yes
    checking for strdup... yes
    checking for strerror... yes
    checking for strndup... yes
    checking for stpcpy... yes
    checking for vasprintf... yes
    checking for gmtime_r... yes
    checking for localtime_r... yes
    checking for timegm... yes
    checking for strptime... yes
    checking whether byte ordering is bigendian... no
    checking wether we need platform-specific build settings... yes
    checking whether arm-linux-androideabi-gcc is Clang... no
    checking whether pthreads work with -pthread... yes
    checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
    checking whether more special flags are required for pthreads... no
    checking for PTHREAD_PRIO_INHERIT... no
    checking for pthread_once in -lpthread... no
    configure: error: pthread with pthread_once required to build libplist
    

    i also tried to build following dummy code use arm-linux-androideabi-gcc

    #include <pthread.h>
    
    static pthread_once_t once_control = PTHREAD_ONCE_INIT;
    
    void dummy() { }
    
    int main(void)
    {
        pthread_once(&once_control, dummy);
        return 0;
    }
    

    it works.

    Any help would be appreciated

    opened by zhaohuaxishi 10
  • Parsing dates depends on timezone and, specifically, on Daylight Saving Time

    Parsing dates depends on timezone and, specifically, on Daylight Saving Time

    I see issues when parsing XML to plist_node. The issue is that when it comes to parsing date value, it adds unnecessary 1 hour shift for my current timezone.

    I use this XML to import:

    <?xml version=""1.0"" encoding=""UTF-8""?>
    <!DOCTYPE plist PUBLIC ""-//Apple//DTD PLIST 1.0//EN"" ""http://www.apple.com/DTDs/PropertyList-1.0.dtd"">
    <plist version=""1.0"">
    <dict>
        <key>Last Backup Date</key>
        <date>2016-04-06T10:16:17Z</date>
    </dict>
    </plist>
    

    After loading it via plist_from_xml, after getting the key Last Backup Date and converting it to string value, I see the value of 2016-04-06 11:16:17, which is 1 hour more than I expect to see.

    I think the issue is in this line. GMT is not UTC, and it can have daylight saving time, hence the error.

    opened by kosmakoff 9
  • Add Visual C++ support

    Add Visual C++ support

    Hi,

    This pull request adds support for Microsoft Visual C++ in libplist.

    It only includes changes in the .h and .c files; the actual project files are not included to keep the libplist repository clean.

    A lot of the changes are minor; for example, VC++ is more picky about implicit casts so a lot of cast statements have been added. Similarly, if the declaration in the .h and .c file differ, VC++ complains. Hence a lot of PLIST_API_MSC statements have been added in the .h files.

    Care has been taken to make sure that VC++ -specific statements are wrapped in an #ifdef _MVC_VER statement, so that they won't interfere with other compilers on the Windows platform.

    I used Travis as a CI server in the upstream repository, to verify compilation still works on the Linux platform. It did, and you can see the result here: https://travis-ci.org/libimobiledevice-win32/libplist/builds/59121180 The upstream repository also contains a sample .travis.yml file that you could use if you wanted CI; it is not included in this pull request.

    Similarly, I also tested on a Windows machine using AppVeyor and you can see the results here: https://ci.appveyor.com/project/qmfrederik/libplist/

    All feedback is welcome,

    Frederik.

    enhancement Windows 
    opened by qmfrederik 9
  • plist_from_bin plist_to_xml  time is not accurate

    plist_from_bin plist_to_xml time is not accurate

    plist_from_bin plist_to_xml date time is not accurate

    and plist_from_xml plist_to_bin date time is not accurate

    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////

    plist_from_bin get date val = 419855442 = 1983 4 22 pm 6:30:42

    but the correct value is 1398133842 = 2014 04 22 am 10:30:42

    1398133842 - 419855442 = 978278400

    My English is very bad -.-

    bug question 
    opened by xdeng 9
  • Cannot 'make'

    Cannot 'make'

    I'm having errors while doing 'sudo make'

    a lot warnings about shadowed declarations

    and 2 errors: make[2]: *** [xplist.lo] Error 1 make[1]: ** [all-recursive] Error 1 make: *** [all] Error 2

    Anyone has any idea how to fix this?

    cheers!

    question 
    opened by dnsBlah 9
  • heap-buffer-overflow in parse_dict_node

    heap-buffer-overflow in parse_dict_node

    ==31012== ERROR: AddressSanitizer: heap-buffer-overflow on address 0xb5802c1a at pc 0x80679a0 bp 0xbffd9648 sp 0xbffd963c
    READ of size 1 at 0xb5802c1a thread T0
        #0 0x806799f in parse_array_node /home/b/asan/libplist/src/bplist.c:490
        #1 0x806799f in parse_bin_node /home/b/asan/libplist/src/bplist.c:645
        #2 0x806a0f3 in parse_bin_node_at_index /home/b/asan/libplist/src/bplist.c:703
        #3 0x806b09e in plist_from_bin /home/b/asan/libplist/src/bplist.c:767
        #4 0x804a1c4 in main /home/b/asan/libplist/tools/plistutil.c:139
        #5 0xb600ba82 (/lib/i386-linux-gnu/libc.so.6+0x19a82)
        #6 0x804ad45 in _start (/home/b/asan/libplist/tools/plistutil+0x804ad45)
    0xb5802c1a is located 34 bytes to the right of 104-byte region [0xb5802b90,0xb5802bf8)
    allocated by thread T0 here:
        #0 0xb61d3854 (/usr/lib/i386-linux-gnu/libasan.so.0+0x16854)
        #1 0x80497ae in main /home/b/asan/libplist/tools/plistutil.c:132
        #2 0xb600ba82 (/lib/i386-linux-gnu/libc.so.6+0x19a82)
    SUMMARY: AddressSanitizer: heap-buffer-overflow /home/b/asan/libplist/src/bplist.c:453 parse_dict_node
    

    poc17.txt

    opened by zhunki 8
  • Trouble building OS X 10.7.5

    Trouble building OS X 10.7.5

    Trying to build in order to satisfy dependencies for libirecovery. This is the result:

    Davids-Mac-Pro:libplist davidgn$ sudo ./autogen.sh glibtoolize: putting macros in AC_CONFIG_MACRO_DIR, m4'. glibtoolize: linking filem4/libtool.m4' glibtoolize: linking file m4/ltoptions.m4' glibtoolize: linking filem4/ltsugar.m4' glibtoolize: linking file m4/ltversion.m4' glibtoolize: linking filem4/lt~obsolete.m4' checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... ./../install-sh -c -d checking for gawk... no checking for mawk... no checking for nawk... no checking for awk... awk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether make supports nested variables... (cached) yes checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking dependency style of g++... gcc3 checking build system type... x86_64-apple-darwin11.4.2 checking host system type... x86_64-apple-darwin11.4.2 checking how to print strings... printf checking for a sed that does not truncate output... /usr/bin/sed checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for fgrep... /usr/bin/grep -F checking for ld used by gcc... /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld checking if the linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) is GNU ld... no checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm checking the name lister (/usr/bin/nm) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 196608 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking how to convert x86_64-apple-darwin11.4.2 file names to x86_64-apple-darwin11.4.2 format... func_convert_file_noop checking how to convert x86_64-apple-darwin11.4.2 file names to toolchain format... func_convert_file_noop checking for /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld option to reload object files... -r checking for objdump... no checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... no checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm output from gcc object... ok checking for sysroot... no checking for mt... no checking if : is a manifest tool... no checking for dsymutil... dsymutil checking for nmedit... nmedit checking for lipo... lipo checking for otool... otool checking for otool64... no checking for -single_module linker flag... yes checking for -exported_symbols_list linker flag... yes checking for -force_load linker flag... yes checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fno-common -DPIC checking if gcc PIC flag -fno-common -DPIC works... yes checking if gcc static flag -static works... no checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) supports shared libraries... yes checking dynamic linker characteristics... darwin11.4.2 dyld checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking how to run the C++ preprocessor... g++ -E checking for ld used by g++... /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld checking if the linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) is GNU ld... no checking whether the g++ linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fno-common -DPIC checking if g++ PIC flag -fno-common -DPIC works... yes checking if g++ static flag -static works... no checking if g++ supports -c -o file.o... yes checking if g++ supports -c -o file.o... (cached) yes checking whether the g++ linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) supports shared libraries... yes checking dynamic linker characteristics... darwin11.4.2 dyld checking how to hardcode library paths into programs... immediate checking for pkg-config... /usr/local/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for libxml2... yes checking for ANSI C header files... (cached) yes checking for stdint.h... (cached) yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking for an ANSI C-conforming const... yes checking for size_t... yes checking for ssize_t... yes checking for uint16_t... yes checking for uint32_t... yes checking for uint8_t... yes checking for asprintf... yes checking for strcasecmp... yes checking for strdup... yes checking for strerror... yes checking for strndup... yes checking for stpcpy... yes checking for vasprintf... yes checking whether byte ordering is bigendian... no checking whether to enable WIN32 build settings... no checking for a Python interpreter with version >= 2.3... python checking for python... /usr/bin/python checking for python version... 2.7 checking for python platform... darwin checking for python script directory... ${prefix}/lib/python2.7/site-packages checking for python extension module directory... ${exec_prefix}/lib/python2.7/site-packages checking for cython... no configure: WARNING: cannot find 'cython' program. You should look at http://www.cython.org or install your distribution specific cython package. checking for python2.7... (cached) /usr/bin/python checking for a version of Python >= '2.1.0'... yes checking for the distutils Python package... yes checking for Python include path... -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 checking for Python library path... -L/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 -lpython2.7 checking for Python site-packages path... /Library/Python/2.7/site-packages checking python extra libraries... ('', '-ldl -framework CoreFoundation') checking python extra linking flags... -u _PyMac_Error /System/Library/Frameworks/Python.framework/Versions/2.7/Python checking consistency of all components of python development environment... yes checking for supported compiler flags... -Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter checking whether make supports nested variables... (cached) yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating libcnary/Makefile config.status: creating src/Makefile config.status: creating include/Makefile config.status: creating tools/Makefile config.status: creating cython/Makefile config.status: creating test/Makefile config.status: creating libplist.pc config.status: creating libplist++.pc config.status: creating doxygen.cfg config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands config.status: executing libtool commands

    Configuration for libplist 1.12:

    Install prefix: .........: /usr/local Python bindings .........: no

    Now type 'make' to build libplist 1.12, and then 'make install' for installation.

    Davids-Mac-Pro:libplist davidgn$ sudo make make all-recursive Making all in libcnary make[2]: Nothing to be done for `all'. Making all in src CC xplist.lo In file included from plist.h:25, from xplist.c:39: ../include/plist/plist.h:339: error: wrong number of arguments specified for 'deprecated' attribute xplist.c: In function 'new_uint_node': xplist.c:139: warning: declaration of 'uint' shadows a global declaration /usr/include/sys/types.h:92: warning: shadowed declaration is here xplist.c: In function 'node_to_xml': xplist.c:225: warning: declaration of 'time' shadows a global declaration /usr/include/time.h:133: warning: shadowed declaration is here xplist.c: In function 'xml_to_node': xplist.c:398: warning: declaration of 'time' shadows a global declaration /usr/include/time.h:133: warning: shadowed declaration is here make[2]: *** [xplist.lo] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2

    Any thoughts?

    question 
    opened by davidgn 8
  • memory allocation error

    memory allocation error

    there is a extra large memery allocation error which can be detected by addresssanitizer.

    ==31613== ERROR: AddressSanitizer failed to allocate 0x80003000 (-2147471360) bytes of LargeMmapAllocator: Cannot allocate memory
        #0 0xb61a74b2 (/usr/lib/i386-linux-gnu/libasan.so.0+0x124b2)
        #1 0xb61b00dc (/usr/lib/i386-linux-gnu/libasan.so.0+0x1b0dc)
        #2 0xb61b3093 (/usr/lib/i386-linux-gnu/libasan.so.0+0x1e093)
        #3 0xb619d2ed (/usr/lib/i386-linux-gnu/libasan.so.0+0x82ed)
        #4 0xb61ab88b (/usr/lib/i386-linux-gnu/libasan.so.0+0x1688b)
        #5 0x806b036 in plist_from_bin /home/b/asan/libplist/src/bplist.c:762
        #6 0x804a1c4 in main /home/b/asan/libplist/tools/plistutil.c:139
        #7 0xb5fe3a82 (/lib/i386-linux-gnu/libc.so.6+0x19a82)
        #8 0x804ad45 in _start (/home/b/asan/libplist/tools/plistutil+0x804ad45)
    

    the source code around here are: bplist.used_indexes = (uint32_t*)malloc(sizeof(uint32_t) * num_objects); the num_objects equals to a very large number.

    poc.txt

    opened by zhunki 7
  • How to store negative integer

    How to store negative integer

    Hello I currently work on MobileDeviceSharp a C# object oriented wrapper around libimobiledevice and there is something I don't understand. Normally integer value in Property list can be signed but you represent Integer plist node as uint64_t that is unsigned. This beaviour is reported in my C# implementation of the PlistInteger node. So what is the correct way to store signed integer property list value using this library.

    opened by mveril 0
  • Build fails with cython error?

    Build fails with cython error?

    image

    Tried building libimobiledevice-git on Manjaro, build failed. Realized that libplist-git was causing the problem. I tried to install from source using ./autogen.sh and make, but make keeps failing at the point screenshotted above.

    Thanks for your help in advance.

    I've tried changing python 3.10.7, 2.7.15, and 3.9.0, none of which have worked.

    opened by SoPat712 1
  • compiling question  .dep/node.Tpo

    compiling question .dep/node.Tpo

    Hi,

    I am trying to build the libplist library, and it emits the error

    make  all-recursive
    make[1]: Entering directory '/aufs/devsave/work/libplist'
    Making all in libcnary
    make[2]: Entering directory '/aufs/devsave/work/libplist/libcnary'
      CC       node.lo
    ../libtool: line 3375: node.c: command not found
    gcc: error: : No such file or directory
    gcc: fatal error: no input files
    compilation terminated.
    make[2]: *** [Makefile:412: node.lo] Error 1
    make[2]: Leaving directory '/aufs/devsave/work/libplist/libcnary'
    make[1]: *** [Makefile:436: all-recursive] Error 1
    make[1]: Leaving directory '/aufs/devsave/work/libplist'
    make: *** [Makefile:366: all] Error 2
    

    Modified the libcnary/makefile to turn on tracing for libtool line 228 to help debugging.

    LIBTOOL = ${SHELL} $(top_builddir)/libtool -v --debug 
    

    Rerun make and got the following

    ++ command+=' -o .libs/node.o'
    + func_show_eval_locale ' gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -Wno-strict-aliasing -fvisibility=hidden -pthread -I../libcnary/include -g -O2 -MT node.lo -MD -MP -MF .deps/node.Tpo -c ""  -fPIC -DPIC -o .libs/node.o' 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
    + set -x
    + _G_cmd=' gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -Wno-strict-aliasing -fvisibility=hidden -pthread -I../libcnary/include -g -O2 -MT node.lo -MD -MP -MF .deps/node.Tpo -c ""  -fPIC -DPIC -o .libs/node.o'
    + _G_fail_exp='test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
    + :
    + false
    + eval 'LANG=$save_LANG; 
    	     gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -Wno-strict-aliasing -fvisibility=hidden -pthread -I../libcnary/include -g -O2 -MT node.lo -MD -MP -MF .deps/node.Tpo -c ""  -fPIC -DPIC -o .libs/node.o'
    ++ LANG=en_US.UTF-8
    ++ gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -Wno-strict-aliasing -fvisibility=hidden -pthread -I../libcnary/include -g -O2 -MT node.lo -MD -MP -MF .deps/node.Tpo -c '' -fPIC -DPIC -o .libs/node.o
    gcc: error: : No such file or directory
    gcc: fatal error: no input files
    compilation terminated.
    + _G_status=1
    + eval 'LANG=C; '
    ++ LANG=C
    + test 0 -ne 1
    + eval '(exit 1); test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
    ++ exit 1
    ++ test -n ''
    ++ exit 1
    make[2]: *** [Makefile:412: node.lo] Error 1
    make[2]: Leaving directory '/aufs/devsave/work/libplist/libcnary'
    make[1]: *** [Makefile:436: all-recursive] Error 1
    make[1]: Leaving directory '/aufs/devsave/work/libplist'
    make: *** [Makefile:366: all] Error 2
    

    Checked the directories

    # ls -l ./libcnary/.libs
    total 0
    # ls -l ./libcnary/.deps
    total 8
    -rw-r--r-- 1 root root 8 Oct 14 00:40 node_list.Plo
    -rw-r--r-- 1 root root 8 Oct 14 00:40 node.Plo
    

    Did I miss a step to compile node.Tpo? Thanks in advance.

    opened by tho1 0
  • libplist fails with newer gcc.exe as the -V switch is no longer available

    libplist fails with newer gcc.exe as the -V switch is no longer available

    Building libplist on windows with msys2 shows the following error. i beleive -V is now -v

    gcc version = gcc version 9.3.0 (Rev2, Built by MSYS2 project)

    # gcc -V
    gcc.exe: error: unrecognized command line option '-V'
    gcc.exe: fatal error: no input files
    compilation terminated.
    
    configure:4249: $? = 0
    configure:4238: gcc -v >&5
    Using built-in specs.
    COLLECT_GCC=C:\msys32\mingw64\bin\gcc.exe
    COLLECT_LTO_WRAPPER=C:/msys32/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/lto-wrapper.exe
    Target: x86_64-w64-mingw32
    Configured with: ../gcc-12.2.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/include --libexecdir=/mingw64/lib --enable-bootstrap --enable-checking=release --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++,jit --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts --enable-libstdcxx-time --disable-libstdcxx-pch --enable-lto --enable-libgomp --disable-multilib --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev1, Built by MSYS2 project' --with-bugurl=https://github.com/msys2/MINGW-packages/issues --with-gnu-as --with-gnu-ld --disable-libstdcxx-debug --with-boot-ldflags=-static-libstdc++ --with-stage1-ldflags=-static-libstdc++
    Thread model: posix
    Supported LTO compression algorithms: zlib zstd
    gcc version 12.2.0 (Rev1, Built by MSYS2 project) 
    configure:4249: $? = 0
    configure:4238: gcc -V >&5
    gcc.exe: error: unrecognized command-line option '-V'
    gcc.exe: fatal error: no input files
    
    opened by rpayne381 1
  • Build fails if there's a space in the path to your current directory

    Build fails if there's a space in the path to your current directory

    Output:

    ../libtool: line 5952: cd: /Users/campbell/Documents/Command: No such file or directory
    ../libtool: line 1898: cd: .libs/libplist-2.0.lax/libcnary.a: No such file or directory
    make[2]: *** [libplist-2.0.la] Error 1
    make[1]: *** [all-recursive] Error 1
    make: *** [all] Error 2
    

    Directory was named "Command Line Tools". Renamed it so there's no space which fixes it but I'm submitting this anyway in case it's something that can be fixed.

    opened by NinjaCheetah 0
Releases(2.2.0)
  • 2.2.0(Jun 15, 2020)

    Homepage

    2.2.0 (2020-06-15)

    Maintenance release.

    Breaking

    • Rename library and all related files by adding an API version resulting in libplist-2.0 and libplist++-2.0

    Features

    • bplist: Improve recursion check performance by at least 30% for large files
    • Add new plist_val_compare(), plist_val_contains() helper functions
    • plistutil: Added ability for files to be read from stdin
    • plistutil: Added ability to specify output format
    • Add GitHub Actions integration for automatic build tests
    • plistutil: Add manual page and usage output
    • Improve README.md with project description, installation, contributing and usage sections

    Bug Fixes

    • test: Fix test suite on Windows
    • cython: Fix handling of Date nodes (MACH_EPOCH)
    • Fix/suppress several compiler warnings
    • Fix: Return NULL from plist_copy() if passed a NULL pointer instead of asserting
    • Fix removal of docs directory on make clean
    Source code(tar.gz)
    Source code(zip)
    libplist-2.2.0.tar.bz2(441.21 KB)
Owner
libimobiledevice
A cross-platform protocol library to access iOS devices
libimobiledevice
(Simple String Format) is an syntax of format and a library for parse this.

SSFMT (Simple String Format) is an syntax of format and a library for parse this. SSFMT != {fmt} SSFMT is NOT an API/library for parse {fmt} syntax !

null 2 Jan 30, 2022
Simple, cross-platform library to handle multiple mice.

ManyMouse ManyMouse's website is https://icculus.org/manymouse/ This is a simple library to abstract away the reading of multiple input devices. It is

Ryan C. Gordon 35 Dec 12, 2022
IconVG is a compact, binary format for simple vector graphics: icons, logos, glyphs and emoji.

IconVG IconVG is a compact, binary format for simple vector graphics: icons, logos, glyphs and emoji. WARNING: THIS FORMAT IS EXPERIMENTAL AND SUBJECT

Google 631 Jan 5, 2023
C++ implementation for a binary data storage format.

bsmlib- A C++ library for loading and writing binary data to and from files. bsmlib provides functions for loading, modifying, and saving BSM (Binary

Colleen 4 Oct 9, 2022
The OpenEXR project provides the specification and reference implementation of the EXR file format, the professional-grade image storage format of the motion picture industry.

OpenEXR OpenEXR provides the specification and reference implementation of the EXR file format, the professional-grade image storage format of the mot

Academy Software Foundation 1.3k Jan 6, 2023
An implementation of a weak handle interface to a packed vector in C++

Experimental handle container in C++ Overview Following on from c-handle-container, this library builds on the same ideas but supports a dynamic numbe

Tom Hulton-Harrop 13 Nov 26, 2022
A simple proxyless tool that checks if a linktr.ee handle is available.

linktree_checker A simple proxyless tool that checks if a linktr.ee handle is available. Installation Use g++ to build the program. g++ main.cpp -o li

mayhaps 1 Nov 11, 2021
Loading dbk64.sys and grabbing a handle to it

ceload A tool that allows you to manually load up CheatEngine's signed driver and get a handle to it for various kernel hacking operations. The code i

Layle | Luca 122 Jan 1, 2023
A C++ binding for the OpenGL API, generated using the gl.xml specification.

glbinding is a cross-platform C++ binding for the OpenGL API. glbinding leverages C++11 features like enum classes, lambdas, and variadic templates, i

CG Internals 758 Dec 13, 2022
XML toolkit from the GNOME project

XML toolkit from the GNOME project

GNOME Github Mirror 413 Jan 2, 2023
C Library for Apple Firmware (Amalgam)

DeviceTree Minimal code to deal with Apple's DeviceTree format. The Makefile builds dt and pmgr binaries, but you should also be able to use dt.c + dt

Hack Different 26 Sep 30, 2022
A bootloader and experimentation playground for Apple Silicon

m1n1: an experimentation playground for Apple Silicon (And to some extent a Linux bootloader) Building You need an aarch64-linux-gnu-gcc cross-compile

Asahi Linux 2.5k Dec 27, 2022
Upload arbitrary data via Apple's Find My network.

Send My Send My allows you to to upload abritrary data from devices without an internet connection by (ab)using Apple's Find My network. The data is b

Positive Security 1.5k Dec 26, 2022
Apple TV 2/3 Jailbreak

Blackb0x Apple TV 2/3 Jailbreak Untethered jailbreak tool that runs on modern versions of macOS. Devices supported: Apple TV 3,2 (A1469) (iOS 8.4.x un

null 362 Dec 30, 2022
An apple IIe emulator for the Raspberry Pi.

ApplePi "applepi" is an apple IIe emulator for the Raspberry Pi, but can be built (I think) on most Linux distributions. It runs easily on a Pi4B, and

J.B.Ward 11 Jul 31, 2022
Apple cctools and ld64 port for Linux, *BSD and macOS

Apple cctools and ld64 port for Linux, *BSD and macOS

Thomas Pöchtrager 642 Dec 30, 2022
Swift Framework for Apple Health Integration with Terra Enabling Developers LTD.

TerraSwift This library allows developers to connect to TERRA ENABLING DEVELOPERS LTD. through Swift (implemented with Swift5.0). This library uses He

null 6 Oct 14, 2022
Protobuf for Proxyman app - Include Apple Silicon & Intel architecture

Protobuf for Proxyman macOS app Protobuf for Proxyman app - Include Apple Silicon & Intel architecture How to build Open the project on the latest Xco

Proxyman 6 Nov 29, 2021
Get the current average CPU frequency on Apple M1 chips.

M1 CPU Frequency Get the current average CPU frequency on Apple M1 chips. Usage Download the precompiled binary from the releases and run it in the te

BitesPotatoBacks 20 Jan 3, 2023