Skip to content
Snippets Groups Projects
Commit b9cf7c64 authored by Matyáš Latner's avatar Matyáš Latner
Browse files

#14 Assets integrity checksum for iOS

parent 9b1032fe
No related merge requests found
......@@ -24,6 +24,8 @@
<string>${app.build}</string>
<key>cz.nic.tablexia.BuildType</key>
<string>${app.buildtype}</string>
<key>cz.nic.tablexia.AssetsChecksums</key>
<string>${app.assetschecksums}</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
......
......@@ -29,6 +29,7 @@ def updateRoboVMProperties(String buildType, String applicationId, String iconNa
props.setProperty('app.version', tablexiaVersionName)
props.setProperty('app.buildtype', buildType)
props.setProperty('app.build', '' + tablexiaVersionCode)
props.setProperty('app.assetschecksums', getMapConvertedToString(rootProject.ext.assetsChecksum))
props.setProperty('app.executable', appName + '-' + buildType + '-' + tablexiaVersionName)
props.store(propsFile.newDataOutputStream(), '')
......@@ -118,6 +119,7 @@ launchIPhoneSimulator.dependsOn assemble
launchIPhoneSimulator.dependsOn updateRoboVMXML
launchIOSDevice.dependsOn assemble
launchIOSDevice.dependsOn updateRoboVMXML
updateRoboVMXML.dependsOn(':util:checksum:runJarChecksum')
updateRoboVMXML.dependsOn copyNatives
build.dependsOn createDebugIPA
......
......@@ -11,6 +11,8 @@ import org.robovm.apple.uikit.UIApplication;
import java.util.Locale;
import cz.nic.tablexia.util.Utility;
public class IOSLauncher extends IOSApplication.Delegate {
public static final Tablexia.SQLConnectionType SQL_CONNECTION_TYPE = new Tablexia.SQLConnectionType("SQLite.JDBCDriver", "jdbc:sqlite:");
......@@ -22,12 +24,14 @@ public class IOSLauncher extends IOSApplication.Delegate {
NSDictionary infoDictionary = NSBundle.getMainBundle().getInfoDictionary();
String buildType = infoDictionary.get(new NSString("cz.nic.tablexia.BuildType")).toString();
String versionName = infoDictionary.get(new NSString("CFBundleShortVersionString")).toString();
String checksums = infoDictionary.get(new NSString("cz.nic.tablexia.AssetsChecksums")).toString();
//TODO check application state
return new IOSApplication(new Tablexia(buildType,
Locale.getDefault(),
versionName,
SQL_CONNECTION_TYPE,
Utility.createChecksumMapFromString(checksums),
false), config);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment