Skip to content

Commit

Permalink
feat(sample): cleanup sample codes
Browse files Browse the repository at this point in the history
SUITEDEV-36655

Co-authored-by: LordAndras <[email protected]>
  • Loading branch information
megamegax and LordAndras committed Sep 25, 2024
1 parent fec023b commit 40b6030
Show file tree
Hide file tree
Showing 12 changed files with 1,009 additions and 898 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import io.flutter.plugin.common.EventChannel
import com.emarsys.inapp.ui.InlineInAppView as NativeInlineInAppView
import io.flutter.plugin.platform.PlatformView
import org.json.JSONObject
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch

class InlineInAppView(
context: Context,
Expand Down Expand Up @@ -83,10 +86,12 @@ class InlineInAppView(
}

override fun onCompleted(errorCause: Throwable?) {
if (errorCause != null) {
events?.error("500", errorCause.message, errorCause)
} else {
events?.success(mapOf<String, Any>())
CoroutineScope(Dispatchers.Main).launch{
if (errorCause != null) {
events?.error("500", errorCause.message, errorCause)
} else {
events?.success(mapOf<String, Any>())
}
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 4J5FXBB97U;
ENABLE_BITCODE = NO;
Expand Down Expand Up @@ -1114,6 +1115,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 4J5FXBB97U;
ENABLE_BITCODE = NO;
Expand All @@ -1140,6 +1142,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 4J5FXBB97U;
ENABLE_BITCODE = NO;
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class CustomDelegate: NSObject, UNUserNotificationCenterDelegate {

}

@UIApplicationMain
@main
@objc class AppDelegate: EmarsysAppDelegate {

override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
Expand Down
119 changes: 0 additions & 119 deletions example/lib/inbox_messages.dart

This file was deleted.

Loading

0 comments on commit 40b6030

Please sign in to comment.