[sword-svn] r3666 - in trunk/bindings: cordova/cordova-plugin-crosswire-sword/src/ios objc/SWORD/SWORD.xcodeproj objc/SWORD/SWORD.xcodeproj/project.xcworkspace/xcuserdata/scribe.xcuserdatad

scribe at crosswire.org scribe at crosswire.org
Wed Jun 26 20:15:05 MST 2019


Author: scribe
Date: 2019-06-26 20:15:05 -0700 (Wed, 26 Jun 2019)
New Revision: 3666

Modified:
   trunk/bindings/cordova/cordova-plugin-crosswire-sword/src/ios/SWORD.swift
   trunk/bindings/objc/SWORD/SWORD.xcodeproj/project.pbxproj
   trunk/bindings/objc/SWORD/SWORD.xcodeproj/project.xcworkspace/xcuserdata/scribe.xcuserdatad/UserInterfaceState.xcuserstate
Log:
Fixed CipherKey null values in SWIFT bindings


Modified: trunk/bindings/cordova/cordova-plugin-crosswire-sword/src/ios/SWORD.swift
===================================================================
--- trunk/bindings/cordova/cordova-plugin-crosswire-sword/src/ios/SWORD.swift	2019-06-27 02:03:12 UTC (rev 3665)
+++ trunk/bindings/cordova/cordova-plugin-crosswire-sword/src/ios/SWORD.swift	2019-06-27 03:15:05 UTC (rev 3666)
@@ -165,7 +165,9 @@
         let shortCopyright = org_crosswire_sword_SWModule_getConfigEntry(module, "ShortCopyright")
         response["shortCopyright"] =  shortCopyright == nil ? "" : String(cString: shortCopyright!)
         let cipherKey = org_crosswire_sword_SWModule_getConfigEntry(module, "CipherKey")
-        response["cipherKey"] =  cipherKey == nil ? "" : String(cString: cipherKey!)
+        if (cipherKey != nil) {
+            response["cipherKey"] = String(cString: cipherKey!)
+        }
         let shortPromo = org_crosswire_sword_SWModule_getConfigEntry(module, "ShortPromo")
         response["shortPromo"] = shortPromo == nil ? "" : String(cString: shortPromo!)
 
@@ -807,16 +809,19 @@
         let modInfoList = Array(UnsafeBufferPointer<org_crosswire_sword_ModInfo>(start: buffer, count: count));
         var mods = [[AnyHashable : Any]]()
         for i in modInfoList {
-            let modInfo = [
+            var modInfo = [
                 "name": String(cString: i.name),
                 "description": String(cString: i.description),
                 "category": String(cString: i.category),
                 "language": String(cString: i.language),
                 "delta": String(cString: i.delta),
-                "cipherKey": i.cipherKey == nil ? nil : String(cString: i.cipherKey),
                 "version": String(cString: i.version),
                 "features": getStringArray(buffer: i.features)
                 ] as [AnyHashable : Any]
+
+            if (i.cipherKey != nil) {
+                modInfo["cipherKey"] = String(cString: i.cipherKey)
+            }
             mods.append(modInfo)
         }
         self.commandDelegate!.send(CDVPluginResult(status: CDVCommandStatus_OK, messageAs: mods), callbackId: command.callbackId)
@@ -856,7 +861,9 @@
         let shortCopyright = org_crosswire_sword_SWModule_getConfigEntry(module, "ShortCopyright")
         response["shortCopyright"] =  shortCopyright == nil ? "" : String(cString: shortCopyright!)
         let cipherKey = org_crosswire_sword_SWModule_getConfigEntry(module, "CipherKey")
-        response["cipherKey"] =  cipherKey == nil ? "" : String(cString: cipherKey!)
+        if (cipherKey != nil) {
+            response["cipherKey"] = String(cString: cipherKey!)
+        }
         let shortPromo = org_crosswire_sword_SWModule_getConfigEntry(module, "ShortPromo")
         response["shortPromo"] = shortPromo == nil ? "" : String(cString: shortPromo!)
         

Modified: trunk/bindings/objc/SWORD/SWORD.xcodeproj/project.pbxproj
===================================================================
--- trunk/bindings/objc/SWORD/SWORD.xcodeproj/project.pbxproj	2019-06-27 02:03:12 UTC (rev 3665)
+++ trunk/bindings/objc/SWORD/SWORD.xcodeproj/project.pbxproj	2019-06-27 03:15:05 UTC (rev 3666)
@@ -917,7 +917,7 @@
 					"$(PROJECT_DIR)/../dependencies/curl/include",
 					"$(PROJECT_DIR)/../../../../biblesync/include",
 				);
-				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
 				MTL_ENABLE_DEBUG_INFO = YES;
 				OTHER_CFLAGS = (
 					"-DUNIX",
@@ -984,7 +984,7 @@
 					"$(PROJECT_DIR)/../dependencies/curl/include",
 					"$(PROJECT_DIR)/../../../../biblesync/include",
 				);
-				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
 				MTL_ENABLE_DEBUG_INFO = NO;
 				OTHER_CFLAGS = (
 					"-DUNIX",

Modified: trunk/bindings/objc/SWORD/SWORD.xcodeproj/project.xcworkspace/xcuserdata/scribe.xcuserdatad/UserInterfaceState.xcuserstate
===================================================================
(Binary files differ)




More information about the sword-cvs mailing list