defined configuration for build variants

This commit is contained in:
Semyon Babushkin
2017-10-23 20:25:04 +03:00
parent b6b5acd823
commit b6ba66a283
38 changed files with 2563 additions and 1424 deletions

53
ios/Autobonus.plist Normal file
View File

@@ -0,0 +1,53 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>Autobonus</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>checker</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>Просто потому что</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>

53
ios/Develop.plist Normal file
View File

@@ -0,0 +1,53 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>Develop</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>checker</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>Просто потому что</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>

53
ios/Dinect.plist Normal file
View File

@@ -0,0 +1,53 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>Dinect</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>checker</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>Просто потому что</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>

Binary file not shown.

Binary file not shown.

View File

@@ -1,9 +1,9 @@
// This is a generated file; do not edit or check into version control.
FLUTTER_ROOT=/Users/sozinov/flutter
FLUTTER_APPLICATION_PATH=/Users/sozinov/Developer/checker/checker
FLUTTER_ROOT=/Users/ntrlab/flutter
FLUTTER_APPLICATION_PATH=/Users/ntrlab/semyon/apps/checker
FLUTTER_TARGET=lib/main.dart
FLUTTER_BUILD_MODE=debug
FLUTTER_BUILD_DIR=build
SYMROOT=${SOURCE_ROOT}/../build/ios
FLUTTER_FRAMEWORK_DIR=/Users/sozinov/flutter/bin/cache/artifacts/engine/ios
FLUTTER_FRAMEWORK_DIR=/Users/ntrlab/flutter/bin/cache/artifacts/engine/ios
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"

Binary file not shown.

53
ios/PIP.plist Normal file
View File

@@ -0,0 +1,53 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>PIP</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>checker</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>Просто потому что</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>

View File

@@ -1,8 +1,8 @@
PODS:
- Flutter (1.0.0)
- FMDB (2.7.2):
- FMDB/standard (= 2.7.2)
- FMDB/standard (2.7.2)
- FMDB (2.6.2):
- FMDB/standard (= 2.6.2)
- FMDB/standard (2.6.2)
- path_provider (0.0.1):
- Flutter
- sqflite (0.0.1):
@@ -10,24 +10,24 @@ PODS:
- FMDB
DEPENDENCIES:
- Flutter (from `/Users/sozinov/flutter/bin/cache/artifacts/engine/ios`)
- path_provider (from `/Users/sozinov/.pub-cache/hosted/pub.dartlang.org/path_provider-0.2.1+1/ios`)
- sqflite (from `/Users/sozinov/.pub-cache/hosted/pub.dartlang.org/sqflite-0.2.4/ios`)
- Flutter (from `/Users/ntrlab/flutter/bin/cache/artifacts/engine/ios`)
- path_provider (from `/Users/ntrlab/.pub-cache/hosted/pub.dartlang.org/path_provider-0.2.1+1/ios`)
- sqflite (from `/Users/ntrlab/.pub-cache/hosted/pub.dartlang.org/sqflite-0.2.4/ios`)
EXTERNAL SOURCES:
Flutter:
:path: /Users/sozinov/flutter/bin/cache/artifacts/engine/ios
:path: /Users/ntrlab/flutter/bin/cache/artifacts/engine/ios
path_provider:
:path: /Users/sozinov/.pub-cache/hosted/pub.dartlang.org/path_provider-0.2.1+1/ios
:path: /Users/ntrlab/.pub-cache/hosted/pub.dartlang.org/path_provider-0.2.1+1/ios
sqflite:
:path: /Users/sozinov/.pub-cache/hosted/pub.dartlang.org/sqflite-0.2.4/ios
:path: /Users/ntrlab/.pub-cache/hosted/pub.dartlang.org/sqflite-0.2.4/ios
SPEC CHECKSUMS:
Flutter: d674e78c937094a75ac71dd77e921e840bea3dbf
FMDB: 6198a90e7b6900cfc046e6bc0ef6ebb7be9236aa
FMDB: 854a0341b4726e53276f2a8996f06f1b80f9259a
path_provider: f96fff6166a8867510d2c25fdcc346327cc4b259
sqflite: 8e2d9fe1e7cdc95d4d537fc7eb2d23c8dc428e3c
PODFILE CHECKSUM: 351e02e34b831289961ec3558a535cbd2c4965d2
COCOAPODS: 1.3.1
COCOAPODS: 1.2.1

View File

@@ -1,7 +1,4 @@
# FMDB v2.7
<!--[![Platform](https://img.shields.io/cocoapods/p/FMDB.svg?style=flat)](http://cocoadocs.org/docsets/Alamofire)-->
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/FMDB.svg)](https://img.shields.io/cocoapods/v/FMDB.svg)
[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
# FMDB v2.6.2
This is an Objective-C wrapper around SQLite: http://sqlite.org/
@@ -16,166 +13,29 @@ Since FMDB is built on top of SQLite, you're going to want to read this page top
## Contributing
Do you have an awesome idea that deserves to be in FMDB? You might consider pinging ccgus first to make sure he hasn't already ruled it out for some reason. Otherwise pull requests are great, and make sure you stick to the local coding conventions. However, please be patient and if you haven't heard anything from ccgus for a week or more, you might want to send a note asking what's up.
## Installing
### CocoaPods
## CocoaPods
[![Dependency Status](https://www.versioneye.com/objective-c/fmdb/2.3/badge.svg?style=flat)](https://www.versioneye.com/objective-c/fmdb/2.3)
[![Reference Status](https://www.versioneye.com/objective-c/fmdb/reference_badge.svg?style=flat)](https://www.versioneye.com/objective-c/fmdb/references)
FMDB can be installed using [CocoaPods](https://cocoapods.org/).
If you haven't done so already, you might want to initialize the project, to have it produce a `Podfile` template for you:
```
$ pod init
pod 'FMDB'
# pod 'FMDB/FTS' # FMDB with FTS
# pod 'FMDB/standalone' # FMDB with latest SQLite amalgamation source
# pod 'FMDB/standalone/FTS' # FMDB with latest SQLite amalgamation source and FTS
# pod 'FMDB/SQLCipher' # FMDB with SQLCipher
```
Then, edit the `Podfile`, adding `FMDB`:
```ruby
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'MyApp' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for MyApp2
pod 'FMDB'
# pod 'FMDB/FTS' # FMDB with FTS
# pod 'FMDB/standalone' # FMDB with latest SQLite amalgamation source
# pod 'FMDB/standalone/FTS' # FMDB with latest SQLite amalgamation source and FTS
# pod 'FMDB/SQLCipher' # FMDB with SQLCipher
end
```
Then install the pods:
```
$ pod install
```
Then open the `.xcworkspace` rather than the `.xcodeproj`.
For more information on Cocoapods visit https://cocoapods.org.
**If using FMDB with [SQLCipher](https://www.zetetic.net/sqlcipher/) you must use the FMDB/SQLCipher subspec. The FMDB/SQLCipher subspec declares SQLCipher as a dependency, allowing FMDB to be compiled with the `-DSQLITE_HAS_CODEC` flag.**
### Carthage
Once you make sure you have [the latest version of Carthage](https://github.com/Carthage/Carthage/releases), you can open up a command line terminal, navigate to your project's main directory, and then do the following commands:
```
$ echo ' github "ccgus/fmdb" ' > ./Cartfile
$ carthage update
```
You can then configure your project as outlined in Carthage's [Getting Started](https://github.com/Carthage/Carthage#getting-started) (i.e. for iOS, adding the framework to the "Link Binary with Libraries" in your target and adding the `copy-frameworks` script; in macOS, adding the framework to the list of "Embedded Binaries").
## FMDB Class Reference:
http://ccgus.github.io/fmdb/html/index.html
## Automatic Reference Counting (ARC) or Manual Memory Management?
You can use either style in your Cocoa project. FMDB will figure out which you are using at compile time and do the right thing.
## What's New in FMDB 2.7
FMDB 2.7 attempts to support a more natural interface. This represents a fairly significant change for Swift developers (audited for nullability; shifted to properties in external interfaces where possible rather than methods; etc.). For Objective-C developers, this should be a fairly seamless transition (unless you were using the ivars that were previously exposed in the public interface, which you shouldn't have been doing, anyway!).
### Nullability and Swift Optionals
FMDB 2.7 is largely the same as prior versions, but has been audited for nullability. For Objective-C users, this simply means that if you perform a static analysis of your FMDB-based project, you may receive more meaningful warnings as you review your project, but there are likely to be few, if any, changes necessary in your code.
For Swift users, this nullability audit results in changes that are not entirely backward compatible with FMDB 2.6, but is a little more Swifty. Before FMDB was audited for nullability, Swift was forced to defensively assume that variables were optional, but the library now more accurately knows which properties and method parameters are optional, and which are not.
This means, though, that Swift code written for FMDB 2.7 may require changes. For example, consider the following Swift 3/Swift 4 code for FMDB 2.6:
```swift
guard let queue = FMDatabaseQueue(path: fileURL.path) else {
print("Unable to create FMDatabaseQueue")
return
}
queue.inTransaction { db, rollback in
do {
guard let db == db else {
// handle error here
return
}
try db.executeUpdate("INSERT INTO foo (bar) VALUES (?)", values: [1])
try db.executeUpdate("INSERT INTO foo (bar) VALUES (?)", values: [2])
} catch {
rollback?.pointee = true
}
}
```
Because FMDB 2.6 was not audited for nullability, Swift inferred that `db` and `rollback` were optionals. But, now, in FMDB 2.7, Swift now knows that, for example, neither `db` nor `rollback` above can be `nil`, so they are no longer optionals. Thus it becomes:
```swift
let queue = FMDatabaseQueue(url: fileURL)
queue.inTransaction { db, rollback in
do {
try db.executeUpdate("INSERT INTO foo (bar) VALUES (?)", values: [1])
try db.executeUpdate("INSERT INTO foo (bar) VALUES (?)", values: [2])
} catch {
rollback.pointee = true
}
}
```
### Custom Functions
In the past, when writing custom functions, you would have to generally include your own `@autoreleasepool` block to avoid problems when writing functions that scanned through a large table. Now, FMDB will automatically wrap it in an autorelease pool, so you don't have to.
Also, in the past, when retrieving the values passed to the function, you had to drop down to the SQLite C API and include your own `sqlite3_value_XXX` calls. There are now `FMDatabase` methods, `valueInt`, `valueString`, etc., so you can stay within Swift and/or Objective-C, without needing to call the C functions yourself. Likewise, when specifying the return values, you no longer need to call `sqlite3_result_XXX` C API, but rather you can use `FMDatabase` methods, `resultInt`, `resultString`, etc. There is a new `enum` for `valueType` called `SqliteValueType`, which can be used for checking the type of parameter passed to the custom function.
Thus, you can do something like (as of Swift 3):
```swift
db.makeFunctionNamed("RemoveDiacritics", arguments: 1) { context, argc, argv in
guard db.valueType(argv[0]) == .text || db.valueType(argv[0]) == .null else {
db.resultError("Expected string parameter", context: context)
return
}
if let string = db.valueString(argv[0])?.folding(options: .diacriticInsensitive, locale: nil) {
db.resultString(string, context: context)
} else {
db.resultNull(context: context)
}
}
```
And you can then use that function in your SQL (in this case, matching both "Jose" and "José"):
```sql
SELECT * FROM employees WHERE RemoveDiacritics(first_name) LIKE 'jose'
```
Note, the method `makeFunctionNamed:maximumArguments:withBlock:` has been renamed to `makeFunctionNamed:arguments:block:`, to more accurately reflect the functional intent of the second parameter.
### API Changes
In addition to the `makeFunctionNamed` noted above, there are a few other API changes. Specifically,
- To become consistent with the rest of the API, the methods `objectForColumnName` and `UTF8StringForColumnName` have been renamed to `objectForColumn` and `UTF8StringForColumn`.
- Note, the `objectForColumn` (and the associted subscript operator) now returns `nil` if an invalid column name/index is passed to it. It used to return `NSNull`.
- To avoid confusion with `FMDatabaseQueue` method `inTransaction`, which performs transactions, the `FMDatabase` method to determine whether you are in a transaction or not, `inTransaction`, has been replaced with a read-only property, `isInTransaction`.
- Several functions have been converted to properties, namely, `databasePath`, `maxBusyRetryTimeInterval`, `shouldCacheStatements`, `sqliteHandle`, `hasOpenResultSets`, `lastInsertRowId`, `changes`, `goodConnection`, `columnCount`, `resultDictionary`, `applicationID`, `applicationIDString`, `userVersion`, `countOfCheckedInDatabases`, `countOfCheckedOutDatabases`, and `countOfOpenDatabases`. For Objective-C users, this has little material impact, but for Swift users, it results in a slightly more natural interface. Note: For Objective-C developers, previously versions of FMDB exposed many ivars (but we hope you weren't using them directly, anyway!), but the implmentation details for these are no longer exposed.
### URL Methods
In keeping with Apple's shift from paths to URLs, there are now `NSURL` renditions of the various `init` methods, previously only accepting paths.
## Usage
There are three main classes in FMDB:
@@ -193,8 +53,7 @@ An `FMDatabase` is created with a path to a SQLite database file. This path can
(For more information on temporary and in-memory databases, read the sqlite documentation on the subject: http://www.sqlite.org/inmemorydb.html)
```objc
NSString *path = [NSTemporaryDirectory() stringByAppendingPathComponent:@"tmp.db"];
FMDatabase *db = [FMDatabase databaseWithPath:path];
FMDatabase *db = [FMDatabase databaseWithPath:@"/tmp/tmp.db"];
```
### Opening
@@ -203,8 +62,7 @@ Before you can interact with the database, it must be opened. Opening fails if
```objc
if (![db open]) {
// [db release]; // uncomment this line in manual referencing code; in ARC, this is not necessary/permitted
db = nil;
[db release];
return;
}
```
@@ -250,8 +108,8 @@ if ([s next]) {
- `dateForColumn:`
- `dataForColumn:`
- `dataNoCopyForColumn:`
- `UTF8StringForColumn:`
- `objectForColumn:`
- `UTF8StringForColumnName:`
- `objectForColumnName:`
Each of these methods also has a `{type}ForColumnIndex:` variant that is used to retrieve the data based on the position of the column in the results, as opposed to the column's name.
@@ -322,13 +180,13 @@ if (!success) {
>
> Likewise, SQL `NULL` values should be inserted as `[NSNull null]`. For example, in the case of `comment` which might be `nil` (and is in this example), you can use the `comment ?: [NSNull null]` syntax, which will insert the string if `comment` is not `nil`, but will insert `[NSNull null]` if it is `nil`.
In Swift, you would use `executeUpdate(values:)`, which not only is a concise Swift syntax, but also `throws` errors for proper error handling:
In Swift, you would use `executeUpdate(values:)`, which not only is a concise Swift syntax, but also `throws` errors for proper Swift 2 error handling:
```swift
do {
let identifier = 42
let name = "Liam O'Flaherty (\"the famous Irish author\")"
let date = Date()
let date = NSDate()
let comment: String? = nil
try db.executeUpdate("INSERT INTO authors (identifier, name, date, comment) VALUES (?, ?, ?, ?)", values: [identifier, name, date, comment ?? NSNull()])
@@ -399,8 +257,8 @@ An easy way to wrap things up in a transaction can be done like this:
*rollback = YES;
return;
}
// etc ...
// etc…
[db executeUpdate:@"INSERT INTO myTable VALUES (?)", @4];
}];
```
@@ -414,20 +272,18 @@ queue.inTransaction { db, rollback in
try db.executeUpdate("INSERT INTO myTable VALUES (?)", values: [3])
if whoopsSomethingWrongHappened {
rollback.pointee = true
rollback.memory = true
return
}
// etc ...
try db.executeUpdate("INSERT INTO myTable VALUES (?)", values: [4])
} catch {
rollback.pointee = true
rollback.memory = true
print(error)
}
}
```
(Note, as of Swift 3, use `pointee`. But in Swift 2.3, use `memory` rather than `pointee`.)
`FMDatabaseQueue` will run the blocks on a serialized queue (hence the name of the class). So if you call `FMDatabaseQueue`'s methods from multiple threads at the same time, they will be executed in the order they are received. This way queries and updates won't step on each other's toes, and every one is happy.
**Note:** The calls to `FMDatabaseQueue`'s methods are blocking. So even though you are passing along blocks, they will **not** be run on another thread.
@@ -457,18 +313,17 @@ To do this, you must:
#import "FMDB.h"
```
4. Use the variations of `executeQuery` and `executeUpdate` with the `sql` and `values` parameters with `try` pattern, as shown below. These renditions of `executeQuery` and `executeUpdate` both `throw` errors in true Swift fashion.
4. Use the variations of `executeQuery` and `executeUpdate` with the `sql` and `values` parameters with `try` pattern, as shown below. These renditions of `executeQuery` and `executeUpdate` both `throw` errors in true Swift 2 fashion.
If you do the above, you can then write Swift code that uses `FMDatabase`. For example, as of Swift 3:
If you do the above, you can then write Swift code that uses `FMDatabase`. For example:
```swift
let fileURL = try! FileManager.default
.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: false)
.appendingPathComponent("test.sqlite")
let documents = try! NSFileManager.defaultManager().URLForDirectory(.DocumentDirectory, inDomain: .UserDomainMask, appropriateForURL: nil, create: false)
let fileURL = documents.URLByAppendingPathComponent("test.sqlite")
let database = FMDatabase(url: fileURL)
let database = FMDatabase(path: fileURL.path)
guard database.open() else {
if !database.open() {
print("Unable to open database")
return
}
@@ -480,11 +335,12 @@ do {
let rs = try database.executeQuery("select x, y, z from test", values: nil)
while rs.next() {
if let x = rs.string(forColumn: "x"), let y = rs.string(forColumn: "y"), let z = rs.string(forColumn: "z") {
let x = rs.stringForColumn("x")
let y = rs.stringForColumn("y")
let z = rs.stringForColumn("z")
print("x = \(x); y = \(y); z = \(z)")
}
}
} catch {
} catch let error as NSError {
print("failed: \(error.localizedDescription)")
}

View File

@@ -2,7 +2,6 @@
#import "FMResultSet.h"
#import "FMDatabasePool.h"
NS_ASSUME_NONNULL_BEGIN
#if ! __has_feature(objc_arc)
#define FMDBAutorelease(__v) ([__v autorelease]);
@@ -71,7 +70,26 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
#pragma clang diagnostic ignored "-Wobjc-interface-ivars"
@interface FMDatabase : NSObject
@interface FMDatabase : NSObject {
void* _db;
NSString* _databasePath;
BOOL _logsErrors;
BOOL _crashOnErrors;
BOOL _traceExecution;
BOOL _checkedOut;
BOOL _shouldCacheStatements;
BOOL _isExecutingStatement;
BOOL _inTransaction;
NSTimeInterval _maxBusyRetryTimeInterval;
NSTimeInterval _startBusyRetryTime;
NSMutableDictionary *_cachedStatements;
NSMutableSet *_openResultSets;
NSMutableSet *_openFunctions;
NSDateFormatter *_dateFormat;
}
///-----------------
/// @name Properties
@@ -95,7 +113,7 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
/** Dictionary of cached statements */
@property (atomic, retain, nullable) NSMutableDictionary *cachedStatements;
@property (atomic, retain) NSMutableDictionary *cachedStatements;
///---------------------
/// @name Initialization
@@ -127,34 +145,7 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
*/
+ (instancetype)databaseWithPath:(NSString * _Nullable)inPath;
/** Create a `FMDatabase` object.
An `FMDatabase` is created with a path to a SQLite database file. This path can be one of these three:
1. A file system URL. The file does not have to exist on disk. If it does not exist, it is created for you.
2. `nil`. An in-memory database is created. This database will be destroyed with the `FMDatabase` connection is closed.
For example, to create/open a database in your Mac OS X `tmp` folder:
FMDatabase *db = [FMDatabase databaseWithPath:@"/tmp/tmp.db"];
Or, in iOS, you might open a database in the app's `Documents` directory:
NSString *docsPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0];
NSString *dbPath = [docsPath stringByAppendingPathComponent:@"test.db"];
FMDatabase *db = [FMDatabase databaseWithPath:dbPath];
(For more information on temporary and in-memory databases, read the sqlite documentation on the subject: [http://www.sqlite.org/inmemorydb.html](http://www.sqlite.org/inmemorydb.html))
@param url The local file URL (not remote URL) of database file
@return `FMDatabase` object if successful; `nil` if failure.
*/
+ (instancetype)databaseWithURL:(NSURL * _Nullable)url;
+ (instancetype)databaseWithPath:(NSString*)inPath;
/** Initialize a `FMDatabase` object.
@@ -176,40 +167,14 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
(For more information on temporary and in-memory databases, read the sqlite documentation on the subject: [http://www.sqlite.org/inmemorydb.html](http://www.sqlite.org/inmemorydb.html))
@param path Path of database file.
@param inPath Path of database file
@return `FMDatabase` object if successful; `nil` if failure.
*/
- (instancetype)initWithPath:(NSString * _Nullable)path;
- (instancetype)initWithPath:(NSString*)inPath;
/** Initialize a `FMDatabase` object.
An `FMDatabase` is created with a local file URL to a SQLite database file. This path can be one of these three:
1. A file system URL. The file does not have to exist on disk. If it does not exist, it is created for you.
2. `nil`. An in-memory database is created. This database will be destroyed with the `FMDatabase` connection is closed.
For example, to create/open a database in your Mac OS X `tmp` folder:
FMDatabase *db = [FMDatabase databaseWithPath:@"/tmp/tmp.db"];
Or, in iOS, you might open a database in the app's `Documents` directory:
NSString *docsPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0];
NSString *dbPath = [docsPath stringByAppendingPathComponent:@"test.db"];
FMDatabase *db = [FMDatabase databaseWithPath:dbPath];
(For more information on temporary and in-memory databases, read the sqlite documentation on the subject: [http://www.sqlite.org/inmemorydb.html](http://www.sqlite.org/inmemorydb.html))
@param url The file `NSURL` of database file.
@return `FMDatabase` object if successful; `nil` if failure.
*/
- (instancetype)initWithURL:(NSURL * _Nullable)url;
///-----------------------------------
/// @name Opening and closing database
@@ -278,7 +243,7 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
@see close
*/
- (BOOL)openWithFlags:(int)flags vfs:(NSString * _Nullable)vfsName;
- (BOOL)openWithFlags:(int)flags vfs:(NSString *)vfsName;
/** Closing a database connection
@@ -301,7 +266,7 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
@return `YES` if everything succeeds, `NO` on failure.
*/
@property (nonatomic, readonly) BOOL goodConnection;
- (BOOL)goodConnection;
///----------------------
@@ -328,7 +293,7 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
@see [`sqlite3_bind`](http://sqlite.org/c3ref/bind_blob.html)
*/
- (BOOL)executeUpdate:(NSString*)sql withErrorAndBindings:(NSError * _Nullable *)outErr, ...;
- (BOOL)executeUpdate:(NSString*)sql withErrorAndBindings:(NSError**)outErr, ...;
/** Execute single update statement
@@ -337,7 +302,7 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
@warning **Deprecated**: Please use `<executeUpdate:withErrorAndBindings>` instead.
*/
- (BOOL)update:(NSString*)sql withErrorAndBindings:(NSError * _Nullable*)outErr, ... __deprecated_msg("Use executeUpdate:withErrorAndBindings: instead");;
- (BOOL)update:(NSString*)sql withErrorAndBindings:(NSError**)outErr, ... __attribute__ ((deprecated));
/** Execute single update statement
@@ -358,7 +323,7 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
@note This technique supports the use of `?` placeholders in the SQL, automatically binding any supplied value parameters to those placeholders. This approach is more robust than techniques that entail using `stringWithFormat` to manually build SQL statements, which can be problematic if the values happened to include any characters that needed to be quoted.
@note You cannot use this method from Swift due to incompatibilities between Swift and Objective-C variadic implementations. Consider using `<executeUpdate:values:>` instead.
@note If you want to use this from Swift, please note that you must include `FMDatabaseVariadic.swift` in your project. Without that, you cannot use this method directly, and instead have to use methods such as `<executeUpdate:withArgumentsInArray:>`.
*/
- (BOOL)executeUpdate:(NSString*)sql, ...;
@@ -419,9 +384,9 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
This is similar to `<executeUpdate:withArgumentsInArray:>`, except that this also accepts a pointer to a `NSError` pointer, so that errors can be returned.
In Swift, this throws errors, as if it were defined as follows:
In Swift 2, this throws errors, as if it were defined as follows:
`func executeUpdate(sql: String, values: [Any]?) throws -> Bool`
`func executeUpdate(sql: String!, values: [AnyObject]!) throws -> Bool`
@param sql The SQL to be performed, with optional `?` placeholders.
@@ -437,7 +402,7 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
*/
- (BOOL)executeUpdate:(NSString*)sql values:(NSArray * _Nullable)values error:(NSError * _Nullable __autoreleasing *)error;
- (BOOL)executeUpdate:(NSString*)sql values:(NSArray *)values error:(NSError * __autoreleasing *)error;
/** Execute single update statement
@@ -511,7 +476,7 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
*/
- (BOOL)executeStatements:(NSString *)sql withResultBlock:(__attribute__((noescape)) FMDBExecuteStatementsCallbackBlock _Nullable)block;
- (BOOL)executeStatements:(NSString *)sql withResultBlock:(FMDBExecuteStatementsCallbackBlock)block;
/** Last insert rowid
@@ -525,7 +490,7 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
*/
@property (nonatomic, readonly) int64_t lastInsertRowId;
- (int64_t)lastInsertRowId;
/** The number of rows changed by prior SQL statement.
@@ -537,7 +502,7 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
*/
@property (nonatomic, readonly) int changes;
- (int)changes;
///-------------------------
@@ -562,10 +527,10 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
@see [`FMResultSet next`](<[FMResultSet next]>)
@see [`sqlite3_bind`](http://sqlite.org/c3ref/bind_blob.html)
@note You cannot use this method from Swift due to incompatibilities between Swift and Objective-C variadic implementations. Consider using `<executeQuery:values:>` instead.
@note If you want to use this from Swift, please note that you must include `FMDatabaseVariadic.swift` in your project. Without that, you cannot use this method directly, and instead have to use methods such as `<executeQuery:withArgumentsInArray:>`.
*/
- (FMResultSet * _Nullable)executeQuery:(NSString*)sql, ...;
- (FMResultSet *)executeQuery:(NSString*)sql, ...;
/** Execute select statement
@@ -595,7 +560,7 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
*/
- (FMResultSet * _Nullable)executeQueryWithFormat:(NSString*)format, ... NS_FORMAT_FUNCTION(1,2);
- (FMResultSet *)executeQueryWithFormat:(NSString*)format, ... NS_FORMAT_FUNCTION(1,2);
/** Execute select statement
@@ -614,7 +579,7 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
@see [`FMResultSet next`](<[FMResultSet next]>)
*/
- (FMResultSet * _Nullable)executeQuery:(NSString *)sql withArgumentsInArray:(NSArray *)arguments;
- (FMResultSet *)executeQuery:(NSString *)sql withArgumentsInArray:(NSArray *)arguments;
/** Execute select statement
@@ -624,9 +589,9 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
This is similar to `<executeQuery:withArgumentsInArray:>`, except that this also accepts a pointer to a `NSError` pointer, so that errors can be returned.
In Swift, this throws errors, as if it were defined as follows:
In Swift 2, this throws errors, as if it were defined as follows:
`func executeQuery(sql: String, values: [Any]?) throws -> FMResultSet!`
`func executeQuery(sql: String!, values: [AnyObject]!) throws -> FMResultSet!`
@param sql The SELECT statement to be performed, with optional `?` placeholders.
@@ -643,7 +608,7 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
*/
- (FMResultSet * _Nullable)executeQuery:(NSString *)sql values:(NSArray * _Nullable)values error:(NSError * _Nullable __autoreleasing *)error;
- (FMResultSet *)executeQuery:(NSString *)sql values:(NSArray *)values error:(NSError * __autoreleasing *)error;
/** Execute select statement
@@ -661,11 +626,11 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
@see [`FMResultSet next`](<[FMResultSet next]>)
*/
- (FMResultSet * _Nullable)executeQuery:(NSString *)sql withParameterDictionary:(NSDictionary * _Nullable)arguments;
- (FMResultSet *)executeQuery:(NSString *)sql withParameterDictionary:(NSDictionary *)arguments;
// Documentation forthcoming.
- (FMResultSet * _Nullable)executeQuery:(NSString *)sql withVAList:(va_list)args;
- (FMResultSet *)executeQuery:(NSString*)sql withVAList: (va_list)args;
///-------------------
/// @name Transactions
@@ -678,7 +643,7 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
@see commit
@see rollback
@see beginDeferredTransaction
@see isInTransaction
@see inTransaction
*/
- (BOOL)beginTransaction;
@@ -690,7 +655,7 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
@see commit
@see rollback
@see beginTransaction
@see isInTransaction
@see inTransaction
*/
- (BOOL)beginDeferredTransaction;
@@ -704,7 +669,7 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
@see beginTransaction
@see beginDeferredTransaction
@see rollback
@see isInTransaction
@see inTransaction
*/
- (BOOL)commit;
@@ -718,22 +683,22 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
@see beginTransaction
@see beginDeferredTransaction
@see commit
@see isInTransaction
@see inTransaction
*/
- (BOOL)rollback;
/** Identify whether currently in a transaction or not
@return `YES` if currently within transaction; `NO` if not.
@see beginTransaction
@see beginDeferredTransaction
@see commit
@see rollback
*/
@property (nonatomic, readonly) BOOL isInTransaction;
- (BOOL)inTransaction __deprecated_msg("Use isInTransaction property instead");
- (BOOL)inTransaction;
///----------------------------------------
@@ -753,22 +718,22 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
@return `YES` if there are open result sets; `NO` if not.
*/
@property (nonatomic, readonly) BOOL hasOpenResultSets;
- (BOOL)hasOpenResultSets;
/** Whether should cache statements or not
/** Return whether should cache statements or not
@return `YES` if should cache statements; `NO` if not.
*/
@property (nonatomic) BOOL shouldCacheStatements;
- (BOOL)shouldCacheStatements;
/** Interupt pending database operation
This method causes any pending database operation to abort and return at its earliest opportunity
@return `YES` on success; `NO` on failure. If failed, you can call `<lastError>`, `<lastErrorCode>`, or `<lastErrorMessage>` for diagnostic information regarding the failure.
/** Set whether should cache statements or not
@param value `YES` if should cache statements; `NO` if not.
*/
- (BOOL)interrupt;
- (void)setShouldCacheStatements:(BOOL)value;
///-------------------------
/// @name Encryption methods
@@ -832,14 +797,12 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
///------------------------------
/** The path of the database file
@return path of database.
*/
@property (nonatomic, readonly, nullable) NSString *databasePath;
/** The file URL of the database file.
*/
@property (nonatomic, readonly, nullable) NSURL *databaseURL;
- (NSString *)databasePath;
/** The underlying SQLite handle
@@ -847,7 +810,7 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
*/
@property (nonatomic, readonly) void *sqliteHandle;
- (void*)sqliteHandle;
///-----------------------------
@@ -882,22 +845,6 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
- (int)lastErrorCode;
/** Last extended error code
Returns the numeric extended result code for the most recent failed SQLite API call associated with a database connection. If a prior API call failed but the most recent API call succeeded, this return value is undefined.
@return Integer value of the last extended error code.
@see [sqlite3_errcode()](http://sqlite.org/c3ref/errcode.html)
@see [2. Primary Result Codes versus Extended Result Codes](http://sqlite.org/rescode.html#primary_result_codes_versus_extended_result_codes)
@see [5. Extended Result Code List](http://sqlite.org/rescode.html#extrc)
@see lastErrorMessage
@see lastError
*/
- (int)lastExtendedErrorCode;
/** Had error
@return `YES` if there was an error, `NO` if no error.
@@ -919,11 +866,12 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
*/
- (NSError *)lastError;
- (NSError*)lastError;
// description forthcoming
@property (nonatomic) NSTimeInterval maxBusyRetryTimeInterval;
- (void)setMaxBusyRetryTimeInterval:(NSTimeInterval)timeoutInSeconds;
- (NSTimeInterval)maxBusyRetryTimeInterval;
///------------------
@@ -942,7 +890,7 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
@see rollbackToSavePointWithName:error:
*/
- (BOOL)startSavePointWithName:(NSString*)name error:(NSError * _Nullable *)outErr;
- (BOOL)startSavePointWithName:(NSString*)name error:(NSError**)outErr;
/** Release save point
@@ -957,7 +905,7 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
*/
- (BOOL)releaseSavePointWithName:(NSString*)name error:(NSError * _Nullable *)outErr;
- (BOOL)releaseSavePointWithName:(NSString*)name error:(NSError**)outErr;
/** Roll back to save point
@@ -971,7 +919,7 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
*/
- (BOOL)rollbackToSavePointWithName:(NSString*)name error:(NSError * _Nullable *)outErr;
- (BOOL)rollbackToSavePointWithName:(NSString*)name error:(NSError**)outErr;
/** Start save point
@@ -985,7 +933,7 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
*/
- (NSError * _Nullable)inSavePoint:(__attribute__((noescape)) void (^)(BOOL *rollback))block;
- (NSError*)inSavePoint:(void (^)(BOOL *rollback))block;
///----------------------------
/// @name SQLite library status
@@ -1023,193 +971,48 @@ typedef int(^FMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary
For example:
[db makeFunctionNamed:@"RemoveDiacritics" arguments:1 block:^(void *context, int argc, void **argv) {
SqliteValueType type = [self.db valueType:argv[0]];
if (type == SqliteValueTypeNull) {
[self.db resultNullInContext:context];
return;
[queue inDatabase:^(FMDatabase *adb) {
[adb executeUpdate:@"create table ftest (foo text)"];
[adb executeUpdate:@"insert into ftest values ('hello')"];
[adb executeUpdate:@"insert into ftest values ('hi')"];
[adb executeUpdate:@"insert into ftest values ('not h!')"];
[adb executeUpdate:@"insert into ftest values ('definitely not h!')"];
[adb makeFunctionNamed:@"StringStartsWithH" maximumArguments:1 withBlock:^(sqlite3_context *context, int aargc, sqlite3_value **aargv) {
if (sqlite3_value_type(aargv[0]) == SQLITE_TEXT) {
@autoreleasepool {
const char *c = (const char *)sqlite3_value_text(aargv[0]);
NSString *s = [NSString stringWithUTF8String:c];
sqlite3_result_int(context, [s hasPrefix:@"h"]);
}
if (type != SqliteValueTypeText) {
[self.db resultError:@"Expected text" context:context];
return;
}
NSString *string = [self.db valueString:argv[0]];
NSString *result = [string stringByFoldingWithOptions:NSDiacriticInsensitiveSearch locale:nil];
[self.db resultString:result context:context];
else {
NSLog(@"Unknown formart for StringStartsWithH (%d) %s:%d", sqlite3_value_type(aargv[0]), __FUNCTION__, __LINE__);
sqlite3_result_null(context);
}
}];
FMResultSet *rs = [db executeQuery:@"SELECT * FROM employees WHERE RemoveDiacritics(first_name) LIKE 'jose'"];
NSAssert(rs, @"Error %@", [db lastErrorMessage]);
int rowCount = 0;
FMResultSet *ars = [adb executeQuery:@"select * from ftest where StringStartsWithH(foo)"];
while ([ars next]) {
rowCount++;
NSLog(@"Does %@ start with 'h'?", [rs stringForColumnIndex:0]);
}
FMDBQuickCheck(rowCount == 2);
}];
@param name Name of function.
@param name Name of function
@param arguments Maximum number of parameters.
@param count Maximum number of parameters
@param block The block of code for the function.
@param block The block of code for the function
@see [sqlite3_create_function()](http://sqlite.org/c3ref/create_function.html)
*/
- (void)makeFunctionNamed:(NSString *)name arguments:(int)arguments block:(void (^)(void *context, int argc, void * _Nonnull * _Nonnull argv))block;
- (void)makeFunctionNamed:(NSString*)name maximumArguments:(int)count withBlock:(void (^)(void *context, int argc, void **argv))block;
- (void)makeFunctionNamed:(NSString *)name maximumArguments:(int)count withBlock:(void (^)(void *context, int argc, void * _Nonnull * _Nonnull argv))block __deprecated_msg("Use makeFunctionNamed:arguments:block:");
typedef NS_ENUM(int, SqliteValueType) {
SqliteValueTypeInteger = 1,
SqliteValueTypeFloat = 2,
SqliteValueTypeText = 3,
SqliteValueTypeBlob = 4,
SqliteValueTypeNull = 5
};
- (SqliteValueType)valueType:(void *)argv;
/**
Get integer value of parameter in custom function.
@param value The argument whose value to return.
@return The integer value.
@see makeFunctionNamed:arguments:block:
*/
- (int)valueInt:(void *)value;
/**
Get long value of parameter in custom function.
@param value The argument whose value to return.
@return The long value.
@see makeFunctionNamed:arguments:block:
*/
- (long long)valueLong:(void *)value;
/**
Get double value of parameter in custom function.
@param value The argument whose value to return.
@return The double value.
@see makeFunctionNamed:arguments:block:
*/
- (double)valueDouble:(void *)value;
/**
Get `NSData` value of parameter in custom function.
@param value The argument whose value to return.
@return The data object.
@see makeFunctionNamed:arguments:block:
*/
- (NSData * _Nullable)valueData:(void *)value;
/**
Get string value of parameter in custom function.
@param value The argument whose value to return.
@return The string value.
@see makeFunctionNamed:arguments:block:
*/
- (NSString * _Nullable)valueString:(void *)value;
/**
Return null value from custom function.
@param context The context to which the null value will be returned.
@see makeFunctionNamed:arguments:block:
*/
- (void)resultNullInContext:(void *)context NS_SWIFT_NAME(resultNull(context:));
/**
Return integer value from custom function.
@param value The integer value to be returned.
@param context The context to which the value will be returned.
@see makeFunctionNamed:arguments:block:
*/
- (void)resultInt:(int) value context:(void *)context;
/**
Return long value from custom function.
@param value The long value to be returned.
@param context The context to which the value will be returned.
@see makeFunctionNamed:arguments:block:
*/
- (void)resultLong:(long long)value context:(void *)context;
/**
Return double value from custom function.
@param value The double value to be returned.
@param context The context to which the value will be returned.
@see makeFunctionNamed:arguments:block:
*/
- (void)resultDouble:(double)value context:(void *)context;
/**
Return `NSData` object from custom function.
@param data The `NSData` object to be returned.
@param context The context to which the value will be returned.
@see makeFunctionNamed:arguments:block:
*/
- (void)resultData:(NSData *)data context:(void *)context;
/**
Return string value from custom function.
@param value The string value to be returned.
@param context The context to which the value will be returned.
@see makeFunctionNamed:arguments:block:
*/
- (void)resultString:(NSString *)value context:(void *)context;
/**
Return error string from custom function.
@param error The error string to be returned.
@param context The context to which the error will be returned.
@see makeFunctionNamed:arguments:block:
*/
- (void)resultError:(NSString *)error context:(void *)context;
/**
Return error code from custom function.
@param errorCode The integer error code to be returned.
@param context The context to which the error will be returned.
@see makeFunctionNamed:arguments:block:
*/
- (void)resultErrorCode:(int)errorCode context:(void *)context;
/**
Report memory error in custom function.
@param context The context to which the error will be returned.
@see makeFunctionNamed:arguments:block:
*/
- (void)resultErrorNoMemoryInContext:(void *)context NS_SWIFT_NAME(resultErrorNoMemory(context:));
/**
Report that string or BLOB is too long to represent in custom function.
@param context The context to which the error will be returned.
@see makeFunctionNamed:arguments:block:
*/
- (void)resultErrorTooBigInContext:(void *)context NS_SWIFT_NAME(resultErrorTooBig(context:));
///---------------------
/// @name Date formatter
@@ -1280,7 +1083,7 @@ typedef NS_ENUM(int, SqliteValueType) {
@see storeableDateFormat:
*/
- (NSDate * _Nullable)dateFromString:(NSString *)s;
- (NSDate *)dateFromString:(NSString *)s;
/** Convert the supplied NSDate to NSString, using the current database formatter.
@@ -1357,4 +1160,3 @@ typedef NS_ENUM(int, SqliteValueType) {
#pragma clang diagnostic pop
NS_ASSUME_NONNULL_END

View File

@@ -8,61 +8,38 @@
#import <sqlite3.h>
#endif
@interface FMDatabase () {
void* _db;
BOOL _isExecutingStatement;
NSTimeInterval _startBusyRetryTime;
@interface FMDatabase ()
NSMutableSet *_openResultSets;
NSMutableSet *_openFunctions;
NSDateFormatter *_dateFormat;
}
NS_ASSUME_NONNULL_BEGIN
- (FMResultSet * _Nullable)executeQuery:(NSString *)sql withArgumentsInArray:(NSArray * _Nullable)arrayArgs orDictionary:(NSDictionary * _Nullable)dictionaryArgs orVAList:(va_list)args;
- (BOOL)executeUpdate:(NSString *)sql error:(NSError * _Nullable *)outErr withArgumentsInArray:(NSArray * _Nullable)arrayArgs orDictionary:(NSDictionary * _Nullable)dictionaryArgs orVAList:(va_list)args;
NS_ASSUME_NONNULL_END
- (FMResultSet *)executeQuery:(NSString *)sql withArgumentsInArray:(NSArray*)arrayArgs orDictionary:(NSDictionary *)dictionaryArgs orVAList:(va_list)args;
- (BOOL)executeUpdate:(NSString*)sql error:(NSError**)outErr withArgumentsInArray:(NSArray*)arrayArgs orDictionary:(NSDictionary *)dictionaryArgs orVAList:(va_list)args;
@end
@implementation FMDatabase
// Because these two properties have all of their accessor methods implemented,
// we have to synthesize them to get the corresponding ivars. The rest of the
// properties have their ivars synthesized automatically for us.
@synthesize shouldCacheStatements = _shouldCacheStatements;
@synthesize maxBusyRetryTimeInterval = _maxBusyRetryTimeInterval;
@synthesize cachedStatements=_cachedStatements;
@synthesize logsErrors=_logsErrors;
@synthesize crashOnErrors=_crashOnErrors;
@synthesize checkedOut=_checkedOut;
@synthesize traceExecution=_traceExecution;
#pragma mark FMDatabase instantiation and deallocation
+ (instancetype)databaseWithPath:(NSString *)aPath {
+ (instancetype)databaseWithPath:(NSString*)aPath {
return FMDBReturnAutoreleased([[self alloc] initWithPath:aPath]);
}
+ (instancetype)databaseWithURL:(NSURL *)url {
return FMDBReturnAutoreleased([[self alloc] initWithURL:url]);
}
- (instancetype)init {
return [self initWithPath:nil];
}
- (instancetype)initWithURL:(NSURL *)url {
return [self initWithPath:url.path];
}
- (instancetype)initWithPath:(NSString *)path {
- (instancetype)initWithPath:(NSString*)aPath {
assert(sqlite3_threadsafe()); // whoa there big boy- gotta make sure sqlite it happy with what we're going to do.
self = [super init];
if (self) {
_databasePath = [path copy];
_databasePath = [aPath copy];
_openResultSets = [[NSMutableSet alloc] init];
_db = nil;
_logsErrors = YES;
@@ -73,12 +50,10 @@ NS_ASSUME_NONNULL_END
return self;
}
#if ! __has_feature(objc_arc)
- (void)finalize {
[self close];
[super finalize];
}
#endif
- (void)dealloc {
[self close];
@@ -93,12 +68,12 @@ NS_ASSUME_NONNULL_END
#endif
}
- (NSURL *)databaseURL {
return _databasePath ? [NSURL fileURLWithPath:_databasePath] : nil;
- (NSString *)databasePath {
return _databasePath;
}
+ (NSString*)FMDBUserVersion {
return @"2.7.2";
return @"2.6.2";
}
// returns 0x0240 for version 2.4. This makes it super easy to do things like:
@@ -346,9 +321,7 @@ static int FMDBDatabaseBusyHandler(void *f, int count) {
- (void)clearCachedStatements {
for (NSMutableSet *statements in [_cachedStatements objectEnumerator]) {
for (FMStatement *statement in [statements allObjects]) {
[statement close];
}
[statements makeObjectsPerformSelector:@selector(close)];
}
[_cachedStatements removeAllObjects];
@@ -512,7 +485,7 @@ static int FMDBDatabaseBusyHandler(void *f, int count) {
#pragma mark Error routines
- (NSString *)lastErrorMessage {
- (NSString*)lastErrorMessage {
return [NSString stringWithUTF8String:sqlite3_errmsg(_db)];
}
@@ -526,11 +499,7 @@ static int FMDBDatabaseBusyHandler(void *f, int count) {
return sqlite3_errcode(_db);
}
- (int)lastExtendedErrorCode {
return sqlite3_extended_errcode(_db);
}
- (NSError*)errorWithMessage:(NSString *)message {
- (NSError*)errorWithMessage:(NSString*)message {
NSDictionary* errorMessage = [NSDictionary dictionaryWithObject:message forKey:NSLocalizedDescriptionKey];
return [NSError errorWithDomain:@"FMDatabase" code:sqlite3_errcode(_db) userInfo:errorMessage];
@@ -1106,12 +1075,6 @@ static int FMDBDatabaseBusyHandler(void *f, int count) {
if (SQLITE_DONE == rc) {
// all is well, let's return.
}
else if (SQLITE_INTERRUPT == rc) {
if (_logsErrors) {
NSLog(@"Error calling sqlite3_step. Query was interrupted (%d: %s) SQLITE_INTERRUPT", rc, sqlite3_errmsg(_db));
NSLog(@"DB Query: %@", sql);
}
}
else if (rc == SQLITE_ROW) {
NSString *message = [NSString stringWithFormat:@"A executeUpdate is being called with a query string '%@'", sql];
if (_logsErrors) {
@@ -1296,7 +1259,7 @@ int FMDBExecuteBulkSQLCallback(void *theBlockAsVoid, int columns, char **values,
BOOL b = [self executeUpdate:@"rollback transaction"];
if (b) {
_isInTransaction = NO;
_inTransaction = NO;
}
return b;
@@ -1306,7 +1269,7 @@ int FMDBExecuteBulkSQLCallback(void *theBlockAsVoid, int columns, char **values,
BOOL b = [self executeUpdate:@"commit transaction"];
if (b) {
_isInTransaction = NO;
_inTransaction = NO;
}
return b;
@@ -1316,7 +1279,7 @@ int FMDBExecuteBulkSQLCallback(void *theBlockAsVoid, int columns, char **values,
BOOL b = [self executeUpdate:@"begin deferred transaction"];
if (b) {
_isInTransaction = YES;
_inTransaction = YES;
}
return b;
@@ -1326,23 +1289,14 @@ int FMDBExecuteBulkSQLCallback(void *theBlockAsVoid, int columns, char **values,
BOOL b = [self executeUpdate:@"begin exclusive transaction"];
if (b) {
_isInTransaction = YES;
_inTransaction = YES;
}
return b;
}
- (BOOL)inTransaction {
return _isInTransaction;
}
- (BOOL)interrupt
{
if (_db) {
sqlite3_interrupt([self sqliteHandle]);
return YES;
}
return NO;
return _inTransaction;
}
static NSString *FMDBEscapeSavePointName(NSString *savepointName) {
@@ -1453,19 +1407,12 @@ void FMDBBlockSQLiteCallBackFunction(sqlite3_context *context, int argc, sqlite3
void (^block)(sqlite3_context *context, int argc, sqlite3_value **argv) = (__bridge id)sqlite3_user_data(context);
#endif
if (block) {
@autoreleasepool {
block(context, argc, argv);
}
}
}
// deprecated because "arguments" parameter is not maximum argument count, but actual argument count.
- (void)makeFunctionNamed:(NSString *)name maximumArguments:(int)arguments withBlock:(void (^)(void *context, int argc, void **argv))block {
[self makeFunctionNamed:name arguments:arguments block:block];
}
- (void)makeFunctionNamed:(NSString *)name arguments:(int)arguments block:(void (^)(void *context, int argc, void **argv))block {
- (void)makeFunctionNamed:(NSString*)name maximumArguments:(int)count withBlock:(void (^)(void *context, int argc, void **argv))block {
if (!_openFunctions) {
_openFunctions = [NSMutableSet new];
@@ -1477,91 +1424,26 @@ void FMDBBlockSQLiteCallBackFunction(sqlite3_context *context, int argc, sqlite3
/* I tried adding custom functions to release the block when the connection is destroyed- but they seemed to never be called, so we use _openFunctions to store the values instead. */
#if ! __has_feature(objc_arc)
sqlite3_create_function([self sqliteHandle], [name UTF8String], arguments, SQLITE_UTF8, (void*)b, &FMDBBlockSQLiteCallBackFunction, 0x00, 0x00);
sqlite3_create_function([self sqliteHandle], [name UTF8String], count, SQLITE_UTF8, (void*)b, &FMDBBlockSQLiteCallBackFunction, 0x00, 0x00);
#else
sqlite3_create_function([self sqliteHandle], [name UTF8String], arguments, SQLITE_UTF8, (__bridge void*)b, &FMDBBlockSQLiteCallBackFunction, 0x00, 0x00);
sqlite3_create_function([self sqliteHandle], [name UTF8String], count, SQLITE_UTF8, (__bridge void*)b, &FMDBBlockSQLiteCallBackFunction, 0x00, 0x00);
#endif
}
- (SqliteValueType)valueType:(void *)value {
return sqlite3_value_type(value);
}
- (int)valueInt:(void *)value {
return sqlite3_value_int(value);
}
- (long long)valueLong:(void *)value {
return sqlite3_value_int64(value);
}
- (double)valueDouble:(void *)value {
return sqlite3_value_double(value);
}
- (NSData *)valueData:(void *)value {
const void *bytes = sqlite3_value_blob(value);
int length = sqlite3_value_bytes(value);
return bytes ? [NSData dataWithBytes:bytes length:length] : nil;
}
- (NSString *)valueString:(void *)value {
const char *cString = (const char *)sqlite3_value_text(value);
return cString ? [NSString stringWithUTF8String:cString] : nil;
}
- (void)resultNullInContext:(void *)context {
sqlite3_result_null(context);
}
- (void)resultInt:(int) value context:(void *)context {
sqlite3_result_int(context, value);
}
- (void)resultLong:(long long)value context:(void *)context {
sqlite3_result_int64(context, value);
}
- (void)resultDouble:(double)value context:(void *)context {
sqlite3_result_double(context, value);
}
- (void)resultData:(NSData *)data context:(void *)context {
sqlite3_result_blob(context, data.bytes, (int)data.length, SQLITE_TRANSIENT);
}
- (void)resultString:(NSString *)value context:(void *)context {
sqlite3_result_text(context, [value UTF8String], -1, SQLITE_TRANSIENT);
}
- (void)resultError:(NSString *)error context:(void *)context {
sqlite3_result_error(context, [error UTF8String], -1);
}
- (void)resultErrorCode:(int)errorCode context:(void *)context {
sqlite3_result_error_code(context, errorCode);
}
- (void)resultErrorNoMemoryInContext:(void *)context {
sqlite3_result_error_nomem(context);
}
- (void)resultErrorTooBigInContext:(void *)context {
sqlite3_result_error_toobig(context);
}
@end
@implementation FMStatement
@synthesize statement=_statement;
@synthesize query=_query;
@synthesize useCount=_useCount;
@synthesize inUse=_inUse;
#if ! __has_feature(objc_arc)
- (void)finalize {
[self close];
[super finalize];
}
#endif
- (void)dealloc {
[self close];
@@ -1592,5 +1474,6 @@ void FMDBBlockSQLiteCallBackFunction(sqlite3_context *context, int argc, sqlite3
return [NSString stringWithFormat:@"%@ %ld hit(s) for query %@", [super description], _useCount, _query];
}
@end

View File

@@ -9,7 +9,6 @@
#import <Foundation/Foundation.h>
#import "FMDatabase.h"
NS_ASSUME_NONNULL_BEGIN
/** Category of additions for `<FMDatabase>` class.
@@ -31,7 +30,7 @@ NS_ASSUME_NONNULL_BEGIN
@return `int` value.
@note This is not available from Swift.
@note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project.
*/
- (int)intForQuery:(NSString*)query, ...;
@@ -43,7 +42,7 @@ NS_ASSUME_NONNULL_BEGIN
@return `long` value.
@note This is not available from Swift.
@note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project.
*/
- (long)longForQuery:(NSString*)query, ...;
@@ -55,7 +54,7 @@ NS_ASSUME_NONNULL_BEGIN
@return `BOOL` value.
@note This is not available from Swift.
@note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project.
*/
- (BOOL)boolForQuery:(NSString*)query, ...;
@@ -67,7 +66,7 @@ NS_ASSUME_NONNULL_BEGIN
@return `double` value.
@note This is not available from Swift.
@note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project.
*/
- (double)doubleForQuery:(NSString*)query, ...;
@@ -79,10 +78,10 @@ NS_ASSUME_NONNULL_BEGIN
@return `NSString` value.
@note This is not available from Swift.
@note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project.
*/
- (NSString * _Nullable)stringForQuery:(NSString*)query, ...;
- (NSString*)stringForQuery:(NSString*)query, ...;
/** Return `NSData` value for query
@@ -91,10 +90,10 @@ NS_ASSUME_NONNULL_BEGIN
@return `NSData` value.
@note This is not available from Swift.
@note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project.
*/
- (NSData * _Nullable)dataForQuery:(NSString*)query, ...;
- (NSData*)dataForQuery:(NSString*)query, ...;
/** Return `NSDate` value for query
@@ -103,10 +102,10 @@ NS_ASSUME_NONNULL_BEGIN
@return `NSDate` value.
@note This is not available from Swift.
@note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project.
*/
- (NSDate * _Nullable)dateForQuery:(NSString*)query, ...;
- (NSDate*)dateForQuery:(NSString*)query, ...;
// Notice that there's no dataNoCopyForQuery:.
@@ -142,7 +141,7 @@ NS_ASSUME_NONNULL_BEGIN
@see [SQLite File Format](http://www.sqlite.org/fileformat.html)
*/
- (FMResultSet *)getSchema;
- (FMResultSet*)getSchema;
/** The schema of the database.
@@ -192,7 +191,7 @@ NS_ASSUME_NONNULL_BEGIN
@warning Deprecated - use `<columnExists:inTableWithName:>` instead.
*/
- (BOOL)columnExists:(NSString*)tableName columnName:(NSString*)columnName __deprecated_msg("Use columnExists:inTableWithName: instead");
- (BOOL)columnExists:(NSString*)tableName columnName:(NSString*)columnName __attribute__ ((deprecated));
/** Validate SQL statement
@@ -207,7 +206,7 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (BOOL)validateSQL:(NSString*)sql error:(NSError * _Nullable *)error;
- (BOOL)validateSQL:(NSString*)sql error:(NSError**)error;
///-----------------------------------
@@ -221,16 +220,36 @@ NS_ASSUME_NONNULL_BEGIN
@see setApplicationID:
*/
@property (nonatomic) uint32_t applicationID;
- (uint32_t)applicationID;
/** Set the application ID
@param appID The `uint32_t` numeric value of the application ID.
@see applicationID
*/
- (void)setApplicationID:(uint32_t)appID;
#if TARGET_OS_MAC && !TARGET_OS_IPHONE
/** Retrieve application ID string
@return The `NSString` value of the application ID.
@see setApplicationIDString:
*/
@property (nonatomic, retain) NSString *applicationIDString;
- (NSString*)applicationIDString;
/** Set the application ID string
@param string The `NSString` value of the application ID.
@see applicationIDString
*/
- (void)setApplicationIDString:(NSString*)string;
#endif
@@ -240,11 +259,20 @@ NS_ASSUME_NONNULL_BEGIN
/** Retrieve user version
@return The `uint32_t` numeric value of the user version.
@see setUserVersion:
*/
@property (nonatomic) uint32_t userVersion;
- (uint32_t)userVersion;
/** Set the user-version
@param version The `uint32_t` numeric value of the user version.
@see userVersion
*/
- (void)setUserVersion:(uint32_t)version;
@end
NS_ASSUME_NONNULL_END

View File

@@ -17,7 +17,7 @@
#endif
@interface FMDatabase (PrivateStuff)
- (FMResultSet *)executeQuery:(NSString *)sql withArgumentsInArray:(NSArray * _Nullable)arrayArgs orDictionary:(NSDictionary * _Nullable)dictionaryArgs orVAList:(va_list)args;
- (FMResultSet *)executeQuery:(NSString *)sql withArgumentsInArray:(NSArray*)arrayArgs orDictionary:(NSDictionary *)dictionaryArgs orVAList:(va_list)args;
@end
@implementation FMDatabase (FMDatabaseAdditions)
@@ -34,7 +34,7 @@ type ret = [resultSet sel:0]; \
return ret;
- (NSString *)stringForQuery:(NSString*)query, ... {
- (NSString*)stringForQuery:(NSString*)query, ... {
RETURN_RESULT_FOR_QUERY_WITH_SELECTOR(NSString *, stringForColumnIndex);
}
@@ -222,11 +222,12 @@ return ret;
#pragma clang diagnostic pop
- (BOOL)validateSQL:(NSString*)sql error:(NSError**)error {
sqlite3_stmt *pStmt = NULL;
BOOL validationSucceeded = YES;
int rc = sqlite3_prepare_v2([self sqliteHandle], [sql UTF8String], -1, &pStmt, 0);
int rc = sqlite3_prepare_v2(_db, [sql UTF8String], -1, &pStmt, 0);
if (rc != SQLITE_OK) {
validationSucceeded = NO;
if (error) {

124
ios/Pods/FMDB/src/fmdb/FMDatabasePool.h generated Executable file → Normal file
View File

@@ -8,8 +8,6 @@
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class FMDatabase;
/** Pool of `<FMDatabase>` objects.
@@ -30,15 +28,27 @@ NS_ASSUME_NONNULL_BEGIN
in the main.m file.
*/
@interface FMDatabasePool : NSObject
@interface FMDatabasePool : NSObject {
NSString *_path;
dispatch_queue_t _lockQueue;
NSMutableArray *_databaseInPool;
NSMutableArray *_databaseOutPool;
__unsafe_unretained id _delegate;
NSUInteger _maximumNumberOfDatabasesToCreate;
int _openFlags;
}
/** Database path */
@property (atomic, copy, nullable) NSString *path;
@property (atomic, retain) NSString *path;
/** Delegate object */
@property (atomic, assign, nullable) id delegate;
@property (atomic, assign) id delegate;
/** Maximum number of databases to create */
@@ -48,10 +58,6 @@ NS_ASSUME_NONNULL_BEGIN
@property (atomic, readonly) int openFlags;
/** Custom virtual file system name */
@property (atomic, copy, nullable) NSString *vfsName;
///---------------------
/// @name Initialization
@@ -64,36 +70,17 @@ NS_ASSUME_NONNULL_BEGIN
@return The `FMDatabasePool` object. `nil` on error.
*/
+ (instancetype)databasePoolWithPath:(NSString * _Nullable)aPath;
/** Create pool using file URL.
@param url The file `NSURL` of the database.
@return The `FMDatabasePool` object. `nil` on error.
*/
+ (instancetype)databasePoolWithURL:(NSURL * _Nullable)url;
+ (instancetype)databasePoolWithPath:(NSString*)aPath;
/** Create pool using path and specified flags
@param aPath The file path of the database.
@param openFlags Flags passed to the openWithFlags method of the database.
@param openFlags Flags passed to the openWithFlags method of the database
@return The `FMDatabasePool` object. `nil` on error.
*/
+ (instancetype)databasePoolWithPath:(NSString * _Nullable)aPath flags:(int)openFlags;
/** Create pool using file URL and specified flags
@param url The file `NSURL` of the database.
@param openFlags Flags passed to the openWithFlags method of the database.
@return The `FMDatabasePool` object. `nil` on error.
*/
+ (instancetype)databasePoolWithURL:(NSURL * _Nullable)url flags:(int)openFlags;
+ (instancetype)databasePoolWithPath:(NSString*)aPath flags:(int)openFlags;
/** Create pool using path.
@@ -102,16 +89,7 @@ NS_ASSUME_NONNULL_BEGIN
@return The `FMDatabasePool` object. `nil` on error.
*/
- (instancetype)initWithPath:(NSString * _Nullable)aPath;
/** Create pool using file URL.
@param url The file `NSURL of the database.
@return The `FMDatabasePool` object. `nil` on error.
*/
- (instancetype)initWithURL:(NSURL * _Nullable)url;
- (instancetype)initWithPath:(NSString*)aPath;
/** Create pool using path and specified flags.
@@ -121,67 +99,32 @@ NS_ASSUME_NONNULL_BEGIN
@return The `FMDatabasePool` object. `nil` on error.
*/
- (instancetype)initWithPath:(NSString * _Nullable)aPath flags:(int)openFlags;
/** Create pool using file URL and specified flags.
@param url The file `NSURL` of the database.
@param openFlags Flags passed to the openWithFlags method of the database
@return The `FMDatabasePool` object. `nil` on error.
*/
- (instancetype)initWithURL:(NSURL * _Nullable)url flags:(int)openFlags;
/** Create pool using path and specified flags.
@param aPath The file path of the database.
@param openFlags Flags passed to the openWithFlags method of the database
@param vfsName The name of a custom virtual file system
@return The `FMDatabasePool` object. `nil` on error.
*/
- (instancetype)initWithPath:(NSString * _Nullable)aPath flags:(int)openFlags vfs:(NSString * _Nullable)vfsName;
/** Create pool using file URL and specified flags.
@param url The file `NSURL` of the database.
@param openFlags Flags passed to the openWithFlags method of the database
@param vfsName The name of a custom virtual file system
@return The `FMDatabasePool` object. `nil` on error.
*/
- (instancetype)initWithURL:(NSURL * _Nullable)url flags:(int)openFlags vfs:(NSString * _Nullable)vfsName;
/** Returns the Class of 'FMDatabase' subclass, that will be used to instantiate database object.
Subclasses can override this method to return specified Class of 'FMDatabase' subclass.
@return The Class of 'FMDatabase' subclass, that will be used to instantiate database object.
*/
+ (Class)databaseClass;
- (instancetype)initWithPath:(NSString*)aPath flags:(int)openFlags;
///------------------------------------------------
/// @name Keeping track of checked in/out databases
///------------------------------------------------
/** Number of checked-in databases in pool
@returns Number of databases
*/
@property (nonatomic, readonly) NSUInteger countOfCheckedInDatabases;
- (NSUInteger)countOfCheckedInDatabases;
/** Number of checked-out databases in pool
@returns Number of databases
*/
@property (nonatomic, readonly) NSUInteger countOfCheckedOutDatabases;
- (NSUInteger)countOfCheckedOutDatabases;
/** Total number of databases in pool
@returns Number of databases
*/
@property (nonatomic, readonly) NSUInteger countOfOpenDatabases;
- (NSUInteger)countOfOpenDatabases;
/** Release all databases in pool */
@@ -196,21 +139,21 @@ NS_ASSUME_NONNULL_BEGIN
@param block The code to be run on the `FMDatabasePool` pool.
*/
- (void)inDatabase:(__attribute__((noescape)) void (^)(FMDatabase *db))block;
- (void)inDatabase:(void (^)(FMDatabase *db))block;
/** Synchronously perform database operations in pool using transaction.
@param block The code to be run on the `FMDatabasePool` pool.
*/
- (void)inTransaction:(__attribute__((noescape)) void (^)(FMDatabase *db, BOOL *rollback))block;
- (void)inTransaction:(void (^)(FMDatabase *db, BOOL *rollback))block;
/** Synchronously perform database operations in pool using deferred transaction.
@param block The code to be run on the `FMDatabasePool` pool.
*/
- (void)inDeferredTransaction:(__attribute__((noescape)) void (^)(FMDatabase *db, BOOL *rollback))block;
- (void)inDeferredTransaction:(void (^)(FMDatabase *db, BOOL *rollback))block;
/** Synchronously perform database operations in pool using save point.
@@ -221,7 +164,7 @@ NS_ASSUME_NONNULL_BEGIN
@warning You can not nest these, since calling it will pull another database out of the pool and you'll get a deadlock. If you need to nest, use `<[FMDatabase startSavePointWithName:error:]>` instead.
*/
- (NSError * _Nullable)inSavePoint:(__attribute__((noescape)) void (^)(FMDatabase *db, BOOL *rollback))block;
- (NSError*)inSavePoint:(void (^)(FMDatabase *db, BOOL *rollback))block;
@end
@@ -255,4 +198,3 @@ NS_ASSUME_NONNULL_BEGIN
@end
NS_ASSUME_NONNULL_END

49
ios/Pods/FMDB/src/fmdb/FMDatabasePool.m generated Executable file → Normal file
View File

@@ -15,12 +15,7 @@
#import "FMDatabasePool.h"
#import "FMDatabase.h"
@interface FMDatabasePool () {
dispatch_queue_t _lockQueue;
NSMutableArray *_databaseInPool;
NSMutableArray *_databaseOutPool;
}
@interface FMDatabasePool()
- (void)pushDatabaseBackInPool:(FMDatabase*)db;
- (FMDatabase*)db;
@@ -35,27 +30,15 @@
@synthesize openFlags=_openFlags;
+ (instancetype)databasePoolWithPath:(NSString *)aPath {
+ (instancetype)databasePoolWithPath:(NSString*)aPath {
return FMDBReturnAutoreleased([[self alloc] initWithPath:aPath]);
}
+ (instancetype)databasePoolWithURL:(NSURL *)url {
return FMDBReturnAutoreleased([[self alloc] initWithPath:url.path]);
}
+ (instancetype)databasePoolWithPath:(NSString *)aPath flags:(int)openFlags {
+ (instancetype)databasePoolWithPath:(NSString*)aPath flags:(int)openFlags {
return FMDBReturnAutoreleased([[self alloc] initWithPath:aPath flags:openFlags]);
}
+ (instancetype)databasePoolWithURL:(NSURL *)url flags:(int)openFlags {
return FMDBReturnAutoreleased([[self alloc] initWithPath:url.path flags:openFlags]);
}
- (instancetype)initWithURL:(NSURL *)url flags:(int)openFlags vfs:(NSString *)vfsName {
return [self initWithPath:url.path flags:openFlags vfs:vfsName];
}
- (instancetype)initWithPath:(NSString*)aPath flags:(int)openFlags vfs:(NSString *)vfsName {
- (instancetype)initWithPath:(NSString*)aPath flags:(int)openFlags {
self = [super init];
@@ -65,36 +48,21 @@
_databaseInPool = FMDBReturnRetained([NSMutableArray array]);
_databaseOutPool = FMDBReturnRetained([NSMutableArray array]);
_openFlags = openFlags;
_vfsName = [vfsName copy];
}
return self;
}
- (instancetype)initWithPath:(NSString *)aPath flags:(int)openFlags {
return [self initWithPath:aPath flags:openFlags vfs:nil];
}
- (instancetype)initWithURL:(NSURL *)url flags:(int)openFlags {
return [self initWithPath:url.path flags:openFlags vfs:nil];
}
- (instancetype)initWithPath:(NSString*)aPath {
- (instancetype)initWithPath:(NSString*)aPath
{
// default flags for sqlite3_open
return [self initWithPath:aPath flags:SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE];
}
- (instancetype)initWithURL:(NSURL *)url {
return [self initWithPath:url.path];
}
- (instancetype)init {
return [self initWithPath:nil];
}
+ (Class)databaseClass {
return [FMDatabase class];
}
- (void)dealloc {
@@ -102,7 +70,6 @@
FMDBRelease(_path);
FMDBRelease(_databaseInPool);
FMDBRelease(_databaseOutPool);
FMDBRelease(_vfsName);
if (_lockQueue) {
FMDBDispatchQueueRelease(_lockQueue);
@@ -161,13 +128,13 @@
}
}
db = [[[self class] databaseClass] databaseWithPath:self->_path];
db = [FMDatabase databaseWithPath:self->_path];
shouldNotifyDelegate = YES;
}
//This ensures that the db is opened before returning
#if SQLITE_VERSION_NUMBER >= 3005000
BOOL success = [db openWithFlags:self->_openFlags vfs:self->_vfsName];
BOOL success = [db openWithFlags:self->_openFlags];
#else
BOOL success = [db open];
#endif

91
ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.h generated Executable file → Normal file
View File

@@ -8,8 +8,6 @@
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class FMDatabase;
/** To perform queries and updates on multiple threads, you'll want to use `FMDatabaseQueue`.
@@ -62,19 +60,21 @@ NS_ASSUME_NONNULL_BEGIN
*/
@interface FMDatabaseQueue : NSObject
@interface FMDatabaseQueue : NSObject {
NSString *_path;
dispatch_queue_t _queue;
FMDatabase *_db;
int _openFlags;
}
/** Path of database */
@property (atomic, retain, nullable) NSString *path;
@property (atomic, retain) NSString *path;
/** Open flags */
@property (atomic, readonly) int openFlags;
/** Custom virtual file system name */
@property (atomic, copy, nullable) NSString *vfsName;
///----------------------------------------------------
/// @name Initialization, opening, and closing of queue
///----------------------------------------------------
@@ -86,34 +86,16 @@ NS_ASSUME_NONNULL_BEGIN
@return The `FMDatabaseQueue` object. `nil` on error.
*/
+ (instancetype)databaseQueueWithPath:(NSString * _Nullable)aPath;
/** Create queue using file URL.
@param url The file `NSURL` of the database.
@return The `FMDatabaseQueue` object. `nil` on error.
*/
+ (instancetype)databaseQueueWithURL:(NSURL * _Nullable)url;
+ (instancetype)databaseQueueWithPath:(NSString*)aPath;
/** Create queue using path and specified flags.
@param aPath The file path of the database.
@param openFlags Flags passed to the openWithFlags method of the database.
@param openFlags Flags passed to the openWithFlags method of the database
@return The `FMDatabaseQueue` object. `nil` on error.
*/
+ (instancetype)databaseQueueWithPath:(NSString * _Nullable)aPath flags:(int)openFlags;
/** Create queue using file URL and specified flags.
@param url The file `NSURL` of the database.
@param openFlags Flags passed to the openWithFlags method of the database.
@return The `FMDatabaseQueue` object. `nil` on error.
*/
+ (instancetype)databaseQueueWithURL:(NSURL * _Nullable)url flags:(int)openFlags;
+ (instancetype)databaseQueueWithPath:(NSString*)aPath flags:(int)openFlags;
/** Create queue using path.
@@ -122,36 +104,17 @@ NS_ASSUME_NONNULL_BEGIN
@return The `FMDatabaseQueue` object. `nil` on error.
*/
- (instancetype)initWithPath:(NSString * _Nullable)aPath;
/** Create queue using file URL.
@param url The file `NSURL of the database.
@return The `FMDatabaseQueue` object. `nil` on error.
*/
- (instancetype)initWithURL:(NSURL * _Nullable)url;
- (instancetype)initWithPath:(NSString*)aPath;
/** Create queue using path and specified flags.
@param aPath The file path of the database.
@param openFlags Flags passed to the openWithFlags method of the database.
@param openFlags Flags passed to the openWithFlags method of the database
@return The `FMDatabaseQueue` object. `nil` on error.
*/
- (instancetype)initWithPath:(NSString * _Nullable)aPath flags:(int)openFlags;
/** Create queue using file URL and specified flags.
@param url The file path of the database.
@param openFlags Flags passed to the openWithFlags method of the database.
@return The `FMDatabaseQueue` object. `nil` on error.
*/
- (instancetype)initWithURL:(NSURL * _Nullable)url flags:(int)openFlags;
- (instancetype)initWithPath:(NSString*)aPath flags:(int)openFlags;
/** Create queue using path and specified flags.
@@ -162,18 +125,7 @@ NS_ASSUME_NONNULL_BEGIN
@return The `FMDatabaseQueue` object. `nil` on error.
*/
- (instancetype)initWithPath:(NSString * _Nullable)aPath flags:(int)openFlags vfs:(NSString * _Nullable)vfsName;
/** Create queue using file URL and specified flags.
@param url The file `NSURL of the database.
@param openFlags Flags passed to the openWithFlags method of the database
@param vfsName The name of a custom virtual file system
@return The `FMDatabaseQueue` object. `nil` on error.
*/
- (instancetype)initWithURL:(NSURL * _Nullable)url flags:(int)openFlags vfs:(NSString * _Nullable)vfsName;
- (instancetype)initWithPath:(NSString*)aPath flags:(int)openFlags vfs:(NSString *)vfsName;
/** Returns the Class of 'FMDatabase' subclass, that will be used to instantiate database object.
@@ -188,10 +140,6 @@ NS_ASSUME_NONNULL_BEGIN
- (void)close;
/** Interupt pending database operation. */
- (void)interrupt;
///-----------------------------------------------
/// @name Dispatching database operations to queue
///-----------------------------------------------
@@ -201,21 +149,21 @@ NS_ASSUME_NONNULL_BEGIN
@param block The code to be run on the queue of `FMDatabaseQueue`
*/
- (void)inDatabase:(__attribute__((noescape)) void (^)(FMDatabase *db))block;
- (void)inDatabase:(void (^)(FMDatabase *db))block;
/** Synchronously perform database operations on queue, using transactions.
@param block The code to be run on the queue of `FMDatabaseQueue`
*/
- (void)inTransaction:(__attribute__((noescape)) void (^)(FMDatabase *db, BOOL *rollback))block;
- (void)inTransaction:(void (^)(FMDatabase *db, BOOL *rollback))block;
/** Synchronously perform database operations on queue, using deferred transactions.
@param block The code to be run on the queue of `FMDatabaseQueue`
*/
- (void)inDeferredTransaction:(__attribute__((noescape)) void (^)(FMDatabase *db, BOOL *rollback))block;
- (void)inDeferredTransaction:(void (^)(FMDatabase *db, BOOL *rollback))block;
///-----------------------------------------------
/// @name Dispatching database operations to queue
@@ -228,8 +176,7 @@ NS_ASSUME_NONNULL_BEGIN
// NOTE: you can not nest these, since calling it will pull another database out of the pool and you'll get a deadlock.
// If you need to nest, use FMDatabase's startSavePointWithName:error: instead.
- (NSError * _Nullable)inSavePoint:(__attribute__((noescape)) void (^)(FMDatabase *db, BOOL *rollback))block;
- (NSError*)inSavePoint:(void (^)(FMDatabase *db, BOOL *rollback))block;
@end
NS_ASSUME_NONNULL_END

51
ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.m generated Executable file → Normal file
View File

@@ -30,15 +30,13 @@
*/
static const void * const kDispatchQueueSpecificKey = &kDispatchQueueSpecificKey;
@interface FMDatabaseQueue () {
dispatch_queue_t _queue;
FMDatabase *_db;
}
@end
@implementation FMDatabaseQueue
+ (instancetype)databaseQueueWithPath:(NSString *)aPath {
@synthesize path = _path;
@synthesize openFlags = _openFlags;
+ (instancetype)databaseQueueWithPath:(NSString*)aPath {
FMDatabaseQueue *q = [[self alloc] initWithPath:aPath];
FMDBAutorelease(q);
@@ -46,11 +44,8 @@ static const void * const kDispatchQueueSpecificKey = &kDispatchQueueSpecificKey
return q;
}
+ (instancetype)databaseQueueWithURL:(NSURL *)url {
return [self databaseQueueWithPath:url.path];
}
+ (instancetype)databaseQueueWithPath:(NSString*)aPath flags:(int)openFlags {
+ (instancetype)databaseQueueWithPath:(NSString *)aPath flags:(int)openFlags {
FMDatabaseQueue *q = [[self alloc] initWithPath:aPath flags:openFlags];
FMDBAutorelease(q);
@@ -58,19 +53,12 @@ static const void * const kDispatchQueueSpecificKey = &kDispatchQueueSpecificKey
return q;
}
+ (instancetype)databaseQueueWithURL:(NSURL *)url flags:(int)openFlags {
return [self databaseQueueWithPath:url.path flags:openFlags];
}
+ (Class)databaseClass {
return [FMDatabase class];
}
- (instancetype)initWithURL:(NSURL *)url flags:(int)openFlags vfs:(NSString *)vfsName {
return [self initWithPath:url.path flags:openFlags vfs:vfsName];
}
- (instancetype)initWithPath:(NSString*)aPath flags:(int)openFlags vfs:(NSString *)vfsName {
self = [super init];
if (self != nil) {
@@ -94,25 +82,17 @@ static const void * const kDispatchQueueSpecificKey = &kDispatchQueueSpecificKey
_queue = dispatch_queue_create([[NSString stringWithFormat:@"fmdb.%@", self] UTF8String], NULL);
dispatch_queue_set_specific(_queue, kDispatchQueueSpecificKey, (__bridge void *)self, NULL);
_openFlags = openFlags;
_vfsName = [vfsName copy];
}
return self;
}
- (instancetype)initWithPath:(NSString *)aPath flags:(int)openFlags {
- (instancetype)initWithPath:(NSString*)aPath flags:(int)openFlags {
return [self initWithPath:aPath flags:openFlags vfs:nil];
}
- (instancetype)initWithURL:(NSURL *)url flags:(int)openFlags {
return [self initWithPath:url.path flags:openFlags vfs:nil];
}
- (instancetype)initWithPath:(NSString*)aPath {
- (instancetype)initWithURL:(NSURL *)url {
return [self initWithPath:url.path];
}
- (instancetype)initWithPath:(NSString *)aPath {
// default flags for sqlite3_open
return [self initWithPath:aPath flags:SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE vfs:nil];
}
@@ -123,9 +103,9 @@ static const void * const kDispatchQueueSpecificKey = &kDispatchQueueSpecificKey
- (void)dealloc {
FMDBRelease(_db);
FMDBRelease(_path);
FMDBRelease(_vfsName);
if (_queue) {
FMDBDispatchQueueRelease(_queue);
@@ -146,16 +126,12 @@ static const void * const kDispatchQueueSpecificKey = &kDispatchQueueSpecificKey
FMDBRelease(self);
}
- (void)interrupt {
[[self database] interrupt];
}
- (FMDatabase*)database {
if (!_db) {
_db = FMDBReturnRetained([[[self class] databaseClass] databaseWithPath:_path]);
_db = FMDBReturnRetained([FMDatabase databaseWithPath:_path]);
#if SQLITE_VERSION_NUMBER >= 3005000
BOOL success = [_db openWithFlags:_openFlags vfs:_vfsName];
BOOL success = [_db openWithFlags:_openFlags];
#else
BOOL success = [_db open];
#endif
@@ -171,12 +147,10 @@ static const void * const kDispatchQueueSpecificKey = &kDispatchQueueSpecificKey
}
- (void)inDatabase:(void (^)(FMDatabase *db))block {
#ifndef NDEBUG
/* Get the currently executing queue (which should probably be nil, but in theory could be another DB queue
* and then check it against self to make sure we're not about to deadlock. */
FMDatabaseQueue *currentSyncQueue = (__bridge id)dispatch_get_specific(kDispatchQueueSpecificKey);
assert(currentSyncQueue != self && "inDatabase: was called reentrantly on the same queue, which would lead to a deadlock");
#endif
FMDBRetain(self);
@@ -201,6 +175,7 @@ static const void * const kDispatchQueueSpecificKey = &kDispatchQueueSpecificKey
FMDBRelease(self);
}
- (void)beginTransaction:(BOOL)useDeferred withBlock:(void (^)(FMDatabase *db, BOOL *rollback))block {
FMDBRetain(self);
dispatch_sync(_queue, ^() {

View File

@@ -1,7 +1,5 @@
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
#ifndef __has_feature // Optional.
#define __has_feature(x) 0 // Compatibility with non-clang compilers.
#endif
@@ -24,9 +22,13 @@ NS_ASSUME_NONNULL_BEGIN
- `<FMDatabase>`
*/
@interface FMResultSet : NSObject
@interface FMResultSet : NSObject {
FMDatabase *_parentDB;
FMStatement *_statement;
@property (nonatomic, retain, nullable) FMDatabase *parentDB;
NSString *_query;
NSMutableDictionary *_columnNameToIndexMap;
}
///-----------------
/// @name Properties
@@ -34,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
/** Executed query */
@property (atomic, retain, nullable) NSString *query;
@property (atomic, retain) NSString *query;
/** `NSMutableDictionary` mapping column names to numeric index */
@@ -42,7 +44,7 @@ NS_ASSUME_NONNULL_BEGIN
/** `FMStatement` used by result set. */
@property (atomic, retain, nullable) FMStatement *statement;
@property (atomic, retain) FMStatement *statement;
///------------------------------------
/// @name Creating and closing database
@@ -63,6 +65,8 @@ NS_ASSUME_NONNULL_BEGIN
- (void)close;
- (void)setParentDB:(FMDatabase *)newDb;
///---------------------------------------
/// @name Iterating through the result set
///---------------------------------------
@@ -89,7 +93,7 @@ NS_ASSUME_NONNULL_BEGIN
@see hasAnotherRow
*/
- (BOOL)nextWithError:(NSError * _Nullable *)outErr;
- (BOOL)nextWithError:(NSError **)outErr;
/** Did the last call to `<next>` succeed in retrieving another row?
@@ -111,7 +115,7 @@ NS_ASSUME_NONNULL_BEGIN
@return Integer value of the number of columns.
*/
@property (nonatomic, readonly) int columnCount;
- (int)columnCount;
/** Column index for column name
@@ -129,7 +133,7 @@ NS_ASSUME_NONNULL_BEGIN
@return columnName `NSString` value of the name of the column.
*/
- (NSString * _Nullable)columnNameForIndex:(int)columnIdx;
- (NSString*)columnNameForIndex:(int)columnIdx;
/** Result set integer value for column.
@@ -245,39 +249,39 @@ NS_ASSUME_NONNULL_BEGIN
@param columnName `NSString` value of the name of the column.
@return String value of the result set's column.
@return `NSString` value of the result set's column.
*/
- (NSString * _Nullable)stringForColumn:(NSString*)columnName;
- (NSString*)stringForColumn:(NSString*)columnName;
/** Result set `NSString` value for column.
@param columnIdx Zero-based index for column.
@return String value of the result set's column.
@return `NSString` value of the result set's column.
*/
- (NSString * _Nullable)stringForColumnIndex:(int)columnIdx;
- (NSString*)stringForColumnIndex:(int)columnIdx;
/** Result set `NSDate` value for column.
@param columnName `NSString` value of the name of the column.
@return Date value of the result set's column.
@return `NSDate` value of the result set's column.
*/
- (NSDate * _Nullable)dateForColumn:(NSString*)columnName;
- (NSDate*)dateForColumn:(NSString*)columnName;
/** Result set `NSDate` value for column.
@param columnIdx Zero-based index for column.
@return Date value of the result set's column.
@return `NSDate` value of the result set's column.
*/
- (NSDate * _Nullable)dateForColumnIndex:(int)columnIdx;
- (NSDate*)dateForColumnIndex:(int)columnIdx;
/** Result set `NSData` value for column.
@@ -285,20 +289,20 @@ NS_ASSUME_NONNULL_BEGIN
@param columnName `NSString` value of the name of the column.
@return Data value of the result set's column.
@return `NSData` value of the result set's column.
*/
- (NSData * _Nullable)dataForColumn:(NSString*)columnName;
- (NSData*)dataForColumn:(NSString*)columnName;
/** Result set `NSData` value for column.
@param columnIdx Zero-based index for column.
@return Data value of the result set's column.
@return `NSData` value of the result set's column.
*/
- (NSData * _Nullable)dataForColumnIndex:(int)columnIdx;
- (NSData*)dataForColumnIndex:(int)columnIdx;
/** Result set `(const unsigned char *)` value for column.
@@ -307,9 +311,7 @@ NS_ASSUME_NONNULL_BEGIN
@return `(const unsigned char *)` value of the result set's column.
*/
- (const unsigned char * _Nullable)UTF8StringForColumn:(NSString*)columnName;
- (const unsigned char * _Nullable)UTF8StringForColumnName:(NSString*)columnName __deprecated_msg("Use UTF8StringForColumn instead");
- (const unsigned char *)UTF8StringForColumnName:(NSString*)columnName;
/** Result set `(const unsigned char *)` value for column.
@@ -318,20 +320,18 @@ NS_ASSUME_NONNULL_BEGIN
@return `(const unsigned char *)` value of the result set's column.
*/
- (const unsigned char * _Nullable)UTF8StringForColumnIndex:(int)columnIdx;
- (const unsigned char *)UTF8StringForColumnIndex:(int)columnIdx;
/** Result set object for column.
@param columnName Name of the column.
@param columnName `NSString` value of the name of the column.
@return Either `NSNumber`, `NSString`, `NSData`, or `NSNull`. If the column was `NULL`, this returns `[NSNull null]` object.
@see objectForKeyedSubscript:
*/
- (id _Nullable)objectForColumn:(NSString*)columnName;
- (id _Nullable)objectForColumnName:(NSString*)columnName __deprecated_msg("Use objectForColumn instead");
- (id)objectForColumnName:(NSString*)columnName;
/** Result set object for column.
@@ -342,7 +342,7 @@ NS_ASSUME_NONNULL_BEGIN
@see objectAtIndexedSubscript:
*/
- (id _Nullable)objectForColumnIndex:(int)columnIdx;
- (id)objectForColumnIndex:(int)columnIdx;
/** Result set object for column.
@@ -363,7 +363,7 @@ NS_ASSUME_NONNULL_BEGIN
@return Either `NSNumber`, `NSString`, `NSData`, or `NSNull`. If the column was `NULL`, this returns `[NSNull null]` object.
*/
- (id _Nullable)objectForKeyedSubscript:(NSString *)columnName;
- (id)objectForKeyedSubscript:(NSString *)columnName;
/** Result set object for column.
@@ -384,13 +384,13 @@ NS_ASSUME_NONNULL_BEGIN
@return Either `NSNumber`, `NSString`, `NSData`, or `NSNull`. If the column was `NULL`, this returns `[NSNull null]` object.
*/
- (id _Nullable)objectAtIndexedSubscript:(int)columnIdx;
- (id)objectAtIndexedSubscript:(int)columnIdx;
/** Result set `NSData` value for column.
@param columnName `NSString` value of the name of the column.
@return Data value of the result set's column.
@return `NSData` value of the result set's column.
@warning If you are going to use this data after you iterate over the next row, or after you close the
result set, make sure to make a copy of the data first (or just use `<dataForColumn:>`/`<dataForColumnIndex:>`)
@@ -398,13 +398,13 @@ If you don't, you're going to be in a world of hurt when you try and use the dat
*/
- (NSData * _Nullable)dataNoCopyForColumn:(NSString *)columnName NS_RETURNS_NOT_RETAINED;
- (NSData*)dataNoCopyForColumn:(NSString*)columnName NS_RETURNS_NOT_RETAINED;
/** Result set `NSData` value for column.
@param columnIdx Zero-based index for column.
@return Data value of the result set's column.
@return `NSData` value of the result set's column.
@warning If you are going to use this data after you iterate over the next row, or after you close the
result set, make sure to make a copy of the data first (or just use `<dataForColumn:>`/`<dataForColumnIndex:>`)
@@ -412,7 +412,7 @@ If you don't, you're going to be in a world of hurt when you try and use the dat
*/
- (NSData * _Nullable)dataNoCopyForColumnIndex:(int)columnIdx NS_RETURNS_NOT_RETAINED;
- (NSData*)dataNoCopyForColumnIndex:(int)columnIdx NS_RETURNS_NOT_RETAINED;
/** Is the column `NULL`?
@@ -435,10 +435,12 @@ If you don't, you're going to be in a world of hurt when you try and use the dat
/** Returns a dictionary of the row results mapped to case sensitive keys of the column names.
@returns `NSDictionary` of the row results.
@warning The keys to the dictionary are case sensitive of the column names.
*/
@property (nonatomic, readonly, nullable) NSDictionary *resultDictionary;
- (NSDictionary*)resultDictionary;
/** Returns a dictionary of the row results
@@ -447,7 +449,7 @@ If you don't, you're going to be in a world of hurt when you try and use the dat
@warning **Deprecated**: Please use `<resultDictionary>` instead. Also, beware that `<resultDictionary>` is case sensitive!
*/
- (NSDictionary * _Nullable)resultDict __deprecated_msg("Use resultDictionary instead");
- (NSDictionary*)resultDict __attribute__ ((deprecated));
///-----------------------------
/// @name Key value coding magic
@@ -464,4 +466,3 @@ If you don't, you're going to be in a world of hurt when you try and use the dat
@end
NS_ASSUME_NONNULL_END

View File

@@ -12,12 +12,10 @@
- (void)resultSetDidClose:(FMResultSet *)resultSet;
@end
@interface FMResultSet () {
NSMutableDictionary *_columnNameToIndexMap;
}
@end
@implementation FMResultSet
@synthesize query=_query;
@synthesize statement=_statement;
+ (instancetype)resultSetWithStatement:(FMStatement *)statement usingParentDatabase:(FMDatabase*)aDB {
@@ -32,12 +30,10 @@
return FMDBReturnAutoreleased(rs);
}
#if ! __has_feature(objc_arc)
- (void)finalize {
[self close];
[super finalize];
}
#endif
- (void)dealloc {
[self close];
@@ -102,7 +98,7 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (NSDictionary *)resultDict {
- (NSDictionary*)resultDict {
NSUInteger num_cols = (NSUInteger)sqlite3_data_count([_statement statement]);
@@ -221,7 +217,7 @@
NSNumber *n = [[self columnNameToIndexMap] objectForKey:columnName];
if (n != nil) {
if (n) {
return [n intValue];
}
@@ -230,6 +226,8 @@
return -1;
}
- (int)intForColumn:(NSString*)columnName {
return [self intForColumnIndex:[self columnIndexForName:columnName]];
}
@@ -278,9 +276,9 @@
return sqlite3_column_double([_statement statement], columnIdx);
}
- (NSString *)stringForColumnIndex:(int)columnIdx {
- (NSString*)stringForColumnIndex:(int)columnIdx {
if (sqlite3_column_type([_statement statement], columnIdx) == SQLITE_NULL || (columnIdx < 0) || columnIdx >= sqlite3_column_count([_statement statement])) {
if (sqlite3_column_type([_statement statement], columnIdx) == SQLITE_NULL || (columnIdx < 0)) {
return nil;
}
@@ -304,7 +302,7 @@
- (NSDate*)dateForColumnIndex:(int)columnIdx {
if (sqlite3_column_type([_statement statement], columnIdx) == SQLITE_NULL || (columnIdx < 0) || columnIdx >= sqlite3_column_count([_statement statement])) {
if (sqlite3_column_type([_statement statement], columnIdx) == SQLITE_NULL || (columnIdx < 0)) {
return nil;
}
@@ -318,7 +316,7 @@
- (NSData*)dataForColumnIndex:(int)columnIdx {
if (sqlite3_column_type([_statement statement], columnIdx) == SQLITE_NULL || (columnIdx < 0) || columnIdx >= sqlite3_column_count([_statement statement])) {
if (sqlite3_column_type([_statement statement], columnIdx) == SQLITE_NULL || (columnIdx < 0)) {
return nil;
}
@@ -339,7 +337,7 @@
- (NSData*)dataNoCopyForColumnIndex:(int)columnIdx {
if (sqlite3_column_type([_statement statement], columnIdx) == SQLITE_NULL || (columnIdx < 0) || columnIdx >= sqlite3_column_count([_statement statement])) {
if (sqlite3_column_type([_statement statement], columnIdx) == SQLITE_NULL || (columnIdx < 0)) {
return nil;
}
@@ -362,26 +360,18 @@
- (const unsigned char *)UTF8StringForColumnIndex:(int)columnIdx {
if (sqlite3_column_type([_statement statement], columnIdx) == SQLITE_NULL || (columnIdx < 0) || columnIdx >= sqlite3_column_count([_statement statement])) {
if (sqlite3_column_type([_statement statement], columnIdx) == SQLITE_NULL || (columnIdx < 0)) {
return nil;
}
return sqlite3_column_text([_statement statement], columnIdx);
}
- (const unsigned char *)UTF8StringForColumn:(NSString*)columnName {
- (const unsigned char *)UTF8StringForColumnName:(NSString*)columnName {
return [self UTF8StringForColumnIndex:[self columnIndexForName:columnName]];
}
- (const unsigned char *)UTF8StringForColumnName:(NSString*)columnName {
return [self UTF8StringForColumn:columnName];
}
- (id)objectForColumnIndex:(int)columnIdx {
if (columnIdx < 0 || columnIdx >= sqlite3_column_count([_statement statement])) {
return nil;
}
int columnType = sqlite3_column_type([_statement statement], columnIdx);
id returnValue = nil;
@@ -408,10 +398,6 @@
}
- (id)objectForColumnName:(NSString*)columnName {
return [self objectForColumn:columnName];
}
- (id)objectForColumn:(NSString*)columnName {
return [self objectForColumnIndex:[self columnIndexForName:columnName]];
}
@@ -420,12 +406,16 @@
return [NSString stringWithUTF8String: sqlite3_column_name([_statement statement], columnIdx)];
}
- (void)setParentDB:(FMDatabase *)newDb {
_parentDB = newDb;
}
- (id)objectAtIndexedSubscript:(int)columnIdx {
return [self objectForColumnIndex:columnIdx];
}
- (id)objectForKeyedSubscript:(NSString *)columnName {
return [self objectForColumn:columnName];
return [self objectForColumnName:columnName];
}

22
ios/Pods/Manifest.lock generated
View File

@@ -1,8 +1,8 @@
PODS:
- Flutter (1.0.0)
- FMDB (2.7.2):
- FMDB/standard (= 2.7.2)
- FMDB/standard (2.7.2)
- FMDB (2.6.2):
- FMDB/standard (= 2.6.2)
- FMDB/standard (2.6.2)
- path_provider (0.0.1):
- Flutter
- sqflite (0.0.1):
@@ -10,24 +10,24 @@ PODS:
- FMDB
DEPENDENCIES:
- Flutter (from `/Users/sozinov/flutter/bin/cache/artifacts/engine/ios`)
- path_provider (from `/Users/sozinov/.pub-cache/hosted/pub.dartlang.org/path_provider-0.2.1+1/ios`)
- sqflite (from `/Users/sozinov/.pub-cache/hosted/pub.dartlang.org/sqflite-0.2.4/ios`)
- Flutter (from `/Users/ntrlab/flutter/bin/cache/artifacts/engine/ios`)
- path_provider (from `/Users/ntrlab/.pub-cache/hosted/pub.dartlang.org/path_provider-0.2.1+1/ios`)
- sqflite (from `/Users/ntrlab/.pub-cache/hosted/pub.dartlang.org/sqflite-0.2.4/ios`)
EXTERNAL SOURCES:
Flutter:
:path: /Users/sozinov/flutter/bin/cache/artifacts/engine/ios
:path: /Users/ntrlab/flutter/bin/cache/artifacts/engine/ios
path_provider:
:path: /Users/sozinov/.pub-cache/hosted/pub.dartlang.org/path_provider-0.2.1+1/ios
:path: /Users/ntrlab/.pub-cache/hosted/pub.dartlang.org/path_provider-0.2.1+1/ios
sqflite:
:path: /Users/sozinov/.pub-cache/hosted/pub.dartlang.org/sqflite-0.2.4/ios
:path: /Users/ntrlab/.pub-cache/hosted/pub.dartlang.org/sqflite-0.2.4/ios
SPEC CHECKSUMS:
Flutter: d674e78c937094a75ac71dd77e921e840bea3dbf
FMDB: 6198a90e7b6900cfc046e6bc0ef6ebb7be9236aa
FMDB: 854a0341b4726e53276f2a8996f06f1b80f9259a
path_provider: f96fff6166a8867510d2c25fdcc346327cc4b259
sqflite: 8e2d9fe1e7cdc95d4d537fc7eb2d23c8dc428e3c
PODFILE CHECKSUM: 351e02e34b831289961ec3558a535cbd2c4965d2
COCOAPODS: 1.3.1
COCOAPODS: 1.2.1

View File

@@ -7,29 +7,29 @@
objects = {
/* Begin PBXBuildFile section */
0275983C85B82B8AEF3C4BBEDF6F8F65 /* SqflitePlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 245693FC3F354C3C436CD1E7968FD32E /* SqflitePlugin.h */; settings = {ATTRIBUTES = (Public, ); }; };
05A982FECA099A43B0BC98D622441FAE /* PathProviderPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 43ADCBB14A964C5A31E1435545C7C49A /* PathProviderPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; };
0A3AA45E708AEBE5491F112FF86826E6 /* FMResultSet.m in Sources */ = {isa = PBXBuildFile; fileRef = 71B69D4A7150AC2F65A57B7D04F092D4 /* FMResultSet.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; };
0DDFE649E817E8E428BD87DBFA928B6A /* FMResultSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 69CC8B63F837EA7B053AB8BA07253A25 /* FMResultSet.h */; settings = {ATTRIBUTES = (Public, ); }; };
1FB202F9CC5A6B1BDF544D6331CC65E9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; };
3CFE852DE6FED9F7DF15F9EA857128A8 /* sqflite-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4EE88B4ED62E7C707EC8249A71508066 /* sqflite-dummy.m */; };
534A2178342F283B51EACFFDFFE40191 /* sqflite-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AEE6E6B79FE3A05399CBC9D72C09209 /* sqflite-dummy.m */; };
5E4CF03E66D6F8A4740E7E79DEB429BD /* FMDatabasePool.m in Sources */ = {isa = PBXBuildFile; fileRef = 400AFB42920EB39709666D3F1A73D6C2 /* FMDatabasePool.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; };
5F3656EE3D432CA623783D4CF342F0D8 /* Pods-Runner-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 1086A466F3A8C5B95BB9FFDFF3E7C0C7 /* Pods-Runner-dummy.m */; };
6CBBBD55FA103C4CDEB6D91AF00CD1B8 /* FMDatabasePool.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AF3AEDDA16DD8E28B59FF0788FDDC03 /* FMDatabasePool.h */; settings = {ATTRIBUTES = (Public, ); }; };
6D16310077B5942FA3612F8E378AA5A9 /* SqflitePlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C927F583AB6D21CB119DD79372182E6 /* SqflitePlugin.h */; settings = {ATTRIBUTES = (Public, ); }; };
6FEE3188E0CDBD416EAB4294ED8B27A5 /* SqflitePlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 56E83D19356F253A8A090F3A5EB4A1A4 /* SqflitePlugin.m */; };
731E8A5B80ABFB6037EE3757A840E7EE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; };
81DC828A0B2DBF6E914B43538C678149 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; };
834E6C3CE80E3BD5FBD61DDEBF7C129E /* PathProviderPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BECC4A0389C26140813DE6C2B8210EE /* PathProviderPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; };
885FA5A8E4062F05235E1BB351829299 /* FMDatabaseAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BCC0EED53ED8D7C1931178E0E4269B4 /* FMDatabaseAdditions.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; };
964F7658C2F163B024D944143BA2B366 /* FMDatabase.m in Sources */ = {isa = PBXBuildFile; fileRef = DC7C30F9E55829B027C4913D1F19D68C /* FMDatabase.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; };
A44C9EAA45872D379216F27269E493F1 /* FMDatabaseQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 33F15B71183AD666DFC49D907F769ACF /* FMDatabaseQueue.h */; settings = {ATTRIBUTES = (Public, ); }; };
CCCE6327D9EB4C3524863A4C9F40A534 /* path_provider-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 01EE1398A8E1CE9BAB2759C0904398ED /* path_provider-dummy.m */; };
DBC373403E0C92A8A2C4BC2D4614A5F2 /* FMDatabaseAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = D2DD52CB174E1DC79111C38E770F6FC8 /* FMDatabaseAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
DC2DD5729CD216714D698D25901C2214 /* FMDatabaseQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = C11A8F38580C7A7FF38ACB6A3B412884 /* FMDatabaseQueue.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; };
F3D10137BAA618261AD8F02DC73BB810 /* path_provider-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 17ED766A5C592E8CFCC712CD174AE467 /* path_provider-dummy.m */; };
F4B3EA658E75B0E535C3DEFE24148F0C /* FMDB.h in Headers */ = {isa = PBXBuildFile; fileRef = 91893D40185E0EFA40FC217BE44A7C0D /* FMDB.h */; settings = {ATTRIBUTES = (Public, ); }; };
F6B5EEC2E3BC8722930840274D92FDC9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; };
F703EABB9F02DB9BBD35F2898762FF82 /* FMDB-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D76813CB39ACC402A9EE3DC12B4E682 /* FMDB-dummy.m */; };
F758CC216AD6D5080A98A5C906D21B8F /* SqflitePlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 3873B941D43C943B5E65CE21BA4EA45F /* SqflitePlugin.m */; };
FE229C815FB3207DEA535129B9A252ED /* FMDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 638E465E4B27490B0FB423614C3ADD11 /* FMDatabase.h */; settings = {ATTRIBUTES = (Public, ); }; };
FF24EA25EC430D10D09B5E31B6E3EB30 /* PathProviderPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 81450A0675D21CF0C5112033DDE704F3 /* PathProviderPlugin.m */; };
FFE88F263143BC1EEE55869071E74417 /* PathProviderPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 6AC4DC3453D344EE0548E054C3750260 /* PathProviderPlugin.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -65,30 +65,31 @@
/* Begin PBXFileReference section */
003397356FD1052F1B7B632E25DB1274 /* libFMDB.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libFMDB.a; path = libFMDB.a; sourceTree = BUILT_PRODUCTS_DIR; };
0176FEA81EA118E60DB16DFEF750F575 /* sqflite-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "sqflite-prefix.pch"; sourceTree = "<group>"; };
01EE1398A8E1CE9BAB2759C0904398ED /* path_provider-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "path_provider-dummy.m"; sourceTree = "<group>"; };
01FFC258241FD6531167B29D7C3AABCE /* libpath_provider.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libpath_provider.a; path = libpath_provider.a; sourceTree = BUILT_PRODUCTS_DIR; };
0AEE6E6B79FE3A05399CBC9D72C09209 /* sqflite-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "sqflite-dummy.m"; sourceTree = "<group>"; };
1086A466F3A8C5B95BB9FFDFF3E7C0C7 /* Pods-Runner-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Runner-dummy.m"; sourceTree = "<group>"; };
17ED766A5C592E8CFCC712CD174AE467 /* path_provider-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "path_provider-dummy.m"; sourceTree = "<group>"; };
180AB1F194E38A2A27B5CEB66C9A1F09 /* Pods-Runner-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Runner-frameworks.sh"; sourceTree = "<group>"; };
1AF3AEDDA16DD8E28B59FF0788FDDC03 /* FMDatabasePool.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FMDatabasePool.h; path = src/fmdb/FMDatabasePool.h; sourceTree = "<group>"; };
2C927F583AB6D21CB119DD79372182E6 /* SqflitePlugin.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SqflitePlugin.h; path = Classes/SqflitePlugin.h; sourceTree = "<group>"; };
245693FC3F354C3C436CD1E7968FD32E /* SqflitePlugin.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = SqflitePlugin.h; sourceTree = "<group>"; };
33F15B71183AD666DFC49D907F769ACF /* FMDatabaseQueue.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FMDatabaseQueue.h; path = src/fmdb/FMDatabaseQueue.h; sourceTree = "<group>"; };
3873B941D43C943B5E65CE21BA4EA45F /* SqflitePlugin.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = SqflitePlugin.m; sourceTree = "<group>"; };
3BCC0EED53ED8D7C1931178E0E4269B4 /* FMDatabaseAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FMDatabaseAdditions.m; path = src/fmdb/FMDatabaseAdditions.m; sourceTree = "<group>"; };
3BECC4A0389C26140813DE6C2B8210EE /* PathProviderPlugin.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PathProviderPlugin.h; path = Classes/PathProviderPlugin.h; sourceTree = "<group>"; };
3F8DCA264D4A7E7254305B946F3D73F0 /* Pods-Runner-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Runner-acknowledgements.markdown"; sourceTree = "<group>"; };
400AFB42920EB39709666D3F1A73D6C2 /* FMDatabasePool.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FMDatabasePool.m; path = src/fmdb/FMDatabasePool.m; sourceTree = "<group>"; };
43C335658A2B46A6980F30ED63D600F9 /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Flutter.framework; sourceTree = "<group>"; };
415E1188B3202852749D1EFFEEB90485 /* sqflite.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = sqflite.xcconfig; sourceTree = "<group>"; };
43ADCBB14A964C5A31E1435545C7C49A /* PathProviderPlugin.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PathProviderPlugin.h; sourceTree = "<group>"; };
4532A70C1CFAB30C4266017A71B77D1F /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
4EE88B4ED62E7C707EC8249A71508066 /* sqflite-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "sqflite-dummy.m"; sourceTree = "<group>"; };
56E83D19356F253A8A090F3A5EB4A1A4 /* SqflitePlugin.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SqflitePlugin.m; path = Classes/SqflitePlugin.m; sourceTree = "<group>"; };
5047ABF432994AE77E6A7D53ABAF250B /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Flutter.framework; sourceTree = "<group>"; };
5C8299479CF1A66A335CD3BB7C3632ED /* Pods-Runner-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Runner-resources.sh"; sourceTree = "<group>"; };
6275B5E067A1E7C9B5D3A5FCAD7BB17E /* path_provider-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "path_provider-prefix.pch"; sourceTree = "<group>"; };
638E465E4B27490B0FB423614C3ADD11 /* FMDatabase.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FMDatabase.h; path = src/fmdb/FMDatabase.h; sourceTree = "<group>"; };
6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
69CC8B63F837EA7B053AB8BA07253A25 /* FMResultSet.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FMResultSet.h; path = src/fmdb/FMResultSet.h; sourceTree = "<group>"; };
6AC4DC3453D344EE0548E054C3750260 /* PathProviderPlugin.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = PathProviderPlugin.m; sourceTree = "<group>"; };
6D76813CB39ACC402A9EE3DC12B4E682 /* FMDB-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "FMDB-dummy.m"; sourceTree = "<group>"; };
71B69D4A7150AC2F65A57B7D04F092D4 /* FMResultSet.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FMResultSet.m; path = src/fmdb/FMResultSet.m; sourceTree = "<group>"; };
78226A7E12E0090182848D3F769FF7C9 /* sqflite.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = sqflite.xcconfig; sourceTree = "<group>"; };
7AA1C065B2238B882B9E918A1D78F65A /* path_provider.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = path_provider.xcconfig; sourceTree = "<group>"; };
81450A0675D21CF0C5112033DDE704F3 /* PathProviderPlugin.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PathProviderPlugin.m; path = Classes/PathProviderPlugin.m; sourceTree = "<group>"; };
859495150A1CA9A06BB797FA29E850C3 /* Pods-Runner-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Runner-acknowledgements.plist"; sourceTree = "<group>"; };
91893D40185E0EFA40FC217BE44A7C0D /* FMDB.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FMDB.h; path = src/fmdb/FMDB.h; sourceTree = "<group>"; };
93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
@@ -96,13 +97,12 @@
A47118E0497C287385E5E40F74B45592 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-Runner.a"; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
A52E6E664A33D0ADBF28C096726C8FAA /* libsqflite.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libsqflite.a; path = libsqflite.a; sourceTree = BUILT_PRODUCTS_DIR; };
B2AC8D08AB9E95E701EC049C53414AEB /* FMDB.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = FMDB.xcconfig; sourceTree = "<group>"; };
BE773F7EB56E5F717FFB6CFECB651D18 /* sqflite-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "sqflite-prefix.pch"; sourceTree = "<group>"; };
C01D2261DFAB70EC8E5F1A1385D6F66E /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
C11A8F38580C7A7FF38ACB6A3B412884 /* FMDatabaseQueue.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FMDatabaseQueue.m; path = src/fmdb/FMDatabaseQueue.m; sourceTree = "<group>"; };
CAA729AA4202C0AC1EA594504353C960 /* Pods-Runner.debug-develop.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Runner.debug-develop.xcconfig"; sourceTree = "<group>"; };
D2DD52CB174E1DC79111C38E770F6FC8 /* FMDatabaseAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FMDatabaseAdditions.h; path = src/fmdb/FMDatabaseAdditions.h; sourceTree = "<group>"; };
DC7C30F9E55829B027C4913D1F19D68C /* FMDatabase.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FMDatabase.m; path = src/fmdb/FMDatabase.m; sourceTree = "<group>"; };
F360BB1601C159E7F0A615F1C5EC8564 /* path_provider-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "path_provider-prefix.pch"; sourceTree = "<group>"; };
F106895603183989173BE0D345A2711F /* path_provider.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = path_provider.xcconfig; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -141,6 +141,26 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
033F0D85B80657883D6B8D03937F6047 /* sqflite */ = {
isa = PBXGroup;
children = (
8D91B5C28ED05631F40CE4DF7378F09E /* Classes */,
AE2301D7E2F1890611E1597CA8D966BD /* Support Files */,
);
name = sqflite;
path = "/Users/ntrlab/.pub-cache/hosted/pub.dartlang.org/sqflite-0.2.4/ios";
sourceTree = "<absolute>";
};
0731E9A857A43580399655CFE24C9754 /* Classes */ = {
isa = PBXGroup;
children = (
43ADCBB14A964C5A31E1435545C7C49A /* PathProviderPlugin.h */,
6AC4DC3453D344EE0548E054C3750260 /* PathProviderPlugin.m */,
);
name = Classes;
path = Classes;
sourceTree = "<group>";
};
1A3BC54721BAA16B749DAA153DA8F5A5 /* Targets Support Files */ = {
isa = PBXGroup;
children = (
@@ -165,12 +185,24 @@
path = "Target Support Files/Pods-Runner";
sourceTree = "<group>";
};
4E41A81923F4DF71485AFEA308BDA8CE /* Frameworks */ = {
2F8F14E5550349C5D699E6CDAA89431B /* path_provider */ = {
isa = PBXGroup;
children = (
43C335658A2B46A6980F30ED63D600F9 /* Flutter.framework */,
0731E9A857A43580399655CFE24C9754 /* Classes */,
DE2DE5E3371B71E876D9A74910E0F059 /* Support Files */,
);
name = Frameworks;
name = path_provider;
path = "/Users/ntrlab/.pub-cache/hosted/pub.dartlang.org/path_provider-0.2.1+1/ios";
sourceTree = "<absolute>";
};
3AE5C329546DC7C9F95F27D9480AC3B5 /* Development Pods */ = {
isa = PBXGroup;
children = (
B3414820CF29E105FCE3552EF4656B6F /* Flutter */,
2F8F14E5550349C5D699E6CDAA89431B /* path_provider */,
033F0D85B80657883D6B8D03937F6047 /* sqflite */,
);
name = "Development Pods";
sourceTree = "<group>";
};
64A6B117D4CD0E751BFC131087154F68 /* Products */ = {
@@ -195,31 +227,11 @@
path = "../Target Support Files/FMDB";
sourceTree = "<group>";
};
6AA8AF79708D14C790026D8AFE120B54 /* sqflite */ = {
isa = PBXGroup;
children = (
2C927F583AB6D21CB119DD79372182E6 /* SqflitePlugin.h */,
56E83D19356F253A8A090F3A5EB4A1A4 /* SqflitePlugin.m */,
96A9910D7FCB6C803EB0532C5AD30F0A /* Support Files */,
);
name = sqflite;
path = "/Users/sozinov/.pub-cache/hosted/pub.dartlang.org/sqflite-0.2.4/ios";
sourceTree = "<absolute>";
};
6D95707A54888CCDE44B6A9A23C999F0 /* Flutter */ = {
isa = PBXGroup;
children = (
4E41A81923F4DF71485AFEA308BDA8CE /* Frameworks */,
);
name = Flutter;
path = /Users/sozinov/flutter/bin/cache/artifacts/engine/ios;
sourceTree = "<absolute>";
};
7DB346D0F39D3F0E887471402A8071AB = {
isa = PBXGroup;
children = (
93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */,
FF4061DE8A3B22F412830AD1490C30B5 /* Development Pods */,
3AE5C329546DC7C9F95F27D9480AC3B5 /* Development Pods */,
BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */,
BFB8C92E749ED180124155E2270474D2 /* Pods */,
64A6B117D4CD0E751BFC131087154F68 /* Products */,
@@ -227,26 +239,34 @@
);
sourceTree = "<group>";
};
96A9910D7FCB6C803EB0532C5AD30F0A /* Support Files */ = {
8D91B5C28ED05631F40CE4DF7378F09E /* Classes */ = {
isa = PBXGroup;
children = (
78226A7E12E0090182848D3F769FF7C9 /* sqflite.xcconfig */,
4EE88B4ED62E7C707EC8249A71508066 /* sqflite-dummy.m */,
BE773F7EB56E5F717FFB6CFECB651D18 /* sqflite-prefix.pch */,
245693FC3F354C3C436CD1E7968FD32E /* SqflitePlugin.h */,
3873B941D43C943B5E65CE21BA4EA45F /* SqflitePlugin.m */,
);
name = "Support Files";
path = "../../../../../Developer/checker/checker/ios/Pods/Target Support Files/sqflite";
name = Classes;
path = Classes;
sourceTree = "<group>";
};
A7851D2B787DDC71C43873697BFAEEDD /* path_provider */ = {
AE2301D7E2F1890611E1597CA8D966BD /* Support Files */ = {
isa = PBXGroup;
children = (
3BECC4A0389C26140813DE6C2B8210EE /* PathProviderPlugin.h */,
81450A0675D21CF0C5112033DDE704F3 /* PathProviderPlugin.m */,
BD0A46A0EE0A36277E05C01B1F269664 /* Support Files */,
415E1188B3202852749D1EFFEEB90485 /* sqflite.xcconfig */,
0AEE6E6B79FE3A05399CBC9D72C09209 /* sqflite-dummy.m */,
0176FEA81EA118E60DB16DFEF750F575 /* sqflite-prefix.pch */,
);
name = path_provider;
path = "/Users/sozinov/.pub-cache/hosted/pub.dartlang.org/path_provider-0.2.1+1/ios";
name = "Support Files";
path = "../../../../../semyon/apps/checker/ios/Pods/Target Support Files/sqflite";
sourceTree = "<group>";
};
B3414820CF29E105FCE3552EF4656B6F /* Flutter */ = {
isa = PBXGroup;
children = (
DE76559F1F56B9B93DD17897DEE2313C /* Frameworks */,
);
name = Flutter;
path = /Users/ntrlab/flutter/bin/cache/artifacts/engine/ios;
sourceTree = "<absolute>";
};
BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = {
@@ -257,17 +277,6 @@
name = Frameworks;
sourceTree = "<group>";
};
BD0A46A0EE0A36277E05C01B1F269664 /* Support Files */ = {
isa = PBXGroup;
children = (
7AA1C065B2238B882B9E918A1D78F65A /* path_provider.xcconfig */,
17ED766A5C592E8CFCC712CD174AE467 /* path_provider-dummy.m */,
F360BB1601C159E7F0A615F1C5EC8564 /* path_provider-prefix.pch */,
);
name = "Support Files";
path = "../../../../../Developer/checker/checker/ios/Pods/Target Support Files/path_provider";
sourceTree = "<group>";
};
BFB8C92E749ED180124155E2270474D2 /* Pods */ = {
isa = PBXGroup;
children = (
@@ -302,6 +311,25 @@
name = iOS;
sourceTree = "<group>";
};
DE2DE5E3371B71E876D9A74910E0F059 /* Support Files */ = {
isa = PBXGroup;
children = (
F106895603183989173BE0D345A2711F /* path_provider.xcconfig */,
01EE1398A8E1CE9BAB2759C0904398ED /* path_provider-dummy.m */,
6275B5E067A1E7C9B5D3A5FCAD7BB17E /* path_provider-prefix.pch */,
);
name = "Support Files";
path = "../../../../../semyon/apps/checker/ios/Pods/Target Support Files/path_provider";
sourceTree = "<group>";
};
DE76559F1F56B9B93DD17897DEE2313C /* Frameworks */ = {
isa = PBXGroup;
children = (
5047ABF432994AE77E6A7D53ABAF250B /* Flutter.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
DEA37EDFE575D4B41E183255F5C2B8C8 /* FMDB */ = {
isa = PBXGroup;
children = (
@@ -312,32 +340,22 @@
path = FMDB;
sourceTree = "<group>";
};
FF4061DE8A3B22F412830AD1490C30B5 /* Development Pods */ = {
isa = PBXGroup;
children = (
6D95707A54888CCDE44B6A9A23C999F0 /* Flutter */,
A7851D2B787DDC71C43873697BFAEEDD /* path_provider */,
6AA8AF79708D14C790026D8AFE120B54 /* sqflite */,
);
name = "Development Pods";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
4E142C8D5F5A788FABFA3BF63E227974 /* Headers */ = {
6D5F5A8571DEBE7AC0FE0D3455AFBA46 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
834E6C3CE80E3BD5FBD61DDEBF7C129E /* PathProviderPlugin.h in Headers */,
05A982FECA099A43B0BC98D622441FAE /* PathProviderPlugin.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
6E49CE0548C34B7B24EE1DCFA1ED7E11 /* Headers */ = {
9E575053C725E72B7BAB34F8DAFC6ED9 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
6D16310077B5942FA3612F8E378AA5A9 /* SqflitePlugin.h in Headers */,
0275983C85B82B8AEF3C4BBEDF6F8F65 /* SqflitePlugin.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -397,9 +415,9 @@
isa = PBXNativeTarget;
buildConfigurationList = D683C7800E224AA1BCE1A5D1014095AA /* Build configuration list for PBXNativeTarget "sqflite" */;
buildPhases = (
A9C4A271CD4E9EBFD62DC3FA317C4376 /* Sources */,
070684A2243BD9D4CF0E21C7015C4C49 /* Sources */,
E77DFBE401E6EB8D3FDB709749F7756D /* Frameworks */,
6E49CE0548C34B7B24EE1DCFA1ED7E11 /* Headers */,
9E575053C725E72B7BAB34F8DAFC6ED9 /* Headers */,
);
buildRules = (
);
@@ -415,9 +433,9 @@
isa = PBXNativeTarget;
buildConfigurationList = 20E959984CF6E2A34CFF08E1335F922A /* Build configuration list for PBXNativeTarget "path_provider" */;
buildPhases = (
5FBC105E0D7DFE08F2C0A6DAE2280768 /* Sources */,
FC0496B502691C4870045CFBB8579F55 /* Sources */,
C8ECFE49FBB48866AF20945FA64C3E9A /* Frameworks */,
4E142C8D5F5A788FABFA3BF63E227974 /* Headers */,
6D5F5A8571DEBE7AC0FE0D3455AFBA46 /* Headers */,
);
buildRules = (
);
@@ -458,12 +476,12 @@
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
5FBC105E0D7DFE08F2C0A6DAE2280768 /* Sources */ = {
070684A2243BD9D4CF0E21C7015C4C49 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F3D10137BAA618261AD8F02DC73BB810 /* path_provider-dummy.m in Sources */,
FF24EA25EC430D10D09B5E31B6E3EB30 /* PathProviderPlugin.m in Sources */,
534A2178342F283B51EACFFDFFE40191 /* sqflite-dummy.m in Sources */,
F758CC216AD6D5080A98A5C906D21B8F /* SqflitePlugin.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -480,15 +498,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
A9C4A271CD4E9EBFD62DC3FA317C4376 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3CFE852DE6FED9F7DF15F9EA857128A8 /* sqflite-dummy.m in Sources */,
6FEE3188E0CDBD416EAB4294ED8B27A5 /* SqflitePlugin.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
D88643062B7602B884A23652394EF04D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -497,6 +506,15 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
FC0496B502691C4870045CFBB8579F55 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
CCCE6327D9EB4C3524863A4C9F40A534 /* path_provider-dummy.m in Sources */,
FFE88F263143BC1EEE55869071E74417 /* PathProviderPlugin.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
@@ -527,54 +545,67 @@
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
1C7D17A37D091C98D2F0DD886C3A9320 /* Debug */ = {
07D867E55B5AB8B7870C1E6A33FEBBBB /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = B2AC8D08AB9E95E701EC049C53414AEB /* FMDB.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
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;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGNING_REQUIRED = NO;
COPY_PHASE_STRIP = NO;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"POD_CONFIGURATION_DEBUG=1",
"DEBUG=1",
"$(inherited)",
ARCHS = (
"$(ARCHS_STANDARD)",
arm64,
arm7s,
armv7,
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
ONLY_ACTIVE_ARCH = YES;
PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/;
STRIP_INSTALLED_PRODUCT = NO;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SYMROOT = "${SRCROOT}/../build";
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_BITCODE = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREFIX_HEADER = "Target Support Files/FMDB/FMDB-prefix.pch";
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PRIVATE_HEADERS_FOLDER_PATH = "";
PRODUCT_NAME = "$(TARGET_NAME)";
PUBLIC_HEADERS_FOLDER_PATH = "";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
};
name = Debug;
name = Release;
};
19A0575138638B2F05A2B2FD69B99D6D /* Debug-develop */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = F106895603183989173BE0D345A2711F /* path_provider.xcconfig */;
buildSettings = {
ARCHS = (
"$(ARCHS_STANDARD)",
arm64,
arm7s,
armv7,
);
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_BITCODE = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREFIX_HEADER = "Target Support Files/path_provider/path_provider-prefix.pch";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PRIVATE_HEADERS_FOLDER_PATH = "";
PRODUCT_NAME = "$(TARGET_NAME)";
PUBLIC_HEADERS_FOLDER_PATH = "";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
};
name = "Debug-develop";
};
34FE9531DA9AF2820790339988D5FF41 /* Release */ = {
isa = XCBuildConfiguration;
@@ -650,9 +681,9 @@
};
name = Debug;
};
4B05161798033C529E36DA866EA23FC7 /* Debug */ = {
370B7DE297A709920A0BB2EBD76A76E3 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AA1C065B2238B882B9E918A1D78F65A /* path_provider.xcconfig */;
baseConfigurationReference = F106895603183989173BE0D345A2711F /* path_provider.xcconfig */;
buildSettings = {
ARCHS = (
"$(ARCHS_STANDARD)",
@@ -663,13 +694,13 @@
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
DEBUG_INFORMATION_FORMAT = dwarf;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_BITCODE = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREFIX_HEADER = "Target Support Files/path_provider/path_provider-prefix.pch";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PRIVATE_HEADERS_FOLDER_PATH = "";
@@ -677,12 +708,42 @@
PUBLIC_HEADERS_FOLDER_PATH = "";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
SWIFT_VERSION = 3.0;
};
name = Debug;
name = Release;
};
85F8B1923EC4E7B2870FEF674AB9559D /* Debug */ = {
7173E8A291934D86B87B7C8172E6600D /* Debug-develop */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = B2AC8D08AB9E95E701EC049C53414AEB /* FMDB.xcconfig */;
buildSettings = {
ARCHS = (
"$(ARCHS_STANDARD)",
arm64,
arm7s,
armv7,
);
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_BITCODE = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREFIX_HEADER = "Target Support Files/FMDB/FMDB-prefix.pch";
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PRIVATE_HEADERS_FOLDER_PATH = "";
PRODUCT_NAME = "$(TARGET_NAME)";
PUBLIC_HEADERS_FOLDER_PATH = "";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
};
name = "Debug-develop";
};
8C006BAAA9098B2F3F3C6EF9B1943E46 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = B2AC8D08AB9E95E701EC049C53414AEB /* FMDB.xcconfig */;
buildSettings = {
@@ -709,39 +770,6 @@
PUBLIC_HEADERS_FOLDER_PATH = "";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
8A1DDB651D50EE0BD3BD1121C16538DB /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 78226A7E12E0090182848D3F769FF7C9 /* sqflite.xcconfig */;
buildSettings = {
ARCHS = (
"$(ARCHS_STANDARD)",
arm64,
arm7s,
armv7,
);
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_BITCODE = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREFIX_HEADER = "Target Support Files/sqflite/sqflite-prefix.pch";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PRIVATE_HEADERS_FOLDER_PATH = "";
PRODUCT_NAME = "$(TARGET_NAME)";
PUBLIC_HEADERS_FOLDER_PATH = "";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
SWIFT_VERSION = 3.0;
};
name = Debug;
@@ -806,41 +834,57 @@
};
name = Release;
};
B04F6282658434816C07524D1FBCDA6C /* Release */ = {
C104F7F091290C3D1E248192F07FE689 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AA1C065B2238B882B9E918A1D78F65A /* path_provider.xcconfig */;
buildSettings = {
ARCHS = (
"$(ARCHS_STANDARD)",
arm64,
arm7s,
armv7,
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
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;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGNING_REQUIRED = NO;
COPY_PHASE_STRIP = NO;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"POD_CONFIGURATION_DEBUG=1",
"DEBUG=1",
"$(inherited)",
);
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_BITCODE = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREFIX_HEADER = "Target Support Files/path_provider/path_provider-prefix.pch";
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PRIVATE_HEADERS_FOLDER_PATH = "";
PRODUCT_NAME = "$(TARGET_NAME)";
PUBLIC_HEADERS_FOLDER_PATH = "";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
SWIFT_VERSION = 3.0;
ONLY_ACTIVE_ARCH = YES;
PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/;
STRIP_INSTALLED_PRODUCT = NO;
SYMROOT = "${SRCROOT}/../build";
};
name = Release;
name = Debug;
};
B5478079A23AB117F753262D377E38FD /* Release */ = {
C1D46DF380F875E0EE98CD16DDD762FB /* Debug-develop */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 78226A7E12E0090182848D3F769FF7C9 /* sqflite.xcconfig */;
baseConfigurationReference = 415E1188B3202852749D1EFFEEB90485 /* sqflite.xcconfig */;
buildSettings = {
ARCHS = (
"$(ARCHS_STANDARD)",
@@ -865,110 +909,13 @@
PUBLIC_HEADERS_FOLDER_PATH = "";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
SWIFT_VERSION = 3.0;
};
name = Release;
};
BFD5123607DC71A2F305600F33AC1A7D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = B2AC8D08AB9E95E701EC049C53414AEB /* FMDB.xcconfig */;
buildSettings = {
ARCHS = (
"$(ARCHS_STANDARD)",
arm64,
arm7s,
armv7,
);
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_BITCODE = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREFIX_HEADER = "Target Support Files/FMDB/FMDB-prefix.pch";
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PRIVATE_HEADERS_FOLDER_PATH = "";
PRODUCT_NAME = "$(TARGET_NAME)";
PUBLIC_HEADERS_FOLDER_PATH = "";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
SWIFT_VERSION = 3.0;
};
name = Release;
};
CE4B22519341CB965EF07EDA1B1B4AF7 /* Debug-develop */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AA1C065B2238B882B9E918A1D78F65A /* path_provider.xcconfig */;
buildSettings = {
ARCHS = (
"$(ARCHS_STANDARD)",
arm64,
arm7s,
armv7,
);
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_BITCODE = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREFIX_HEADER = "Target Support Files/path_provider/path_provider-prefix.pch";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PRIVATE_HEADERS_FOLDER_PATH = "";
PRODUCT_NAME = "$(TARGET_NAME)";
PUBLIC_HEADERS_FOLDER_PATH = "";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
SWIFT_VERSION = 3.0;
};
name = "Debug-develop";
};
E6C9610B172770DF23362508531AA383 /* Debug-develop */ = {
F79D889AB2DE4197969513B633117EA2 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = B2AC8D08AB9E95E701EC049C53414AEB /* FMDB.xcconfig */;
buildSettings = {
ARCHS = (
"$(ARCHS_STANDARD)",
arm64,
arm7s,
armv7,
);
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_BITCODE = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREFIX_HEADER = "Target Support Files/FMDB/FMDB-prefix.pch";
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PRIVATE_HEADERS_FOLDER_PATH = "";
PRODUCT_NAME = "$(TARGET_NAME)";
PUBLIC_HEADERS_FOLDER_PATH = "";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
SWIFT_VERSION = 3.0;
};
name = "Debug-develop";
};
F0E33964E3D527293293732CFA6CFF7A /* Debug-develop */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 78226A7E12E0090182848D3F769FF7C9 /* sqflite.xcconfig */;
baseConfigurationReference = 415E1188B3202852749D1EFFEEB90485 /* sqflite.xcconfig */;
buildSettings = {
ARCHS = (
"$(ARCHS_STANDARD)",
@@ -993,10 +940,71 @@
PUBLIC_HEADERS_FOLDER_PATH = "";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
SWIFT_VERSION = 3.0;
};
name = "Debug-develop";
name = Release;
};
F93F83D9876E7DC43B24692C6B5E2309 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = F106895603183989173BE0D345A2711F /* path_provider.xcconfig */;
buildSettings = {
ARCHS = (
"$(ARCHS_STANDARD)",
arm64,
arm7s,
armv7,
);
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_BITCODE = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREFIX_HEADER = "Target Support Files/path_provider/path_provider-prefix.pch";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PRIVATE_HEADERS_FOLDER_PATH = "";
PRODUCT_NAME = "$(TARGET_NAME)";
PUBLIC_HEADERS_FOLDER_PATH = "";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
};
name = Debug;
};
FC09EFEE9A0D51D6A5402A3F2103CBA8 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 415E1188B3202852749D1EFFEEB90485 /* sqflite.xcconfig */;
buildSettings = {
ARCHS = (
"$(ARCHS_STANDARD)",
arm64,
arm7s,
armv7,
);
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_BITCODE = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREFIX_HEADER = "Target Support Files/sqflite/sqflite-prefix.pch";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PRIVATE_HEADERS_FOLDER_PATH = "";
PRODUCT_NAME = "$(TARGET_NAME)";
PUBLIC_HEADERS_FOLDER_PATH = "";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
};
name = Debug;
};
FE87B77707AE47DF6E63C7626B38A635 /* Debug-develop */ = {
isa = XCBuildConfiguration;
@@ -1047,9 +1055,9 @@
20E959984CF6E2A34CFF08E1335F922A /* Build configuration list for PBXNativeTarget "path_provider" */ = {
isa = XCConfigurationList;
buildConfigurations = (
4B05161798033C529E36DA866EA23FC7 /* Debug */,
CE4B22519341CB965EF07EDA1B1B4AF7 /* Debug-develop */,
B04F6282658434816C07524D1FBCDA6C /* Release */,
F93F83D9876E7DC43B24692C6B5E2309 /* Debug */,
19A0575138638B2F05A2B2FD69B99D6D /* Debug-develop */,
370B7DE297A709920A0BB2EBD76A76E3 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -1067,7 +1075,7 @@
2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1C7D17A37D091C98D2F0DD886C3A9320 /* Debug */,
C104F7F091290C3D1E248192F07FE689 /* Debug */,
FE87B77707AE47DF6E63C7626B38A635 /* Debug-develop */,
34FE9531DA9AF2820790339988D5FF41 /* Release */,
);
@@ -1077,9 +1085,9 @@
7BB2C93DA9F2A87B6FBF78336D22F4E2 /* Build configuration list for PBXNativeTarget "FMDB" */ = {
isa = XCConfigurationList;
buildConfigurations = (
85F8B1923EC4E7B2870FEF674AB9559D /* Debug */,
E6C9610B172770DF23362508531AA383 /* Debug-develop */,
BFD5123607DC71A2F305600F33AC1A7D /* Release */,
8C006BAAA9098B2F3F3C6EF9B1943E46 /* Debug */,
7173E8A291934D86B87B7C8172E6600D /* Debug-develop */,
07D867E55B5AB8B7870C1E6A33FEBBBB /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -1087,9 +1095,9 @@
D683C7800E224AA1BCE1A5D1014095AA /* Build configuration list for PBXNativeTarget "sqflite" */ = {
isa = XCConfigurationList;
buildConfigurations = (
8A1DDB651D50EE0BD3BD1121C16538DB /* Debug */,
F0E33964E3D527293293732CFA6CFF7A /* Debug-develop */,
B5478079A23AB117F753262D377E38FD /* Release */,
FC09EFEE9A0D51D6A5402A3F2103CBA8 /* Debug */,
C1D46DF380F875E0EE98CD16DDD762FB /* Debug-develop */,
F79D889AB2DE4197969513B633117EA2 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;

View File

@@ -8,21 +8,29 @@
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>1</integer>
</dict>
<key>Pods-Runner.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>3</integer>
</dict>
<key>path_provider.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>2</integer>
</dict>
<key>sqflite.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>4</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>

View File

@@ -6,10 +6,6 @@ mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
# This protects against multiple targets copying the same framework dependency at the same time. The solution
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
install_framework()
{
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
@@ -27,9 +23,9 @@ install_framework()
source="$(readlink "${source}")"
fi
# Use filter instead of exclude so missing patterns don't throw errors.
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
# use filter instead of exclude so missing patterns dont' throw errors
echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
local basename
basename="$(basename -s .framework "$1")"
@@ -58,15 +54,6 @@ install_framework()
fi
}
# Copies the dSYM of a vendored framework
install_dsym() {
local source="$1"
if [ -r "$source" ]; then
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DWARF_DSYM_FOLDER_PATH}\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DWARF_DSYM_FOLDER_PATH}"
fi
}
# Signs a framework with the provided identity
code_sign_if_enabled() {
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
@@ -89,7 +76,7 @@ strip_invalid_archs() {
archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)"
stripped=""
for arch in $archs; do
if ! [[ "${ARCHS}" == *"$arch"* ]]; then
if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then
# Strip non-valid architectures in-place
lipo -remove "$arch" -output "$binary" "$binary" || exit 1
stripped="$stripped $arch"

View File

@@ -8,10 +8,6 @@ RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
XCASSET_FILES=()
# This protects against multiple targets copying the same framework dependency at the same time. The solution
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
case "${TARGETED_DEVICE_FAMILY}" in
1,2)
TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
@@ -48,29 +44,29 @@ EOM
fi
case $RESOURCE_PATH in
*.storyboard)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}"
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
;;
*.xib)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}"
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
;;
*.framework)
echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodel)
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\""
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom"
;;
*.xcdatamodeld)
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\""
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd"
;;
*.xcmappingmodel)
echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true
echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\""
xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
;;
*.xcassets)
@@ -78,7 +74,7 @@ EOM
XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
;;
*)
echo "$RESOURCE_PATH" || true
echo "$RESOURCE_PATH"
echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY"
;;
esac

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Autobonus.app"
BlueprintName = "Autobonus"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Autobonus.app"
BlueprintName = "Autobonus"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Autobonus.app"
BlueprintName = "Autobonus"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key = "flavor"
value = "develop"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Autobonus.app"
BlueprintName = "Autobonus"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AC45BF691F9E408E009713E2"
BuildableName = "Develop.app"
BlueprintName = "Develop"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AC45BF691F9E408E009713E2"
BuildableName = "Develop.app"
BlueprintName = "Develop"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AC45BF691F9E408E009713E2"
BuildableName = "Develop.app"
BlueprintName = "Develop"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AC45BF691F9E408E009713E2"
BuildableName = "Develop.app"
BlueprintName = "Develop"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AC45BF921F9E574C009713E2"
BuildableName = "Dinect.app"
BlueprintName = "Dinect"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AC45BF921F9E574C009713E2"
BuildableName = "Dinect.app"
BlueprintName = "Dinect"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AC45BF921F9E574C009713E2"
BuildableName = "Dinect.app"
BlueprintName = "Dinect"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AC45BF921F9E574C009713E2"
BuildableName = "Dinect.app"
BlueprintName = "Dinect"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AC45BFBB1F9E5927009713E2"
BuildableName = "Pip.app"
BlueprintName = "Pip"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AC45BFBB1F9E5927009713E2"
BuildableName = "Pip.app"
BlueprintName = "Pip"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AC45BFBB1F9E5927009713E2"
BuildableName = "Pip.app"
BlueprintName = "Pip"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AC45BFBB1F9E5927009713E2"
BuildableName = "Pip.app"
BlueprintName = "Pip"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
LastUpgradeVersion = "0900"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -14,9 +14,9 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
BlueprintIdentifier = "AC45BF691F9E408E009713E2"
BuildableName = "Develop.app"
BlueprintName = "Develop"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
@@ -33,9 +33,9 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
BlueprintIdentifier = "AC45BF691F9E408E009713E2"
BuildableName = "Develop.app"
BlueprintName = "Develop"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
@@ -43,7 +43,7 @@
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug-develop"
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
@@ -57,19 +57,12 @@
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
BlueprintIdentifier = "AC45BF691F9E408E009713E2"
BuildableName = "Develop.app"
BlueprintName = "Develop"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key = "test"
value = "semyon"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
@@ -83,9 +76,9 @@
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
BlueprintIdentifier = "AC45BF691F9E408E009713E2"
BuildableName = "Develop.app"
BlueprintName = "Develop"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>

View File

@@ -4,15 +4,57 @@
<dict>
<key>SchemeUserState</key>
<dict>
<key>Runner.xcscheme_^#shared#^_</key>
<key>Autobonus copy.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>4</integer>
<integer>5</integer>
</dict>
<key>develop.xcscheme</key>
<key>Autobonus.xcscheme_^#shared#^_</key>
<dict>
<key>isShown</key>
<true/>
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>Develop.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>3</integer>
<integer>6</integer>
</dict>
<key>Dinect.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>7</integer>
</dict>
<key>PIP.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>8</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>97C146ED1CF9000F007C117D</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>AC45BF1B1F9E386C009713E2</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>AC45BF691F9E408E009713E2</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>AC45BF921F9E574C009713E2</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>

View File

@@ -10,11 +10,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Runner/AppDelegate.m"
timestampString = "530037922.027807"
timestampString = "530472100.782592"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "20"
endingLineNumber = "20"
startingLineNumber = "78"
endingLineNumber = "78"
landmarkName = "-application:didFinishLaunchingWithOptions:"
landmarkType = "7">
</BreakpointContent>
@@ -26,7 +26,7 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Runner/AppDelegate.m"
timestampString = "530037922.028217"
timestampString = "530472100.782662"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "10"
@@ -42,7 +42,7 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Runner/AppDelegate.m"
timestampString = "530037922.028507"
timestampString = "530472100.782714"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "13"
@@ -58,7 +58,7 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Runner/AppDelegate.m"
timestampString = "530037922.028781"
timestampString = "530472100.782762"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "15"
@@ -74,7 +74,7 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Runner/AppDelegate.m"
timestampString = "530037922.029048"
timestampString = "530472100.782808"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "9"
@@ -90,12 +90,12 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Runner/ScannerViewController.swift"
timestampString = "530037922.029373"
timestampString = "530472100.782856"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "50"
endingLineNumber = "50"
landmarkName = "imagePickerController(_:didFinishPickingMediaWithInfo:)"
landmarkName = "viewDidLoad()"
landmarkType = "7">
<Locations>
<Location
@@ -138,12 +138,12 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Runner/ScannerViewController.swift"
timestampString = "530037922.029767"
timestampString = "530472100.783303"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "51"
endingLineNumber = "51"
landmarkName = "imagePickerController(_:didFinishPickingMediaWithInfo:)"
landmarkName = "viewDidLoad()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>

View File

@@ -1,6 +1,6 @@
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
#import "Runner-Swift.h"
#import "Autobonus-Swift.h"
#import "ZBarSDK.h"
@implementation AppDelegate
@@ -17,37 +17,93 @@
__weak FlutterMethodChannel* weekPlatformChannel = platformChannel;
NSString *bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier];
NSDictionary *settings = @{
@"com.dinect.checker.dinect" : @{
@"locale" : @"ru",
@"flavor" : @"dinect",
@"currency" : @643,
@"supportPhone" : @"8-800-77-55-032",
@"supportUrl" : @"http://www.dinect.com",
@"endPoint" : @"https://pos-api.dinect.com/20130701/",
@"appToken" : @"bdea0f3ba9034b688019a7cac753d1209e2b227f",
@"appTitle" : @"Dinect",
@"showBonus" : @YES,
},
@"com.dinect.develop" : @{
@"locale" : @"ru",
@"flavor" : @"develop",
@"currency" : @643,
@"supportPhone" : @"8 800 555 35 35",
@"supportUrl" : @"http://yandex.ru",
@"endPoint" : @"https://pos-api-int.dinect.com/20130701/",
@"appToken" : @"9fec83cdca38c357e6b65dbb17514cdd36bf2a08",
@"appTitle" : @"Autobonus (develop)",
@"showBonus" : @YES,
},
@"com.dinect.checker.autoclub" : @{
@"locale" : @"ru",
@"flavor" : @"autobonus",
@"currency" : @643,
@"supportPhone" : @"8-800-234-6064",
@"supportUrl" : @"https://www.auto-club.biz",
@"endPoint" : @"https://pos-api-autoclub.dinect.com/20130701/",
@"appToken" : @"bdea0f3ba9034b688019a7cac753d1209e2b227f",
@"appTitle" : @"Autobonus",
@"showBonus" : @NO,
},
@"com.dinect.checker.pip" : @{
@"locale" : @"ua",
@"flavor" : @"pip",
@"currency" : @980,
@"supportPhone" : @"+38 080 030 9997\n+38 044 390 1697",
@"supportUrl" : @"http://discount.kiev.ua/",
@"endPoint" : @"https://pos-api.discount.kiev.ua/20130701/",
@"appToken" : @"bdea0f3ba9034b688019a7cac753d1209e2b227f",
@"appTitle" : @"PIP",
@"showBonus" : @YES,
},
};
NSDictionary *buildSettings = settings[bundleIdentifier];
if (!buildSettings) {
NSLog(@"Settings for this bunndle id not defined (%@)", bundleIdentifier);
abort();
}
[platformChannel setMethodCallHandler:^(FlutterMethodCall* call, FlutterResult result) {
NSLog(@"%@", call.method);
// NSDictionary *dict = [[NSProcessInfo processInfo] environment];
// NSLog(@"%@", dict);
NSLog(@"%@", buildSettings[@"supportPhone"]);
if ([@"getLocale" isEqualToString:call.method]) {
result(@"ru");
result(buildSettings[@"locale"]);
} else if ([@"getFlavor" isEqualToString:call.method]) {
result(@"autobonus");
result(buildSettings[@"flavor"]);
} else if ([@"getCurrency" isEqualToString:call.method]) {
result(@643);
result(buildSettings[@"currency"]);
} else if ([@"startScanner" isEqualToString:call.method]) {
ScannerViewController *modalViewController = [ScannerViewController new];
modalViewController.platformChannel = weekPlatformChannel;
[controller presentViewController:modalViewController animated:YES completion:nil];
// [weekPlatformChannel invokeMethod:@"purchase" arguments:@[@"semyon", @"49492872388755"]];
} else if ([@"isOnline" isEqualToString:call.method]) {
result(@YES);
} else if ([@"getSupportPhone" isEqualToString:call.method]) {
result(@"8 800 555 35 35");
result(buildSettings[@"supportPhone"]);
} else if ([@"getSupportUrl" isEqualToString:call.method]) {
result(@"http://yandex.ru/");
result(buildSettings[@"supportUrl"]);
} else if ([@"getEndpoint" isEqualToString:call.method]) {
result(@"https://pos-api-int.dinect.com/20130701/");
result(buildSettings[@"endPoint"]);
} else if ([@"getAppToken" isEqualToString:call.method]) {
result(@"9fec83cdca38c357e6b65dbb17514cdd36bf2a08");
result(buildSettings[@"appToken"]);
} else if ([@"getAppTitle" isEqualToString:call.method]) {
result(@"Autobonus");
result(buildSettings[@"appTitle"]);
} else if ([@"showBonus" isEqualToString:call.method]) {
result(@YES);
result(buildSettings[@"showBonus"]);
} else {
result(FlutterMethodNotImplemented);
}

View File

@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13173"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
@@ -14,9 +18,9 @@
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>

45
ios/develop/Info.plist Normal file
View File

@@ -0,0 +1,45 @@
<?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>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>

16
ios/develop/main.m Normal file
View File

@@ -0,0 +1,16 @@
//
// main.m
// develop
//
// Created by Ntrlab on 23/10/2017.
// Copyright © 2017 The Chromium Authors. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}