Giter Club home page Giter Club logo

libpq.framework's Introduction

libpq.framework for iOS 11

An XCode project to compile your own libpq.framework for iOS 11.x

libpq is a set of library functions that allow client programs to pass queries to the PostgreSQL backend database server and to receive the results of these sql queries.

This repository allows you to easily create a libpq.framework to use in your iOS applications.

Getting Started

libpq.framework has no external dependencies apart from libssl.a and libcrypto.a from OpenSSL, which we download and compile by using the build-libssl.sh script so that you can be sure you are downloading it from the official OpenSSL repository. So getting started is easy:

  • Install Git and the latest Xcode with the iOS 11.x SDK.

  • Make sure that xcode-select points to the correct location by running:

    sudo /usr/bin/xcode-select --switch /Applications/Xcode.app/Contents/Developer

  • Fork this repo from GitHub:

    git clone git://github.com/spacialdb/libpq.framwework.git

  • Run the script to download and compile OpenSSL:

    ./build-libssl.sh

  • Open libpq.xcodeproj with XCode and build the framework.

Download precompiled Framework

You can also download a precompiled libpq.framework from: libpq.framework.zip

Usage

Drop the framework into your project's Navigator and don't forget to copy it to your project, and you should be ready to go. See libpq's example programs for sample code. In general for Objective-C one would need to do something like:

#import <libpq/libpq-fe.h>

const char *_connectionString;
...
PGconn *_pgconn = PQconnectdb(_connectionString);
if (PQstatus(_pgconn) != CONNECTION_OK) {
    ...
}

PGresult *res = PQexec(_pgconn, "BEGIN");
if (PQresultStatus(res) != PGRES_TUPLES_OK) {
    ...
}
PQclear(res);
...

PQfinish(_pgconn);

Licenses

PostgreSQL is released under the PostgreSQL License, a liberal Open Source license, similar to the BSD or MIT licenses. See the COPYRIGHT.PostgreSQL file.

The OpenSSL toolkit stays under a dual license, i.e. both the conditions of the OpenSSL License and the original SSLeay License apply to the toolkit. See the LICENSE.OpenSSL file for the actual license texts.

This work itself uses Felix Schulze's build-libssl.sh script from the OpenSSL-for-iPhone project and Jeff Verkoeyen's iOS-Framework; and is licensed under the MIT license. See the LICENSE file for the details.

libpq.framework's People

Contributors

kashif avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libpq.framework's Issues

XCode 8.1 and iOS 10

Hello

I would like to know how to work libpq.framework with iOS 10 and the latest XCode available

Dario

Build for OS X?

Hi,

First, thanks so much for creating this project and for releasing it! :-)

I'd like to use libpq.framework for a Mac OS X project. Can you give me some hints as to what I need to change in libpq.framework to do that? I'd be happy to make the changes on a branch of libpq.framework and submit a pull request to release it for OS X if you'd be interested in including a Mac version of the library. I'm happy to do all of the work if you can give me some suggestions of what I might need to change.

Thanks!

trouble building

Howdy,

I had a little trouble building with the current version of Xcode but I managed to get it to work.

  • build-libssl.sh failed (and I don't remember the reason now), so I updated it to the latest version
  • The Prepare Framework shell script failed when trying to copy the headers.

I fixed it by changing:

cp -a "${BUILT_PRODUCTS_DIR}/${PUBLIC_HEADERS_FOLDER_PATH}/" "${BUILT_PRODUCTS_DIR}/libpq.framework/Versions/${FRAMEWORK_VERSION}/Headers"

to

cp -a "${TARGET_BUILD_DIR}/${PUBLIC_HEADERS_FOLDER_PATH}/" "${BUILT_PRODUCTS_DIR}/libpq.framework/Versions/${FRAMEWORK_VERSION}/Headers"

Note the change to TARGET_BUILD_DIR

build-libssl.sh stops a "Please stand by..." (!!)

Great work - and thanks for this very interesting project. Am trying to build - first, using your build-libssl script - under Xcode 4.6 / for Simulator 6.0. Stops as above with no further message. Hmm.. Have done this before successfully, on another machine...

Overly big pre-built framework

I've noticed that the pre-built framework is about 50MB uncompressed, 19MB compressed, and it's because the multiple versions within are actual copies, not symbolic links.

XCode 9 and iOS 11

hi

i precise use iOS 11 with libpq.framework for support 64 bits

you help me ?

thanks

dario

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.