Skip to content

Commit 5714a1e

Browse files
committed
cleanup demo app (wip)
1 parent ecb6fcc commit 5714a1e

File tree

8 files changed

+45
-190
lines changed

8 files changed

+45
-190
lines changed

DemoObjCApp/AppDelegate.m

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
#import "FailureViewController.h"
1212

1313
@import Optimizely;
14-
#if TARGET_OS_IOS
15-
@import Amplitude_iOS;
16-
#endif
1714

1815
static NSString * const kOptimizelyDatafileName = @"demoTestDatafile";
1916
static NSString * const kOptimizelyExperimentKey = @"background_experiment";

DemoObjCApp/DemoObjcApp.xcodeproj/project.pbxproj

Lines changed: 16 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
361EF872CB7D0F6C8202145F /* Pods_DemoObjciOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8E188D7982AFD9C7F1C7FE6 /* Pods_DemoObjciOS.framework */; };
1110
6923C05F4FFD7394581F4361 /* libPods-DemoObjctvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CE090EEBD47E05884C417C0 /* libPods-DemoObjctvOS.a */; };
1211
6E4DD7F721E51E5500B0C2C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EF7499F21E404BC008B22A0 /* main.m */; };
1312
6E4DD7F821E51E5600B0C2C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EF7499F21E404BC008B22A0 /* main.m */; };
@@ -37,6 +36,7 @@
3736
6E9681D921EFA5B2009B7FEC /* CustomLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E9681D721EFA5B2009B7FEC /* CustomLogger.m */; };
3837
6EB8456B21EE5DE3005346CC /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EB8456421EE5DE3005346CC /* AppDelegate.m */; };
3938
6EB8456C21EE5DE3005346CC /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EB8456421EE5DE3005346CC /* AppDelegate.m */; };
39+
C2E08E88D2C89768C7551208 /* libPods-DemoObjciOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DB76E67DE203C5276D6958C5 /* libPods-DemoObjciOS.a */; };
4040
/* End PBXBuildFile section */
4141

4242
/* Begin PBXContainerItemProxy section */
@@ -168,7 +168,6 @@
168168
/* Begin PBXFileReference section */
169169
2CE090EEBD47E05884C417C0 /* libPods-DemoObjctvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-DemoObjctvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
170170
3EFD1578D8AB431E6FD4B8FE /* Pods-DemoObjctvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DemoObjctvOS.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-DemoObjctvOS/Pods-DemoObjctvOS.debug.xcconfig"; sourceTree = "<group>"; };
171-
4BE4886BF950708C866FA8F2 /* Pods-DemoObjciOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DemoObjciOS.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-DemoObjciOS/Pods-DemoObjciOS.debug.xcconfig"; sourceTree = "<group>"; };
172171
6E4DD96D21E67A6500B0C2C7 /* OptimizelySwiftSDK.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = OptimizelySwiftSDK.xcodeproj; path = ../OptimizelySDK/OptimizelySwiftSDK.xcodeproj; sourceTree = "<group>"; };
173172
6E96811321EE94DA009B7FEC /* CustomNotificationCenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CustomNotificationCenter.h; sourceTree = "<group>"; };
174173
6E96811421EE94DA009B7FEC /* CustomNotificationCenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CustomNotificationCenter.m; sourceTree = "<group>"; };
@@ -194,18 +193,19 @@
194193
6EF7498E21E404BB008B22A0 /* DemoObjciOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DemoObjciOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
195194
6EF7499F21E404BC008B22A0 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
196195
6EF749A821E404D6008B22A0 /* DemoObjctvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DemoObjctvOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
196+
762D1F9E4AA702083D17C4C9 /* Pods-DemoObjciOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DemoObjciOS.release.xcconfig"; path = "../Pods/Target Support Files/Pods-DemoObjciOS/Pods-DemoObjciOS.release.xcconfig"; sourceTree = "<group>"; };
197+
D47F5FC88600AFD4E656D50A /* Pods-DemoObjciOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DemoObjciOS.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-DemoObjciOS/Pods-DemoObjciOS.debug.xcconfig"; sourceTree = "<group>"; };
197198
D58542E1B5771327083E56E2 /* Pods-DemoObjctvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DemoObjctvOS.release.xcconfig"; path = "../Pods/Target Support Files/Pods-DemoObjctvOS/Pods-DemoObjctvOS.release.xcconfig"; sourceTree = "<group>"; };
198-
D66FA87FA967DCE9F1972546 /* Pods-DemoObjciOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DemoObjciOS.release.xcconfig"; path = "../Pods/Target Support Files/Pods-DemoObjciOS/Pods-DemoObjciOS.release.xcconfig"; sourceTree = "<group>"; };
199-
F8E188D7982AFD9C7F1C7FE6 /* Pods_DemoObjciOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_DemoObjciOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
199+
DB76E67DE203C5276D6958C5 /* libPods-DemoObjciOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-DemoObjciOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
200200
/* End PBXFileReference section */
201201

202202
/* Begin PBXFrameworksBuildPhase section */
203203
6EF7498B21E404BB008B22A0 /* Frameworks */ = {
204204
isa = PBXFrameworksBuildPhase;
205205
buildActionMask = 2147483647;
206206
files = (
207-
361EF872CB7D0F6C8202145F /* Pods_DemoObjciOS.framework in Frameworks */,
208-
6E4DD97C21E67AAD00B0C2C7 /* Optimizely.framework in Frameworks */,
207+
6E4DD97C21E67AAD00B0C2C7 /* OptimizelySwiftSDK.framework in Frameworks */,
208+
C2E08E88D2C89768C7551208 /* libPods-DemoObjciOS.a in Frameworks */,
209209
);
210210
runOnlyForDeploymentPostprocessing = 0;
211211
};
@@ -341,19 +341,19 @@
341341
isa = PBXGroup;
342342
children = (
343343
6E4DD96D21E67A6500B0C2C7 /* OptimizelySwiftSDK.xcodeproj */,
344-
F8E188D7982AFD9C7F1C7FE6 /* Pods_DemoObjciOS.framework */,
345344
2CE090EEBD47E05884C417C0 /* libPods-DemoObjctvOS.a */,
345+
DB76E67DE203C5276D6958C5 /* libPods-DemoObjciOS.a */,
346346
);
347347
name = Frameworks;
348348
sourceTree = "<group>";
349349
};
350350
EC8D1C27EBC6923BEA837213 /* Pods */ = {
351351
isa = PBXGroup;
352352
children = (
353-
4BE4886BF950708C866FA8F2 /* Pods-DemoObjciOS.debug.xcconfig */,
354-
D66FA87FA967DCE9F1972546 /* Pods-DemoObjciOS.release.xcconfig */,
355353
3EFD1578D8AB431E6FD4B8FE /* Pods-DemoObjctvOS.debug.xcconfig */,
356354
D58542E1B5771327083E56E2 /* Pods-DemoObjctvOS.release.xcconfig */,
355+
D47F5FC88600AFD4E656D50A /* Pods-DemoObjciOS.debug.xcconfig */,
356+
762D1F9E4AA702083D17C4C9 /* Pods-DemoObjciOS.release.xcconfig */,
357357
);
358358
name = Pods;
359359
sourceTree = "<group>";
@@ -365,12 +365,11 @@
365365
isa = PBXNativeTarget;
366366
buildConfigurationList = 6EF749A321E404BC008B22A0 /* Build configuration list for PBXNativeTarget "DemoObjciOS" */;
367367
buildPhases = (
368-
9C80D766758228B3848F863B /* [CP] Check Pods Manifest.lock */,
368+
2F1B7311527875610A091577 /* [CP] Check Pods Manifest.lock */,
369369
6EF7498A21E404BB008B22A0 /* Sources */,
370370
6EF7498B21E404BB008B22A0 /* Frameworks */,
371371
6EF7498C21E404BB008B22A0 /* Resources */,
372372
6E4DD93B21E6708E00B0C2C7 /* Embed Frameworks */,
373-
E446D4B40B95766419E07D97 /* [CP] Embed Pods Frameworks */,
374373
);
375374
buildRules = (
376375
);
@@ -564,7 +563,7 @@
564563
/* End PBXResourcesBuildPhase section */
565564

566565
/* Begin PBXShellScriptBuildPhase section */
567-
50156C3313666B2B516DE355 /* [CP] Check Pods Manifest.lock */ = {
566+
2F1B7311527875610A091577 /* [CP] Check Pods Manifest.lock */ = {
568567
isa = PBXShellScriptBuildPhase;
569568
buildActionMask = 2147483647;
570569
files = (
@@ -579,14 +578,14 @@
579578
outputFileListPaths = (
580579
);
581580
outputPaths = (
582-
"$(DERIVED_FILE_DIR)/Pods-DemoObjctvOS-checkManifestLockResult.txt",
581+
"$(DERIVED_FILE_DIR)/Pods-DemoObjciOS-checkManifestLockResult.txt",
583582
);
584583
runOnlyForDeploymentPostprocessing = 0;
585584
shellPath = /bin/sh;
586585
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
587586
showEnvVarsInLog = 0;
588587
};
589-
9C80D766758228B3848F863B /* [CP] Check Pods Manifest.lock */ = {
588+
50156C3313666B2B516DE355 /* [CP] Check Pods Manifest.lock */ = {
590589
isa = PBXShellScriptBuildPhase;
591590
buildActionMask = 2147483647;
592591
files = (
@@ -601,41 +600,13 @@
601600
outputFileListPaths = (
602601
);
603602
outputPaths = (
604-
"$(DERIVED_FILE_DIR)/Pods-DemoObjciOS-checkManifestLockResult.txt",
603+
"$(DERIVED_FILE_DIR)/Pods-DemoObjctvOS-checkManifestLockResult.txt",
605604
);
606605
runOnlyForDeploymentPostprocessing = 0;
607606
shellPath = /bin/sh;
608607
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
609608
showEnvVarsInLog = 0;
610609
};
611-
E446D4B40B95766419E07D97 /* [CP] Embed Pods Frameworks */ = {
612-
isa = PBXShellScriptBuildPhase;
613-
buildActionMask = 2147483647;
614-
files = (
615-
);
616-
inputFileListPaths = (
617-
);
618-
inputPaths = (
619-
"${PODS_ROOT}/Target Support Files/Pods-DemoObjciOS/Pods-DemoObjciOS-frameworks.sh",
620-
"${BUILT_PRODUCTS_DIR}/Amplitude-iOS/Amplitude_iOS.framework",
621-
"${BUILT_PRODUCTS_DIR}/GoogleToolboxForMac/GoogleToolboxForMac.framework",
622-
"${PODS_ROOT}/Localytics/Localytics-iOS-5.4.0/Localytics.framework",
623-
"${BUILT_PRODUCTS_DIR}/Mixpanel-swift/Mixpanel.framework",
624-
);
625-
name = "[CP] Embed Pods Frameworks";
626-
outputFileListPaths = (
627-
);
628-
outputPaths = (
629-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Amplitude_iOS.framework",
630-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleToolboxForMac.framework",
631-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Localytics.framework",
632-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Mixpanel.framework",
633-
);
634-
runOnlyForDeploymentPostprocessing = 0;
635-
shellPath = /bin/sh;
636-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DemoObjciOS/Pods-DemoObjciOS-frameworks.sh\"\n";
637-
showEnvVarsInLog = 0;
638-
};
639610
/* End PBXShellScriptBuildPhase section */
640611

641612
/* Begin PBXSourcesBuildPhase section */
@@ -818,7 +789,7 @@
818789
};
819790
6EF749A121E404BC008B22A0 /* Debug */ = {
820791
isa = XCBuildConfiguration;
821-
baseConfigurationReference = 4BE4886BF950708C866FA8F2 /* Pods-DemoObjciOS.debug.xcconfig */;
792+
baseConfigurationReference = D47F5FC88600AFD4E656D50A /* Pods-DemoObjciOS.debug.xcconfig */;
822793
buildSettings = {
823794
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
824795
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
@@ -837,7 +808,7 @@
837808
};
838809
6EF749A221E404BC008B22A0 /* Release */ = {
839810
isa = XCBuildConfiguration;
840-
baseConfigurationReference = D66FA87FA967DCE9F1972546 /* Pods-DemoObjciOS.release.xcconfig */;
811+
baseConfigurationReference = 762D1F9E4AA702083D17C4C9 /* Pods-DemoObjciOS.release.xcconfig */;
841812
buildSettings = {
842813
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
843814
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;

DemoSwiftApp/AppDelegate.swift

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,19 @@
1616

1717
import UIKit
1818
import Optimizely
19-
#if os(iOS)
20-
import Amplitude_iOS
21-
#endif
2219

2320
@UIApplicationMain
2421
class AppDelegate: UIResponder, UIApplicationDelegate {
25-
26-
var window: UIWindow?
27-
var optimizely: OptimizelyManager?
28-
29-
// generate random user ID on each app load
30-
let userId = String(Int(arc4random_uniform(300000)))
31-
32-
// customizable settings
22+
let sdkKey = "FCnSegiEkRry9rhVMroit4"
3323
let datafileName = "demoTestDatafile"
3424
let experimentKey = "background_experiment"
3525
let eventKey = "sample_conversion"
36-
let attributes = ["browser_type": "safari", "bool_attr": false] as [String : Any?]
37-
let sdkKey = "FCnSegiEkRry9rhVMroit4"
3826

27+
let userId = String(Int.random(in: 0..<300000))
28+
let attributes: [String : Any?] = ["browser_type": "safari", "bool_attr": false]
29+
30+
var window: UIWindow?
31+
var optimizely: OptimizelyManager!
3932
var storyboard: UIStoryboard {
4033
#if os(iOS)
4134
return UIStoryboard(name: "iOSMain", bundle: nil)
@@ -55,7 +48,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
5548
// - no network delay, but the local copy is not guaranteed to be in sync with the server experiment settings
5649

5750
initializeOptimizelySDKAsynchronous()
58-
//initializeOptimizelySDKSynchronous()
5951
}
6052

6153
func initializeOptimizelySDKAsynchronous() {

0 commit comments

Comments
 (0)