diff --git a/android/build.gradle b/android/build.gradle index fe9047f3fa92dc60f403fbba2dedad23f2f13275..db8997d75f0a1c83c420b2332c7221a5416caf41 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -29,7 +29,7 @@ android { applicationIdSuffix rootProject.applicationIdBranch + rootProject.applicationIdDebugSuffix buildConfigField ASSETS_CHECKSUM_FIELD_TYPE, ASSETS_CHECKSUM_FIELD_NAME, rootProject.ext.assetsChecksumPattern resValue "string", "app_name", "${tablexiaAppName}" - resValue "string", "sentry_dsn", project.hasProperty('SENTRY_DSN_DEBUG') ? "$SENTRY_DSN_DEBUG" : "$project.sentryDSNFallbackValue"; + resValue "string", "sentry_dsn", project.hasProperty('TABLEXIA_SENTRY_DSN_DEBUG') ? "$TABLEXIA_SENTRY_DSN_DEBUG" : "$project.sentryDSNFallbackValue"; resValue "string", "sentry_dsn_fallback_value", "$project.sentryDSNFallbackValue"; } release { @@ -37,7 +37,7 @@ android { applicationIdSuffix rootProject.applicationIdBranch buildConfigField ASSETS_CHECKSUM_FIELD_TYPE, ASSETS_CHECKSUM_FIELD_NAME, rootProject.ext.assetsChecksumPattern resValue "string", "app_name", "${tablexiaAppName}" - resValue "string", "sentry_dsn", project.hasProperty('SENTRY_DSN_RELEASE') ? "$SENTRY_DSN_RELEASE" : "$project.sentryDSNFallbackValue"; + resValue "string", "sentry_dsn", project.hasProperty('TABLEXIA_SENTRY_DSN_RELEASE') ? "$TABLEXIA_SENTRY_DSN_RELEASE" : "$project.sentryDSNFallbackValue"; resValue "string", "sentry_dsn_fallback_value", "$project.sentryDSNFallbackValue"; } devel.initWith(buildTypes.debug) diff --git a/desktop/build.gradle b/desktop/build.gradle index b193c015a3306e1163378bae3318a389ce4146d9..1da34b3a48558412067451089e4967c366f3b962 100644 --- a/desktop/build.gradle +++ b/desktop/build.gradle @@ -28,7 +28,7 @@ task debugJar(type: Jar) { attributes 'Version-Name': tablexiaVersionName attributes 'Assets-Cheksums': getMapConvertedToString(rootProject.ext.assetsChecksum) - attributes 'Sentry-DSN': project.hasProperty('SENTRY_DSN_DEBUG') ? "$SENTRY_DSN_DEBUG" : "$project.sentryDSNFallbackValue"; + attributes 'Sentry-DSN': project.hasProperty('TABLEXIA_SENTRY_DSN_DEBUG') ? "$TABLEXIA_SENTRY_DSN_DEBUG" : "$project.sentryDSNFallbackValue"; attributes 'Sentry-DSN-Fallback': "$project.sentryDSNFallbackValue"; } } @@ -48,7 +48,7 @@ task releaseJar(type: Jar) { attributes 'Version-Name': tablexiaVersionName attributes 'Assets-Cheksums': getMapConvertedToString(rootProject.ext.assetsChecksum) - attributes 'Sentry-DSN': project.hasProperty('SENTRY_DSN_RELEASE') ? "$SENTRY_DSN_RELEASE" : "$project.sentryDSNFallbackValue"; + attributes 'Sentry-DSN': project.hasProperty('TABLEXIA_SENTRY_DSN_RELEASE') ? "$TABLEXIA_SENTRY_DSN_RELEASE" : "$project.sentryDSNFallbackValue"; attributes 'Sentry-DSN-Fallback': "$project.sentryDSNFallbackValue"; } } diff --git a/ios/Info.plist.xml b/ios/Info.plist.xml index 7ba837f46a6811006ed593ac647c5ff869c683b1..4825ed7575c86304061cfeadba7fa70f070481fc 100644 --- a/ios/Info.plist.xml +++ b/ios/Info.plist.xml @@ -24,6 +24,10 @@ <string>${app.build}</string> <key>cz.nic.tablexia.BuildType</key> <string>${app.buildtype}</string> + <key>cz.nic.tablexia.SentryDSN</key> + <string>${app.sentryDSN}</string> + <key>cz.nic.tablexia.SentryDSNFallback</key> + <string>${app.sentryDSNFallback}</string> <key>LSRequiresIPhoneOS</key> <true/> <key>UIViewControllerBasedStatusBarAppearance</key> diff --git a/ios/build.gradle b/ios/build.gradle index 411bc891bae2fb47dc8d523a406c4b212e642095..c094df7a4db48c2ef6f89d9f5a03aba985c0a740 100644 --- a/ios/build.gradle +++ b/ios/build.gradle @@ -30,7 +30,7 @@ def updateRoboVMProperties(String buildType, String applicationId, String iconNa props.setProperty('app.buildtype', buildType) props.setProperty('app.build', '' + tablexiaVersionCode) props.setProperty('app.executable', tablexiaAppName + '-' + buildType + '-' + tablexiaVersionName) - props.setProperty('app.sentryDSNFallbackValue', sentryDSNFallbackValue) + props.setProperty('app.sentryDSNFallback', sentryDSNFallbackValue) props.setProperty('app.sentryDSN', DSN) props.store(propsFile.newDataOutputStream(), '') @@ -53,11 +53,11 @@ task copyNatives << { } } - copy { - from 'libs/' - into 'build/libs/ios' - include '*.a' - } + //copy { + // from 'libs/' + // into 'build/libs/ios' + // include '*.a' + //} } // Updates a robovm.xml file. @@ -104,7 +104,7 @@ tasks.create(name: "createDebugIPA", type: org.robovm.gradle.tasks.ArchiveTask) doFirst { robovm.iosSignIdentity = TABLEXIA_IOS_SIGNING_IDENTITY robovm.iosProvisioningProfile = TABLEXIA_IOS_DEBUG_PROVISIONING - String DSN = project.hasProperty('SENTRY_DSN_DEBUG') ? "$SENTRY_DSN_DEBUG" : sentryDSNFallbackValue; + String DSN = project.hasProperty('TABLEXIA_SENTRY_DSN_DEBUG') ? "$TABLEXIA_SENTRY_DSN_DEBUG" : sentryDSNFallbackValue; updateRoboVMProperties("debug", applicationIdDebug, 'Icon_debug', DSN) } } @@ -113,7 +113,7 @@ tasks.create(name: "createReleaseIPA", type: org.robovm.gradle.tasks.ArchiveTask doFirst { robovm.iosSignIdentity = TABLEXIA_IOS_SIGNING_IDENTITY robovm.iosProvisioningProfile = TABLEXIA_IOS_RELEASE_PROVISIONING - String DSN = project.hasProperty('SENTRY_DSN_RELEASE') ? "$SENTRY_DSN_RELEASE" : sentryDSNFallbackValue; + String DSN = project.hasProperty('TABLEXIA_SENTRY_DSN_RELEASE') ? "$TABLEXIA_SENTRY_DSN_RELEASE" : sentryDSNFallbackValue; updateRoboVMProperties("release", applicationIdRelease, 'Icon_release', DSN) } } diff --git a/ios/src/cz/nic/tablexia/Flurry.java b/ios/src/cz/nic/tablexia/Flurry.java deleted file mode 100644 index 9ebe617ceb8d1935e77684e572623cf1b1f5d410..0000000000000000000000000000000000000000 --- a/ios/src/cz/nic/tablexia/Flurry.java +++ /dev/null @@ -1,122 +0,0 @@ -package cz.nic.tablexia; - -import org.robovm.apple.foundation.NSObject; -import org.robovm.objc.annotation.Method; -import org.robovm.objc.annotation.NativeClass; -import org.robovm.apple.foundation.NSException; - -@NativeClass -public class Flurry extends NSObject { - - /** - * Starts session with apiKey - * [ObjC] + (void)startSession:(NSString *)apiKey; - */ - @Method(selector = "startSession:") - public static native void start(String apiKey); - - //TODO + (void) startSession:(NSString *)apiKey withOptions:(id)options; - - @Method(selector = "logError:message:exception:") - public static native void logError(String errorID, String message, NSException exception); - //+ (void)logError:(NSString *)errorID message:(NSString *)message exception:(NSException *)exception; - - /** - * Sets session properties. Immutable map mapping values to keys... - * - * @note You should not pass private or confidential information about your origin info in a - * custom origin. A maximum of 20 parameter names may be associated with any origin. Sending - * over 20 parameter names with a single origin will result in no parameters being logged - * for that origin. - * [ObjC] + (void)sessionProperties:(NSDictionary *)parameters; - */ - //@Method(selector = "sessionProperties:") - //public static native void sessionProperties(NSDictionary parameters); - //TODO - Not Tested Yet! Add import blabla... NSDic - - /** - * Enabled/Disables crash reporting feature - * [ObjC] + (void)setCrashReportingEnabled:(BOOL)value; - */ - @Method(selector = "setCrashReportingEnabled:") - public static native void setCrashReportingEnabled(boolean value); - - /** - * Sets sessions continue time. Basicaly how long is session kept active - * after the app has been minimalized/hidden. - * [ObjC] + (void)setSessionContinueSeconds:(int)seconds; - */ - @Method(selector = "setSessionContinueSeconds:") - public static native void setSessionContinueSeconds(int seconds); - - /** - * Set current version of application - * [ObjC] + (void)setAppVersion:(NSString *)version; - */ - @Method(selector = "setAppVersion:") - public static native void setAppVersion(String version); - - /** - * Set current users ID for logging - * [ObjC] + (void)setUserID:(NSString *)userID; - */ - @Method(selector = "setUserID:") - public static native void setUserID(String userID); - - /** - * Set currents users age - * [ObjC] + (void)setAge:(int)age; - */ - @Method(selector = "setAge:") - public static native void setUserAge(int age); - - /** - * Set currents users gender - * [ObjC] + (void)setGender:(NSString *)gender; - */ - @Method(selector = "setGender:") - public static native void setUserGender(String gneder); - - - /** - * Return flurry agent version - * [ObjC] + (NSString *)getFlurryAgentVersion; - */ - @Method(selector = "getFlurryAgentVersion") - public static native String getFlurryAgentVersion(); - - /** - * Enables/Disables errors in log - * [ObjC] + (void)setShowErrorInLogEnabled:(BOOL)value; - */ - @Method(selector = "setShowErrorInLogEnabled:") - public static native void setShowErrorInLogEnabled(boolean value); - - /** - * Enables/Disables debug log - * [ObjC] + (void)setDebugLogEnabled:(BOOL)value; - */ - @Method(selector = "setDebugLogEnabled:") - public static native void setDebugLogEnabled(boolean value); - - /** - * Returns true if active session exists - * [ObjC] + (BOOL)activeSessionExists; - */ - @Method(selector = "activeSessionExists") - public static native boolean activeSessionExists(); - - /** - * Returns session id - * [ObjC] + (NSString*)getSessionID; - */ - @Method(selector = "getSessionID") - public static native String getSessionID(); - - /** - * Sets whether or not should session be enabled when app is in background - * [ObjC] + (void)setBackgroundSessionEnabled:(BOOL)setBackgroundSessionEnabled; - */ - @Method(selector = "setBackgroundSessionEnabled:") - public static native void setBackgroundSessionEnabled(boolean setBackgroundSessionEnabled); -} \ No newline at end of file diff --git a/ios/src/cz/nic/tablexia/IOSLauncher.java b/ios/src/cz/nic/tablexia/IOSLauncher.java index bf9dfcc827f26e94b8d58e5b25304703f3c6ffe0..129be3aa01f21c09cc779a5876da3660f9436b04 100644 --- a/ios/src/cz/nic/tablexia/IOSLauncher.java +++ b/ios/src/cz/nic/tablexia/IOSLauncher.java @@ -41,10 +41,10 @@ public class IOSLauncher extends IOSApplication.Delegate { NSDictionary infoDictionary = NSBundle.getMainBundle().getInfoDictionary(); String buildType = infoDictionary.get(new NSString("cz.nic.tablexia.BuildType")).toString(); - String sentryDSNFallback = infoDictionary.get(new NSString("app.sentryDSNFallbackValue")).toString(); - String sentryDSN = infoDictionary.get(new NSString("app.sentryDSN")).toString(); + String sentryDSNFallback = infoDictionary.get(new NSString("cz.nic.tablexia.SentryDSNFallback")).toString(); + String sentryDSN = infoDictionary.get(new NSString("cz.nic.tablexia.SentryDSN")).toString(); String DSN = (sentryDSNFallback == null || sentryDSN == null || sentryDSN.equals(sentryDSNFallback)) ? null : sentryDSN; - + tablexiaIOSFiles = new TablexiaIOSFiles(); IOSApplication iosApplication = new IOSApplication(new Tablexia(buildType, Locale.getDefault(), @@ -65,17 +65,6 @@ public class IOSLauncher extends IOSApplication.Delegate { @Override public boolean didFinishLaunching(UIApplication application, UIApplicationLaunchOptions launchOptions) { - if(TablexiaSettings.getInstance().getBuildType().isAnalytics()) { - Flurry.start(TablexiaBuildConfig.FLURRY_KEY); - Flurry.setAppVersion(TablexiaBuildConfig.VERSION_NAME); - - //Flurry.setShowErrorInLogEnabled(true); - //Flurry.setDebugLogEnabled(true); - - if(TablexiaSettings.getInstance().getBuildType().isBugReport()) - Flurry.setCrashReportingEnabled(true); - } - boolean result = super.didFinishLaunching(application, launchOptions); Gdx.files = tablexiaIOSFiles; return result;