Vasilis

steps try 2

......@@ -20,6 +20,7 @@
1EBEB02F280D6AA500BF802C /* GiftsViewInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EBEB02E280D6AA500BF802C /* GiftsViewInterface.swift */; };
260C6A1AFF7560C32E212F20 /* Pods_WarplySDKFrameworkIOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1353B8C484CC0649CAC2EB74 /* Pods_WarplySDKFrameworkIOS.framework */; };
E634A362282151E30069DE27 /* StepsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E634A361282151E30069DE27 /* StepsView.swift */; };
E634A364282168550069DE27 /* StepsViewInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = E634A363282168550069DE27 /* StepsViewInterface.swift */; };
E639EFA2280810E300B9DD94 /* CouponsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E639EFA0280810E300B9DD94 /* CouponsView.swift */; };
E639EFA3280810E300B9DD94 /* CouponsViewInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = E639EFA1280810E300B9DD94 /* CouponsViewInterface.swift */; };
E639EFA52808244E00B9DD94 /* MyEmptyClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = E639EFA42808244E00B9DD94 /* MyEmptyClass.swift */; };
......@@ -161,6 +162,7 @@
1EBEB02E280D6AA500BF802C /* GiftsViewInterface.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GiftsViewInterface.swift; sourceTree = "<group>"; };
B9413513157AD76ECE896B81 /* Pods-WarplySDKFrameworkIOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WarplySDKFrameworkIOS.release.xcconfig"; path = "Target Support Files/Pods-WarplySDKFrameworkIOS/Pods-WarplySDKFrameworkIOS.release.xcconfig"; sourceTree = "<group>"; };
E634A361282151E30069DE27 /* StepsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StepsView.swift; sourceTree = "<group>"; };
E634A363282168550069DE27 /* StepsViewInterface.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StepsViewInterface.swift; sourceTree = "<group>"; };
E639EFA0280810E300B9DD94 /* CouponsView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CouponsView.swift; sourceTree = "<group>"; };
E639EFA1280810E300B9DD94 /* CouponsViewInterface.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CouponsViewInterface.swift; sourceTree = "<group>"; };
E639EFA42808244E00B9DD94 /* MyEmptyClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyEmptyClass.swift; sourceTree = "<group>"; };
......@@ -379,6 +381,7 @@
E639EFA42808244E00B9DD94 /* MyEmptyClass.swift */,
E67D1EC528117F2400940F01 /* swiftApi.swift */,
E634A361282151E30069DE27 /* StepsView.swift */,
E634A363282168550069DE27 /* StepsViewInterface.swift */,
);
path = WarplySDKFrameworkIOS;
sourceTree = "<group>";
......@@ -771,6 +774,7 @@
buildActionMask = 2147483647;
files = (
1E879E27281AC99F0089F489 /* OldCouponsViewInterface.swift in Sources */,
E634A364282168550069DE27 /* StepsViewInterface.swift in Sources */,
E6D8DF0B27A942920006A3A9 /* WLEvent.m in Sources */,
E6D8DF1E27A942920006A3A9 /* UIViewController+WLAdditions.m in Sources */,
E6D8DF2E27A942920006A3A9 /* UIRefreshControl+AFNetworking.m in Sources */,
......
......@@ -28,6 +28,7 @@
- (UIViewController *) openWallet:(UIView*) parentView;
- (UIViewController *) openMoreForYou:(UIView*) parentView;
- (UIViewController *) openCampaign:(UIView*) parentView campaign:(NSString*) campaign;
- (UIViewController *) openSteps:(UIView*) parentView;
- (NSDictionary *) provideInfoForCampaign;
- (void) applicationDidEnterBackground:(UIApplication *)application;
- (void) applicationWillEnterForeground:(UIApplication *)application;
......
......@@ -145,6 +145,11 @@ CMPedometer *pedometer;
return campaignViewController;
}
- (UIViewController *) openSteps:(UIView*) parentView {
UIViewController *stepsViewController = [StepsViewInterface stepsViewController:parentView];
return stepsViewController;
}
- (NSDictionary *) provideInfoForCampaign {
NSMutableDictionary* info = [[NSMutableDictionary alloc] init];
info[@"web_id"] = [Warply sharedService].webId;
......
//
// StepsViewInterface.swift
// WarplySDKFrameworkIOS
//
// Created by Βασιλης Σκουρας on 3/5/22.
//
import Foundation
import SwiftUI
@available(iOS 13.0.0, *)
@objc public class StepsViewInterface : NSObject {
@objc(stepsViewController:) static public func stepsViewController(parentView: UIView?) -> UIViewController {
return UIHostingController(rootView: StepsView(parentView: parentView!))
}
}