Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Osx #43

Open
wants to merge 128 commits into
base: master
Choose a base branch
from
Open

Osx #43

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
35fefe5
Updated project file
Oct 21, 2016
c4f4786
Code cleanup
Oct 21, 2016
02b11a8
Renamed method to isConnected
Oct 21, 2016
ac457df
Cleaned up sample code
Oct 21, 2016
7365232
Initial attempt at type handling
Oct 21, 2016
44d3ddb
Dynamic type binding
Oct 23, 2016
2376917
Null values are handled when status = -1
Oct 23, 2016
212b146
Got bit handling working
Oct 23, 2016
fc4f6ee
Added support for integers
Oct 23, 2016
a4d3216
Added more specific int binders
Oct 23, 2016
a254230
Better way of extracting ints and longs
Oct 23, 2016
2601abe
Added support for floats
Oct 23, 2016
4c22e28
Better way of converting to bool
Oct 23, 2016
f03085d
Added support for real data type
Oct 23, 2016
1fd4e34
Updated comment
Oct 23, 2016
5976fdf
Added money conversion
Oct 23, 2016
a995cba
Updated comments
Oct 23, 2016
7bd043b
Added decimal and numeric handling
Oct 23, 2016
efa66e5
Added placeholders for NSData and UIImage
Oct 23, 2016
f842e69
Updated sizeof type for consistency
Oct 23, 2016
15b9b23
Removed unneeded line
Oct 23, 2016
d015b44
Added support for NSData and UIImage
Oct 23, 2016
af0841f
Added support for NSDate
Oct 24, 2016
e50aadd
Renamed current column variable
Oct 24, 2016
a2b2f25
Added support for uniqueidentifier
Oct 24, 2016
78da38d
Updated readme with data types
Oct 24, 2016
1e63a00
Use macro variable
Oct 24, 2016
0e98abe
Updated memory cleanup
Oct 24, 2016
f8a8fca
Renamed variables
Oct 24, 2016
5edf982
Moved methods and added pragma
Oct 24, 2016
d745831
Changed order of things
Oct 24, 2016
d9d02de
Added link to describe GUID format
Oct 24, 2016
b86198d
Changed order
Oct 24, 2016
07f86d4
Default to NSNull
Oct 24, 2016
ce8ccf5
Removed logging statements
Oct 24, 2016
b2e3d21
Clarified date types that are identified as SYBCHAR
Oct 24, 2016
ba1394a
Removed unsupported date types
Oct 24, 2016
6e7c7bd
Updated readme with new data types
Oct 24, 2016
ce8b0d1
Consolidated options
Oct 24, 2016
a4bf3ad
Fixed cleanup code
Oct 24, 2016
f7a2e2e
If not null, update value with column data
Oct 24, 2016
db87d73
Better concurrency handling
Oct 25, 2016
3612ff5
Updated comments
Oct 25, 2016
5aa5a3d
Updated handling of small and tiny int
Oct 25, 2016
221e377
Added conversion tests for integer types
Oct 25, 2016
acf95b0
Added checks when using _connection as parameter
Oct 25, 2016
0f0bdad
Added retcode check when adding command to buffer
Oct 25, 2016
da9c566
Replaced exception with parameter assert
Oct 25, 2016
12fef0e
Removed unused constant
Oct 25, 2016
97385d6
Renamed COL struct
Oct 25, 2016
c59d341
Fixed compiler warning
Oct 25, 2016
5f2b19a
Renamed buffer to data
Oct 25, 2016
4d438f1
Removed connection properties and made queues private
Oct 25, 2016
21ee808
Added private properties for queues
Oct 25, 2016
d732af7
Cleaned up header file
Oct 25, 2016
7181966
Use global return code variable
Oct 25, 2016
1f22ae2
No need to cleanup when trying to connect when already connected
Oct 25, 2016
ab2040c
Moved timeout statement
Oct 25, 2016
ecb718a
Only call dbloginfree if login not null
Oct 25, 2016
ebb6250
Replaced delegate with NSNotificationCenter
Oct 25, 2016
ef585cc
Removed delegate from readme
Oct 25, 2016
256b051
Moved notificationcenter registration to init
Oct 25, 2016
4b76d50
Removed storyboard, create view controller programmatically
Oct 25, 2016
c1100bc
Only show SQLViewController if not testing
Oct 25, 2016
54bdf91
Updated tests to use preprocessor macros
Oct 25, 2016
0dffeee
Added app icons and launch images
Oct 25, 2016
956f8f1
Merge branch 'types' of https://github.com/martinrybak/SQLClient into…
Oct 25, 2016
7101f56
Updated readme with testing
Oct 25, 2016
fffc888
Added nullability annotations
Oct 25, 2016
11aaddf
Make text view not editable
Oct 25, 2016
c1231d9
Renamed FreeTDS binary to libsybdb
Oct 25, 2016
3b64a31
Moved client variable
Oct 25, 2016
eb3cee5
Used macro constant
Oct 25, 2016
72d88a6
Updated header docs
Oct 25, 2016
76c3f10
Removed docsets. Cocoadocs auto-generates them.
Oct 25, 2016
feeac4a
Removed builds script for generating appledocs
Oct 25, 2016
8ca922c
Updated podspec
Oct 25, 2016
c397b57
Limit varchar(max) to 8000
Oct 26, 2016
2dc24bc
Updated readme
Oct 26, 2016
01c4e57
Updates to readme
Oct 26, 2016
4813b53
Tweaks to readme
Oct 26, 2016
71a9a94
More readme updates
Oct 26, 2016
7255088
Updated comments and formatting
Oct 26, 2016
b723022
Updated comment
Oct 26, 2016
fdcacf1
Updated comment
Oct 26, 2016
39fc8c4
Added more date conversion
Oct 27, 2016
4b8253c
Update readme
Oct 27, 2016
5142180
Updated readme
Oct 27, 2016
2b30c15
Added money and smallmoney tests
Oct 27, 2016
39940d5
Fixed time handling by converting to string and parsing
Oct 28, 2016
b6a8145
Updated comments
Oct 28, 2016
e626642
Added date & time tests
Oct 28, 2016
2d348ce
Removed time bug from readme
Oct 28, 2016
9e78541
Added tests for float and real
Oct 28, 2016
74e823f
Moved date from time conversion to separate method and fixed meridian…
Oct 29, 2016
e803fe9
Updated bit test
Oct 29, 2016
57497b2
Added NSNull to type list
Oct 29, 2016
2a22ed3
Changed type order
Oct 29, 2016
7a69d3f
Query server for max text size
Oct 29, 2016
60f6cc0
Updated readme with max text size
Oct 29, 2016
cc53488
Added string tests
Oct 29, 2016
aca7b4f
Updated pragmas and fixed timeout
Oct 29, 2016
c54e49e
Added placeholder tests
Oct 29, 2016
bada254
Converted tests to not require database table
Oct 31, 2016
21c96a7
Fixed GUID to UUID conversion
Oct 31, 2016
b594352
Updated comments
Oct 31, 2016
f4951f1
Added binary and image tests
Oct 31, 2016
3579380
Removed image conversion. Added varbinary test
Nov 2, 2016
e25a488
Don't query for max text size
Nov 2, 2016
75bcff4
FreeTDS incorrectly returns an empty string for a single space
Nov 2, 2016
6be9a90
Image data type returned as NSData
Nov 2, 2016
bcfcacd
Cleaned up the cleanup code
Nov 3, 2016
abd76b6
Added multiple table test
Nov 3, 2016
e7d5e35
Updated decimal/numeric handling and added tests
Nov 3, 2016
e935358
Updated example SQL
Nov 3, 2016
21a7b45
Escaped backslash
Nov 3, 2016
ee3a450
Fixed crash in table cleanup
Nov 3, 2016
3407636
Renamed bind type variable
Nov 3, 2016
601385a
Renamed tests for clarity
Nov 3, 2016
8ad3274
Simplified multiple tables test
Nov 4, 2016
8b30151
Added CRUD tests
Nov 4, 2016
51721d5
Don't add empty array to output if table has no columns
Nov 4, 2016
3687248
Updated CRUD tests
Nov 4, 2016
f153c48
Updated comment
Nov 4, 2016
9ba52d0
Added test for nil results
Nov 5, 2016
927bdf2
Updated docs for maxTextSize
Nov 8, 2016
78bdde7
Escaped asterisk
Nov 8, 2016
d1f3ed4
Updated podspec with OS X binary
Nov 8, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 115 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,133 @@
SQLClient
=========

Native Microsoft SQL Server client for iOS. An Objective-C wrapper around the open-source FreeTDS library.
Native Microsoft SQL Server client for iOS. An Objective-C wrapper around the open-source [FreeTDS](https://github.com/FreeTDS/freetds/) library.

##Sample Usage

<pre>
&#35;import "SQLClient.h"

SQLClient* client = [SQLClient sharedInstance];
client.delegate = self;
[client connect:@"server:port" username:@"user" password:@"pass" database:@"db" completion:^(BOOL success) {
if (success)
{
[client connect:@"server\instance:port" username:@"user" password:@"pass" database:@"db" completion:^(BOOL success) {
if (success) {
[client execute:@"SELECT * FROM Users" completion:^(NSArray* results) {
for (NSArray* table in results)
for (NSDictionary* row in table)
for (NSString* column in row)
for (NSArray* table in results) {
for (NSDictionary* row in table) {
for (NSString* column in row) {
NSLog(@"%@=%@", column, row[column]);
}
}
}
[client disconnect];
}];
}
}];
</pre>

##Errors

FreeTDS communicates both errors and messages. `SQLClient` rebroadcasts both via `NSNotificationCenter`:

//Required
- (void)error:(NSString*)error code:(int)code severity:(int)severity
```
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(error:) name:SQLClientErrorNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(message:) name:SQLClientMessageNotification object:nil];

- (void)error:(NSNotification*)notification
{
NSLog(@"Error #%d: %@ (Severity %d)", code, error, severity);
NSNumber* code = notification.userInfo[SQLClientCodeKey];
NSString* message = notification.userInfo[SQLClientMessageKey];
NSNumber* severity = notification.userInfo[SQLClientSeverityKey];
NSLog(@"Error #%@: %@ (Severity %@)", code, message, severity);
}
</pre>

- (void)message:(NSNotification*)notification
{
NSString* message = notification.userInfo[SQLClientMessageKey];
NSLog(@"Message: %@", message);
}
```

##Type Conversion
SQLClient maps SQL Server data types into the following native Objective-C types:

* bigint → NSNumber
* binary(n) → NSData
* bit → NSNumber
* char(n) → NSString
* cursor → **not supported**
* date → **NSDate** or **NSString**†
* datetime → NSDate
* datetime2 → **NSDate** or **NSString**†
* datetimeoffset → **NSDate** or **NSString**†
* decimal(p,s) → NSNumber
* float(n) → NSNumber
* image → **NSData**
* int → NSNumber
* money → NSDecimalNumber **(last 2 digits are truncated)**
* nchar → NSString
* ntext → NSString
* null → NSNull
* numeric(p,s) → NSNumber
* nvarchar → NSString
* nvarchar(max) → NSString
* real → NSNumber
* smalldatetime → NSDate
* smallint → NSNumber
* smallmoney → NSDecimalNumber
* sql_variant → **not supported**
* table → **not supported**
* text → NSString*
* time → **NSDate** or **NSString**†
* timestamp → NSData
* tinyint → NSNumber
* uniqueidentifier → NSUUID
* varbinary → NSData
* varbinary(max) → NSData
* varchar(max) → NSString*
* varchar(n) → NSString
* xml → NSString

\*The maximum length of a string in a query is configured on the server via the `SET TEXTSIZE` command. To find out your current setting, execute `SELECT @@TEXTSIZE`. SQLClient uses **4096** by default. To override this setting, update the `maxTextSize` property.

†The following data types are only converted to **NSDate** on TDS version **7.3** and higher. By default FreeTDS uses version **7.1** of the TDS protocol, which converts them to **NSString**. To use a higher version of the TDS protocol, add an environment variable to Xcode named `TDSVER`. Possible values are
`4.2`, `5.0`, `7.0`, `7.1`, `7.2`, `7.3`, `7.4`, `auto`.
A value of `auto` tells FreeTDS to use an autodetection (trial-and-error) algorithm to choose the highest available protocol version.

* date
* datetime2
* datetimeoffset
* time

##Testing

The `SQLClientTests` target contains integration tests which require a connection to an instance of SQL Server. The integration tests have passed successfully on the following database servers:

* SQL Server 7.0 (TDS 7.0)
* SQL Server 2000 (TDS 7.1)
* SQL Server 2005 (TDS 7.2)
* SQL Server 2008 (TDS 7.3)
* **TODO: add more!**

To configure the connection for your server:

* In Xcode, go to `Edit Scheme...` and select the `Test` scheme.
* On the `Arguments` tab, uncheck `Use the Run action's arguments and environment variables`
* Add the following environment variables for your server. The values should be the same as you pass in to the `connect:` method.
* `HOST` (`server\instance:port`)
* `DATABASE` (optional)
* `USERNAME`
* `PASSWORD`

## Known Issues
PR's welcome!

* **strings**: FreeTDS incorrectly returns an empty string "" for a single space " "
* **money**: FreeTDS will truncate the rightmost 2 digits.
* OSX support: [FreeTDS-iOS](https://github.com/martinrybak/FreeTDS-iOS) needs to be compiled to support OSX and Podspec updated
* No support for stored procedures with out parameters (yet)
* No support for returning number of rows changed (yet)
* Swift bindings: I welcome a PR to make the API more Swift-friendly

##Demo Project
Open the Xcode project inside the **SQLClient** folder.
Expand All @@ -43,7 +142,7 @@ Open the Xcode project inside the **SQLClient** folder.
1. Open a Terminal window. Update RubyGems by entering: `sudo gem update --system`. Enter your password when prompted.
2. Install CocoaPods by entering `sudo gem install cocoapods`.
3. Create a file at the root of your Xcode project folder called **Podfile**.
4. Enter the following text: `pod 'SQLClient', '~> 0.1.3'`
4. Enter the following text: `pod 'SQLClient', '~> 1.0.0'`
4. In Terminal navigate to this folder and enter `pod install`.
5. You will see a new **SQLClient.xcworkspace** file. Open this file in Xcode to work with this project from now on.

Expand All @@ -70,3 +169,6 @@ https://github.com/patchhf/FreeTDS-iOS

FreeTDS example code in C:
http://freetds.schemamania.org/userguide/samplecode.htm

SQL Server Logo
© Microsoft
12 changes: 9 additions & 3 deletions SQLClient.podspec
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
Pod::Spec.new do |s|
s.name = 'SQLClient'
s.version = '0.1.3'
s.version = '1.0.0'
s.license = 'MIT'
s.summary = 'An Objective-C wrapper around the open-source FreeTDS library'
s.homepage = 'http://htmlpreview.github.io/?https://github.com/martinrybak/SQLClient/blob/0.1.0/SQLClient/SQLClientDocs/html/index.html'
s.homepage = 'https://github.com/martinrybak/SQLClient'
s.authors = { 'Martin Rybak' => '[email protected]' }
s.source = { :git => 'https://github.com/martinrybak/SQLClient.git', :tag => s.version.to_s }
s.source_files = 'SQLClient/SQLClient/SQLClient/*.{h,m}'
s.vendored_libraries = 'SQLClient/SQLClient/SQLClient/libfreetds.a'
s.libraries = 'iconv'
s.requires_arc = true

s.ios.deployment_target = '7.0'
s.ios.vendored_libraries = 'SQLClient/SQLClient/SQLClient/libsybdb-ios.a'

s.osx.deployment_target = '10.7'
s.osx.vendored_libraries = 'SQLClient/SQLClient/SQLClient/libsybdb-osx.a'

s.tvos.deployment_target = '9.0'
s.tvos.vendored_libraries = 'SQLClient/SQLClient/SQLClient/libsybdb-ios.a'

end

54 changes: 20 additions & 34 deletions SQLClient/SQLClient.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
5B0FC859180DCEB000DF4EFE /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 5B0FC857180DCEB000DF4EFE /* InfoPlist.strings */; };
5B0FC85B180DCEB000DF4EFE /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B0FC85A180DCEB000DF4EFE /* main.m */; };
5B0FC85F180DCEB000DF4EFE /* SQLAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B0FC85E180DCEB000DF4EFE /* SQLAppDelegate.m */; };
5B0FC862180DCEB000DF4EFE /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5B0FC860180DCEB000DF4EFE /* Main.storyboard */; };
5B0FC865180DCEB000DF4EFE /* SQLViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B0FC864180DCEB000DF4EFE /* SQLViewController.m */; };
5B0FC867180DCEB000DF4EFE /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5B0FC866180DCEB000DF4EFE /* Images.xcassets */; };
5B0FC86E180DCEB000DF4EFE /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B0FC86D180DCEB000DF4EFE /* XCTest.framework */; };
Expand All @@ -23,7 +22,7 @@
5B0FC87A180DCEB000DF4EFE /* SQLClientTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B0FC879180DCEB000DF4EFE /* SQLClientTests.m */; };
5B0FC888180DCF3800DF4EFE /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B0FC887180DCF3800DF4EFE /* libiconv.dylib */; };
5B0FC8D9180DDF7E00DF4EFE /* SQLClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B0FC8D1180DDF7E00DF4EFE /* SQLClient.m */; };
5BC11BCC180EE4C9003471E4 /* libfreetds.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B0FC8CE180DDF7E00DF4EFE /* libfreetds.a */; };
5BC11BCC180EE4C9003471E4 /* libsybdb.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B0FC8CE180DDF7E00DF4EFE /* libsybdb.a */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -47,7 +46,6 @@
5B0FC85C180DCEB000DF4EFE /* SQLClient-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SQLClient-Prefix.pch"; sourceTree = "<group>"; };
5B0FC85D180DCEB000DF4EFE /* SQLAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SQLAppDelegate.h; sourceTree = "<group>"; };
5B0FC85E180DCEB000DF4EFE /* SQLAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SQLAppDelegate.m; sourceTree = "<group>"; };
5B0FC861180DCEB000DF4EFE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
5B0FC863180DCEB000DF4EFE /* SQLViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SQLViewController.h; sourceTree = "<group>"; };
5B0FC864180DCEB000DF4EFE /* SQLViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SQLViewController.m; sourceTree = "<group>"; };
5B0FC866180DCEB000DF4EFE /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
Expand All @@ -62,7 +60,7 @@
5B0FC8CB180DDF7E00DF4EFE /* cspublic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cspublic.h; sourceTree = "<group>"; };
5B0FC8CC180DDF7E00DF4EFE /* cstypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cstypes.h; sourceTree = "<group>"; };
5B0FC8CD180DDF7E00DF4EFE /* ctpublic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ctpublic.h; sourceTree = "<group>"; };
5B0FC8CE180DDF7E00DF4EFE /* libfreetds.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libfreetds.a; sourceTree = "<group>"; };
5B0FC8CE180DDF7E00DF4EFE /* libsybdb.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libsybdb.a; sourceTree = "<group>"; };
5B0FC8CF180DDF7E00DF4EFE /* odbcss.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = odbcss.h; sourceTree = "<group>"; };
5B0FC8D0180DDF7E00DF4EFE /* SQLClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLClient.h; sourceTree = "<group>"; };
5B0FC8D1180DDF7E00DF4EFE /* SQLClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SQLClient.m; sourceTree = "<group>"; };
Expand All @@ -82,7 +80,7 @@
5B0FC851180DCEB000DF4EFE /* CoreGraphics.framework in Frameworks */,
5B0FC853180DCEB000DF4EFE /* UIKit.framework in Frameworks */,
5B0FC84F180DCEB000DF4EFE /* Foundation.framework in Frameworks */,
5BC11BCC180EE4C9003471E4 /* libfreetds.a in Frameworks */,
5BC11BCC180EE4C9003471E4 /* libsybdb.a in Frameworks */,
5B0FC888180DCF3800DF4EFE /* libiconv.dylib in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -138,7 +136,6 @@
5B0FC8C9180DDF7E00DF4EFE /* SQLClient */,
5B0FC85D180DCEB000DF4EFE /* SQLAppDelegate.h */,
5B0FC85E180DCEB000DF4EFE /* SQLAppDelegate.m */,
5B0FC860180DCEB000DF4EFE /* Main.storyboard */,
5B0FC863180DCEB000DF4EFE /* SQLViewController.h */,
5B0FC864180DCEB000DF4EFE /* SQLViewController.m */,
5B0FC866180DCEB000DF4EFE /* Images.xcassets */,
Expand Down Expand Up @@ -179,7 +176,7 @@
5B0FC8C9180DDF7E00DF4EFE /* SQLClient */ = {
isa = PBXGroup;
children = (
5B0FC8CE180DDF7E00DF4EFE /* libfreetds.a */,
5B0FC8CE180DDF7E00DF4EFE /* libsybdb.a */,
5B0FC8D0180DDF7E00DF4EFE /* SQLClient.h */,
5B0FC8D1180DDF7E00DF4EFE /* SQLClient.m */,
5B0FC8CA180DDF7E00DF4EFE /* bkpublic.h */,
Expand Down Expand Up @@ -207,7 +204,6 @@
5B0FC847180DCEB000DF4EFE /* Sources */,
5B0FC848180DCEB000DF4EFE /* Frameworks */,
5B0FC849180DCEB000DF4EFE /* Resources */,
5B0FC8A1180DDBFE00DF4EFE /* ShellScript */,
);
buildRules = (
);
Expand Down Expand Up @@ -243,7 +239,7 @@
isa = PBXProject;
attributes = {
CLASSPREFIX = SQL;
LastUpgradeCheck = 0600;
LastUpgradeCheck = 0800;
ORGANIZATIONNAME = "Martin Rybak";
TargetAttributes = {
5B0FC86B180DCEB000DF4EFE = {
Expand Down Expand Up @@ -277,7 +273,6 @@
files = (
5B0FC867180DCEB000DF4EFE /* Images.xcassets in Resources */,
5B0FC859180DCEB000DF4EFE /* InfoPlist.strings in Resources */,
5B0FC862180DCEB000DF4EFE /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -291,22 +286,6 @@
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
5B0FC8A1180DDBFE00DF4EFE /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "#Update build number with number of git commits if in release mode\nif [ ${CONFIGURATION} == \"Release\" ]; then\nbuildNumber=$(git rev-list HEAD | wc -l | tr -d ' ')\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $buildNumber\" \"${PROJECT_DIR}/${INFOPLIST_FILE}\"\nfi;\n\nif [ ${CONFIGURATION} == \"Release\" ]; then\nAPPLEDOC_PATH=`which appledoc`\nif [ $APPLEDOC_PATH ]; then\n$APPLEDOC_PATH \\\n--project-name ${PRODUCT_NAME} \\\n--project-company \"Martin Rybak\" \\\n--company-id \"com.martinrybak\" \\\n--output ${PRODUCT_NAME}Docs \\\n--keep-intermediate-files \\\n--ignore \"*.m\" \\\n--no-install-docset \\\n--no-repeat-first-par \\\n--no-warn-invalid-crossref \\\n--exit-threshold 2 \\\n${PROJECT_DIR}/${PRODUCT_NAME}\nfi;\nfi;";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
5B0FC847180DCEB000DF4EFE /* Sources */ = {
isa = PBXSourcesBuildPhase;
Expand Down Expand Up @@ -346,14 +325,6 @@
name = InfoPlist.strings;
sourceTree = "<group>";
};
5B0FC860180DCEB000DF4EFE /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
5B0FC861180DCEB000DF4EFE /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
5B0FC876180DCEB000DF4EFE /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
Expand All @@ -378,13 +349,19 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
Expand Down Expand Up @@ -416,13 +393,18 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
Expand Down Expand Up @@ -452,6 +434,7 @@
"$(SRCROOT)/SQLClient/SQLClient",
);
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.martinrybak.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
VALID_ARCHS = "armv7 armv7s arm64";
WRAPPER_EXTENSION = app;
Expand All @@ -475,6 +458,7 @@
"$(SRCROOT)/SQLClient/SQLClient",
);
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = "com.martinrybak.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
VALID_ARCHS = "armv7 armv7s arm64";
WRAPPER_EXTENSION = app;
Expand All @@ -497,6 +481,7 @@
"$(inherited)",
);
INFOPLIST_FILE = "SQLClientTests/SQLClientTests-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "com.martinrybak.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest;
Expand All @@ -515,6 +500,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "SQLClient/SQLClient-Prefix.pch";
INFOPLIST_FILE = "SQLClientTests/SQLClientTests-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "com.martinrybak.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest;
Expand Down
Loading