Database does not open in iOS9.2. SQLCipher version 3.3.1


#1

I’m running the sqlcipherdemo on iOS9.2, but it does not seem to be opening the database. SQLCipher version 3.3.1. Please help.

[phonegap] starting app server…
[phonegap] listening on 192.168.0.11:3000
[phonegap]
[phonegap] ctrl-c to stop the server
[phonegap]
[phonegap] 200 /api/autoreload
[phonegap] 200 /api/autoreload
[phonegap] 200 /socket.io/?EIO=2&transport=polling&t=1450358419443-21
[phonegap] 200 /socket.io/?EIO=2&transport=polling&t=1450358419571-22&sid=zUQh0o6czEPEidAjAAAA
[phonegap] 200 /socket.io/?EIO=2&transport=polling&t=1450358419591-23&sid=zUQh0o6czEPEidAjAAAA
[phonegap] 200 /api/autoreload
[phonegap] 200 /api/appzip
[phonegap] 200 /socket.io/socket.io.js
[phonegap] 200 /socket.io/?EIO=2&transport=polling&t=1450358433485-0
[phonegap] [console.log] Received Event: deviceready
[phonegap] 200 /socket.io/?EIO=2&transport=polling&t=1450358433519-1&sid=Y61CscqToTeesd0YAAAB
[phonegap] 200 /socket.io/?EIO=2&transport=polling&t=1450358433524-2&sid=Y61CscqToTeesd0YAAAB
[phonegap] 200 /socket.io/?EIO=2&transport=polling&t=1450358433552-3&sid=Y61CscqToTeesd0YAAAB
[phonegap] 200 /api/autoreload
[phonegap] [console.log] SQLCipher demo start
[phonegap] [console.log] database instance is null - opening
[phonegap] 200 /api/autoreload
[phonegap] 200 /api/autoreload
[phonegap] 200 /api/autoreload
[phonegap] 200 /api/autoreload
[phonegap] 200 /api/autoreload
[phonegap] 200 /api/autoreload
[phonegap] 200 /api/autoreload
[phonegap] 200 /api/autoreload
[phonegap] 200 /api/autoreload
[phonegap] 200 /api/autoreload
[phonegap] 200 /api/autoreload


#2

Hello @jsolanki

What version of Cordova are you using? Can you execute cordova build ios, then tail the stdoutPath emitted when you execute cordova emulate ios and share the output? What is written to the log when you press the “Run SQLCipher” button? Thanks!


#3

Installed platforms: android 3.6.4, ios 3.7.0, wp8
Cordova Version: 5.1.1
This is what I get when I click Run SQLCipher:

[phonegap] starting app server…
[phonegap] listening on 10.230.94.202:3000
[phonegap]
[phonegap] ctrl-c to stop the server
[phonegap]
[phonegap] 200 /api/appzip
[phonegap] 200 /socket.io/socket.io.js
[phonegap] 200 /socket.io/?EIO=2&transport=polling&t=1450368275091-0
[phonegap] 200 /socket.io/?EIO=2&transport=polling&t=1450368275131-1&sid=XwDgjseOvTKYsUIiAAAA
[phonegap] [console.log] Received Event: deviceready
[phonegap] 200 /socket.io/?EIO=2&transport=polling&t=1450368275149-2&sid=XwDgjseOvTKYsUIiAAAA
[phonegap] 200 /socket.io/?EIO=2&transport=polling&t=1450368275162-3&sid=XwDgjseOvTKYsUIiAAAA
[phonegap] 200 /api/autoreload
[phonegap] [console.log] SQLCipher demo start
[phonegap] [console.log] database instance is null - opening
[phonegap] 200 /api/autoreload
[phonegap] 200 /api/autoreload
[phonegap] 200 /api/autoreload
[phonegap] 200 /api/autoreload
[phonegap] 200 /api/autoreload
[phonegap] 200 /api/autoreload
[phonegap] 200 /api/autoreload


#4

Hi @jsolanki

It appears as if you are using PhoneGap, can you try running this from Cordova instead?


#5

How I send the console.log output to a file when running the command: cordova emulate -ios?


#6

Hi @jsolanki

When you run cordova emulator ios, part of the output will contain stdoutPath which is where the console.log statements are written to on your Mac. Copy the path to the file identified as stdoutPath and in a new tab execute tail -f [ThePathProvidedInstdoutPath]. This will allow you to see the output of the application. You can then copy and paste the content from the terminal once you have clicked the button “Run SQLCipher”.


#7

This is the output to the terminal when I run: cordova emulate iOS
Jimmys-MBP:bcpcartapp jimmysolanki$ cordova emulate ios
Running command: /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/cordova/run --emulator
Building project : /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/BCPCartApp.xcodeproj
Configuration : Debug
Platform : emulator
Build settings from command line:
ARCHS = i386
CONFIGURATION_BUILD_DIR = /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator
SDKROOT = iphonesimulator9.2
SHARED_PRECOMPS_DIR = /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/sharedpch
VALID_ARCHS = i386

Build settings from configuration file ‘/Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/cordova/build-debug.xcconfig’:
CODE_SIGN_IDENTITY = iPhone Developer
ENABLE_BITCODE = NO

=== BUILD TARGET CordovaLib OF PROJECT CordovaLib WITH CONFIGURATION Debug ===

Check dependencies

=== BUILD TARGET BCPCartApp OF PROJECT BCPCartApp WITH CONFIGURATION Debug ===

Check dependencies

PhaseScriptExecution Copy\ www\ directory build/BCPCartApp.build/Debug-iphonesimulator/BCPCartApp.build/Script-304B58A110DAC018002A0835.sh
cd /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios
/bin/sh -c /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios/build/BCPCartApp.build/Debug-iphonesimulator/BCPCartApp.build/Script-304B58A110DAC018002A0835.sh

CpResource BCPCartApp/Resources/icons/icon-72.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app/icon-72.png
cd /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin"
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios/BCPCartApp/Resources/icons/icon-72.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app

CpResource BCPCartApp/Resources/icons/icon-40@2x.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app/icon-40@2x.png
cd /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin"
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios/BCPCartApp/Resources/icons/icon-40@2x.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app

CpResource BCPCartApp/Resources/icons/icon-76.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app/icon-76.png
cd /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin"
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios/BCPCartApp/Resources/icons/icon-76.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app

CpResource BCPCartApp/Resources/icons/icon.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app/icon.png
cd /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin"
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios/BCPCartApp/Resources/icons/icon.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app

CpResource BCPCartApp/Resources/icons/icon@2x.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app/icon@2x.png
cd /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin"
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios/BCPCartApp/Resources/icons/icon@2x.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app

CpResource BCPCartApp/Resources/icons/icon-50.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app/icon-50.png
cd /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin"
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios/BCPCartApp/Resources/icons/icon-50.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app

CpResource BCPCartApp/Resources/icons/icon-60@2x.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app/icon-60@2x.png
cd /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin"
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios/BCPCartApp/Resources/icons/icon-60@2x.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app

CpResource BCPCartApp/Resources/icons/icon-small.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app/icon-small.png
cd /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin"
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios/BCPCartApp/Resources/icons/icon-small.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app

CpResource BCPCartApp/Resources/icons/icon-small@2x.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app/icon-small@2x.png
cd /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin"
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios/BCPCartApp/Resources/icons/icon-small@2x.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app

CpResource BCPCartApp/Resources/icons/icon-40.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app/icon-40.png
cd /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin"
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios/BCPCartApp/Resources/icons/icon-40.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app

CpResource BCPCartApp/Resources/icons/icon-60.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app/icon-60.png
cd /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin"
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios/BCPCartApp/Resources/icons/icon-60.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app

CpResource BCPCartApp/Resources/icons/icon-60@3x.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app/icon-60@3x.png
cd /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin"
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios/BCPCartApp/Resources/icons/icon-60@3x.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app

CpResource BCPCartApp/Resources/icons/icon-50@2x.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app/icon-50@2x.png
cd /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin"
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios/BCPCartApp/Resources/icons/icon-50@2x.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app

CpResource BCPCartApp/Resources/icons/icon-76@2x.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app/icon-76@2x.png
cd /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin"
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios/BCPCartApp/Resources/icons/icon-76@2x.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app

CpResource BCPCartApp/Resources/icons/icon-72@2x.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app/icon-72@2x.png
cd /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin"
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios/BCPCartApp/Resources/icons/icon-72@2x.png /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app

ProcessInfoPlistFile /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app/Info.plist BCPCartApp/BCPCartApp-Info.plist
cd /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin"
builtin-infoPlistUtility /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios/BCPCartApp/BCPCartApp-Info.plist -genpkginfo /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app/PkgInfo -expandbuildsettings -format binary -platform iphonesimulator -additionalcontentfile /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios/build/BCPCartApp.build/Debug-iphonesimulator/BCPCartApp.build/MainViewController-PartialInfo.plist -o /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app/Info.plist

GenerateDSYMFile /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app.dSYM /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app/BCPCartApp
cd /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app/BCPCartApp -o /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app.dSYM

Touch /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app
cd /Users/jimmysolanki/MobileApps/BCPCartApp/platforms/ios
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin"
/usr/bin/touch -c /Users/jimmysolanki/mobileapps/bcpcartapp/platforms/ios/build/emulator/BCPCartApp.app

** BUILD SUCCEEDED **

No target specified for emulator. Deploying to iPhone-6 simulator
com.cat.bcp.Cart: 1843
** RUN SUCCEEDED **
Jimmys-MBP:bcpcartapp jimmysolanki$


#8

Hello @jsolanki

It appears you are attempting to load another application, not the demo that was provided with Cordova in the above output. Did your application run? Can you try running cordova build ios, then cordova emulate ios within the demo application and share your output?