Skip to content

Commit f339f6f

Browse files
authored
Merge pull request #53 from AdaSupport/ap/testflight-build
testflight build
2 parents 4422beb + 527f261 commit f339f6f

File tree

8 files changed

+253
-12
lines changed

8 files changed

+253
-12
lines changed

AdaEmbedFramework.xcodeproj/project.pbxproj

Lines changed: 179 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,83 @@
4141
remoteGlobalIDString = F04E50D1B414FD7A2138716660B9C2A8;
4242
remoteInfo = "Pods-ExampleAppCocoapod";
4343
};
44+
035CF1D1284F886700ADCB7D /* PBXContainerItemProxy */ = {
45+
isa = PBXContainerItemProxy;
46+
containerPortal = 0334E797270E1A1700FC8C7C /* Pods.xcodeproj */;
47+
proxyType = 2;
48+
remoteGlobalIDString = 161D416B380E59DB3518E76D1BE0BC8A;
49+
remoteInfo = AdaEmbedFramework;
50+
};
51+
035CF1D3284F886700ADCB7D /* PBXContainerItemProxy */ = {
52+
isa = PBXContainerItemProxy;
53+
containerPortal = 0334E797270E1A1700FC8C7C /* Pods.xcodeproj */;
54+
proxyType = 2;
55+
remoteGlobalIDString = C69CD74069907C5679945816B74B2E25;
56+
remoteInfo = "AdaEmbedFramework-AdaEmbedFramework";
57+
};
58+
035CF1D5284F886700ADCB7D /* PBXContainerItemProxy */ = {
59+
isa = PBXContainerItemProxy;
60+
containerPortal = 0334E797270E1A1700FC8C7C /* Pods.xcodeproj */;
61+
proxyType = 2;
62+
remoteGlobalIDString = E2B63D462DB7F827C4B11FD51E4F8E2D;
63+
remoteInfo = FirebaseCore;
64+
};
65+
035CF1D7284F886700ADCB7D /* PBXContainerItemProxy */ = {
66+
isa = PBXContainerItemProxy;
67+
containerPortal = 0334E797270E1A1700FC8C7C /* Pods.xcodeproj */;
68+
proxyType = 2;
69+
remoteGlobalIDString = 8CC9178C366942FD6FF6A115604EAD58;
70+
remoteInfo = FirebaseCoreDiagnostics;
71+
};
72+
035CF1D9284F886700ADCB7D /* PBXContainerItemProxy */ = {
73+
isa = PBXContainerItemProxy;
74+
containerPortal = 0334E797270E1A1700FC8C7C /* Pods.xcodeproj */;
75+
proxyType = 2;
76+
remoteGlobalIDString = 148D0F9E8C7373FEAF40D800FC5F1BAA;
77+
remoteInfo = FirebaseCoreInternal;
78+
};
79+
035CF1DB284F886700ADCB7D /* PBXContainerItemProxy */ = {
80+
isa = PBXContainerItemProxy;
81+
containerPortal = 0334E797270E1A1700FC8C7C /* Pods.xcodeproj */;
82+
proxyType = 2;
83+
remoteGlobalIDString = 13C8C8B254851998F9289F71229B28A2;
84+
remoteInfo = FirebaseInstallations;
85+
};
86+
035CF1DD284F886700ADCB7D /* PBXContainerItemProxy */ = {
87+
isa = PBXContainerItemProxy;
88+
containerPortal = 0334E797270E1A1700FC8C7C /* Pods.xcodeproj */;
89+
proxyType = 2;
90+
remoteGlobalIDString = 5B654B4B042BA7DC93766943A643E42B;
91+
remoteInfo = FirebaseMessaging;
92+
};
93+
035CF1DF284F886700ADCB7D /* PBXContainerItemProxy */ = {
94+
isa = PBXContainerItemProxy;
95+
containerPortal = 0334E797270E1A1700FC8C7C /* Pods.xcodeproj */;
96+
proxyType = 2;
97+
remoteGlobalIDString = 856B5CD56F194FAD26EA91620B66D614;
98+
remoteInfo = GoogleDataTransport;
99+
};
100+
035CF1E1284F886700ADCB7D /* PBXContainerItemProxy */ = {
101+
isa = PBXContainerItemProxy;
102+
containerPortal = 0334E797270E1A1700FC8C7C /* Pods.xcodeproj */;
103+
proxyType = 2;
104+
remoteGlobalIDString = B43874C6CBB50E7134FBEC24BABFE14F;
105+
remoteInfo = GoogleUtilities;
106+
};
107+
035CF1E3284F886700ADCB7D /* PBXContainerItemProxy */ = {
108+
isa = PBXContainerItemProxy;
109+
containerPortal = 0334E797270E1A1700FC8C7C /* Pods.xcodeproj */;
110+
proxyType = 2;
111+
remoteGlobalIDString = 06FC5C9CF96D60C50FCD47D339C91951;
112+
remoteInfo = nanopb;
113+
};
114+
035CF1E5284F886700ADCB7D /* PBXContainerItemProxy */ = {
115+
isa = PBXContainerItemProxy;
116+
containerPortal = 0334E797270E1A1700FC8C7C /* Pods.xcodeproj */;
117+
proxyType = 2;
118+
remoteGlobalIDString = 3347A1AB6546F0A3977529B8F199DC41;
119+
remoteInfo = PromisesObjC;
120+
};
44121
49C73564226F99FE00D22E4B /* PBXContainerItemProxy */ = {
45122
isa = PBXContainerItemProxy;
46123
containerPortal = 49C73550226F99FE00D22E4B /* Project object */;
@@ -204,7 +281,18 @@
204281
0334E798270E1A1700FC8C7C /* Products */ = {
205282
isa = PBXGroup;
206283
children = (
284+
035CF1D2284F886700ADCB7D /* AdaEmbedFramework */,
285+
035CF1D4284F886700ADCB7D /* AdaEmbedFramework-AdaEmbedFramework */,
286+
035CF1D6284F886700ADCB7D /* FirebaseCore */,
287+
035CF1D8284F886700ADCB7D /* FirebaseCoreDiagnostics */,
288+
035CF1DA284F886700ADCB7D /* FirebaseCoreInternal */,
289+
035CF1DC284F886700ADCB7D /* FirebaseInstallations */,
290+
035CF1DE284F886700ADCB7D /* FirebaseMessaging */,
291+
035CF1E0284F886700ADCB7D /* GoogleDataTransport */,
292+
035CF1E2284F886700ADCB7D /* GoogleUtilities */,
293+
035CF1E4284F886700ADCB7D /* nanopb */,
207294
0334E7C7270E1A1700FC8C7C /* Pods-ExampleAppCocoapod */,
295+
035CF1E6284F886700ADCB7D /* PromisesObjC */,
208296
);
209297
name = Products;
210298
sourceTree = "<group>";
@@ -497,6 +585,94 @@
497585
remoteRef = 0334E7C6270E1A1700FC8C7C /* PBXContainerItemProxy */;
498586
sourceTree = BUILT_PRODUCTS_DIR;
499587
};
588+
035CF1D2284F886700ADCB7D /* AdaEmbedFramework */ = {
589+
isa = PBXReferenceProxy;
590+
fileType = wrapper.framework;
591+
name = AdaEmbedFramework;
592+
path = AdaEmbedFramework.framework;
593+
remoteRef = 035CF1D1284F886700ADCB7D /* PBXContainerItemProxy */;
594+
sourceTree = BUILT_PRODUCTS_DIR;
595+
};
596+
035CF1D4284F886700ADCB7D /* AdaEmbedFramework-AdaEmbedFramework */ = {
597+
isa = PBXReferenceProxy;
598+
fileType = wrapper.cfbundle;
599+
name = "AdaEmbedFramework-AdaEmbedFramework";
600+
path = AdaEmbedFramework.bundle;
601+
remoteRef = 035CF1D3284F886700ADCB7D /* PBXContainerItemProxy */;
602+
sourceTree = BUILT_PRODUCTS_DIR;
603+
};
604+
035CF1D6284F886700ADCB7D /* FirebaseCore */ = {
605+
isa = PBXReferenceProxy;
606+
fileType = wrapper.framework;
607+
name = FirebaseCore;
608+
path = FirebaseCore.framework;
609+
remoteRef = 035CF1D5284F886700ADCB7D /* PBXContainerItemProxy */;
610+
sourceTree = BUILT_PRODUCTS_DIR;
611+
};
612+
035CF1D8284F886700ADCB7D /* FirebaseCoreDiagnostics */ = {
613+
isa = PBXReferenceProxy;
614+
fileType = wrapper.framework;
615+
name = FirebaseCoreDiagnostics;
616+
path = FirebaseCoreDiagnostics.framework;
617+
remoteRef = 035CF1D7284F886700ADCB7D /* PBXContainerItemProxy */;
618+
sourceTree = BUILT_PRODUCTS_DIR;
619+
};
620+
035CF1DA284F886700ADCB7D /* FirebaseCoreInternal */ = {
621+
isa = PBXReferenceProxy;
622+
fileType = wrapper.framework;
623+
name = FirebaseCoreInternal;
624+
path = FirebaseCoreInternal.framework;
625+
remoteRef = 035CF1D9284F886700ADCB7D /* PBXContainerItemProxy */;
626+
sourceTree = BUILT_PRODUCTS_DIR;
627+
};
628+
035CF1DC284F886700ADCB7D /* FirebaseInstallations */ = {
629+
isa = PBXReferenceProxy;
630+
fileType = wrapper.framework;
631+
name = FirebaseInstallations;
632+
path = FirebaseInstallations.framework;
633+
remoteRef = 035CF1DB284F886700ADCB7D /* PBXContainerItemProxy */;
634+
sourceTree = BUILT_PRODUCTS_DIR;
635+
};
636+
035CF1DE284F886700ADCB7D /* FirebaseMessaging */ = {
637+
isa = PBXReferenceProxy;
638+
fileType = wrapper.framework;
639+
name = FirebaseMessaging;
640+
path = FirebaseMessaging.framework;
641+
remoteRef = 035CF1DD284F886700ADCB7D /* PBXContainerItemProxy */;
642+
sourceTree = BUILT_PRODUCTS_DIR;
643+
};
644+
035CF1E0284F886700ADCB7D /* GoogleDataTransport */ = {
645+
isa = PBXReferenceProxy;
646+
fileType = wrapper.framework;
647+
name = GoogleDataTransport;
648+
path = GoogleDataTransport.framework;
649+
remoteRef = 035CF1DF284F886700ADCB7D /* PBXContainerItemProxy */;
650+
sourceTree = BUILT_PRODUCTS_DIR;
651+
};
652+
035CF1E2284F886700ADCB7D /* GoogleUtilities */ = {
653+
isa = PBXReferenceProxy;
654+
fileType = wrapper.framework;
655+
name = GoogleUtilities;
656+
path = GoogleUtilities.framework;
657+
remoteRef = 035CF1E1284F886700ADCB7D /* PBXContainerItemProxy */;
658+
sourceTree = BUILT_PRODUCTS_DIR;
659+
};
660+
035CF1E4284F886700ADCB7D /* nanopb */ = {
661+
isa = PBXReferenceProxy;
662+
fileType = wrapper.framework;
663+
name = nanopb;
664+
path = nanopb.framework;
665+
remoteRef = 035CF1E3284F886700ADCB7D /* PBXContainerItemProxy */;
666+
sourceTree = BUILT_PRODUCTS_DIR;
667+
};
668+
035CF1E6284F886700ADCB7D /* PromisesObjC */ = {
669+
isa = PBXReferenceProxy;
670+
fileType = wrapper.framework;
671+
name = PromisesObjC;
672+
path = FBLPromises.framework;
673+
remoteRef = 035CF1E5284F886700ADCB7D /* PBXContainerItemProxy */;
674+
sourceTree = BUILT_PRODUCTS_DIR;
675+
};
500676
/* End PBXReferenceProxy section */
501677

502678
/* Begin PBXResourcesBuildPhase section */
@@ -662,6 +838,7 @@
662838
CODE_SIGN_IDENTITY = "";
663839
CODE_SIGN_STYLE = Automatic;
664840
DEFINES_MODULE = YES;
841+
DEVELOPMENT_TEAM = ZRU59KP7YH;
665842
DYLIB_COMPATIBILITY_VERSION = 1;
666843
DYLIB_CURRENT_VERSION = 1;
667844
DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -691,6 +868,7 @@
691868
buildSettings = {
692869
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
693870
CODE_SIGN_STYLE = Automatic;
871+
DEVELOPMENT_TEAM = ZRU59KP7YH;
694872
INFOPLIST_FILE = EmbedFrameworkTests/Info.plist;
695873
LD_RUNPATH_SEARCH_PATHS = (
696874
"$(inherited)",
@@ -710,7 +888,7 @@
710888
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
711889
CODE_SIGN_ENTITLEMENTS = ExampleApp/ExampleApp.entitlements;
712890
CODE_SIGN_STYLE = Automatic;
713-
DEVELOPMENT_TEAM = 45N226Q5J8;
891+
DEVELOPMENT_TEAM = ZRU59KP7YH;
714892
INFOPLIST_FILE = ExampleApp/Info.plist;
715893
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
716894
LD_RUNPATH_SEARCH_PATHS = (

EmbedFramework/AdaWebHost.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public class AdaWebHost: NSObject {
2424
public var language = ""
2525
public var styles = ""
2626
public var greeting = ""
27+
public var deviceToken = ""
2728
public var webViewTimeout = 30.0
2829

2930

@@ -102,6 +103,7 @@ public class AdaWebHost: NSObject {
102103
self.eventCallbacks = eventCallbacks
103104
self.webViewTimeout = webViewTimeout
104105
self.hasError = false
106+
self.deviceToken = deviceToken
105107

106108
self.reachability = Reachability()!
107109
super.init()
@@ -142,14 +144,13 @@ public class AdaWebHost: NSObject {
142144
print("Unable to start reachability notifier.")
143145
}
144146

145-
setDeviceToken(deviceToken: deviceToken)
146147
setupWebView()
147148
}
148149

149150
// MARK: - Public Methods
150151

151152
public func setDeviceToken(deviceToken : String) {
152-
let toRun = "adaEmbed.setDeviceToken(\(deviceToken));"
153+
let toRun = "adaEmbed.setDeviceToken(\"\(deviceToken)\");"
153154

154155
self.evalJS(toRun)
155156
}
@@ -350,7 +351,8 @@ extension AdaWebHost {
350351
self.webViewLoadingErrorCallback?(AdaWebHostError.WebViewTimeout)
351352
}
352353
}
353-
354+
355+
354356

355357
}
356358
}
@@ -521,6 +523,7 @@ extension AdaWebHost {
521523
sensitiveMetaFields: \(sensitiveMetaFieldsJson),
522524
parentElement: "parent-element",
523525
onAdaEmbedLoaded: () => {
526+
adaEmbed.setDeviceToken("\(self.deviceToken)\");
524527
adaEmbed.subscribeEvent("ada:chat_frame_timeout", (data, context) => {
525528
window.webkit.messageHandlers.chatFrameTimeoutCallbackHandler.postMessage("chatFrameTimeout");
526529
});
@@ -535,6 +538,7 @@ extension AdaWebHost {
535538
});
536539
})();
537540
""")
541+
538542
} catch (let error) {
539543
print("Serialization error: \(error.localizedDescription)")
540544
return

ExampleApp/ExampleApp.entitlements

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
4-
<dict/>
4+
<dict>
5+
<key>aps-environment</key>
6+
<string>development</string>
7+
</dict>
58
</plist>

ExampleApp/ViewController.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,6 @@ class ViewController: UIViewController {
6161
_ = injectingVC.view
6262
adaFramework.launchInjectingWebSupport(into: injectingVC.injectingView)
6363
}
64+
65+
6466
}

ExampleAppCocoapod/ExampleAppCocoapod.xcodeproj/project.pbxproj

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
66B2D16C192F5D92B22AA0AE /* Pods-ExampleAppCocoapod.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleAppCocoapod.release.xcconfig"; path = "Target Support Files/Pods-ExampleAppCocoapod/Pods-ExampleAppCocoapod.release.xcconfig"; sourceTree = "<group>"; };
3131
73D3C79D896FEE077C559153 /* Pods-ExampleAppCocoapod.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleAppCocoapod.debug.xcconfig"; path = "Target Support Files/Pods-ExampleAppCocoapod/Pods-ExampleAppCocoapod.debug.xcconfig"; sourceTree = "<group>"; };
3232
98CB6A2FEE20585E9E84257B /* Pods_ExampleAppCocoapod.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ExampleAppCocoapod.framework; sourceTree = BUILT_PRODUCTS_DIR; };
33+
B7035B65284E4B17007D20FC /* ExampleAppCocoapod.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = ExampleAppCocoapod.entitlements; sourceTree = "<group>"; };
3334
/* End PBXFileReference section */
3435

3536
/* Begin PBXFrameworksBuildPhase section */
@@ -65,6 +66,7 @@
6566
039BA90D270E157C00DF3600 /* ExampleAppCocoapod */ = {
6667
isa = PBXGroup;
6768
children = (
69+
B7035B65284E4B17007D20FC /* ExampleAppCocoapod.entitlements */,
6870
039BA928270E16A900DF3600 /* InjectedViewController.swift */,
6971
039BA929270E16A900DF3600 /* Main.storyboard */,
7072
039BA90E270E157C00DF3600 /* AppDelegate.swift */,
@@ -352,9 +354,10 @@
352354
buildSettings = {
353355
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
354356
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
357+
CODE_SIGN_ENTITLEMENTS = ExampleAppCocoapod/ExampleAppCocoapod.entitlements;
355358
CODE_SIGN_STYLE = Automatic;
356359
CURRENT_PROJECT_VERSION = 1;
357-
DEVELOPMENT_TEAM = BY82U3VVS9;
360+
DEVELOPMENT_TEAM = ZRU59KP7YH;
358361
GENERATE_INFOPLIST_FILE = YES;
359362
INFOPLIST_FILE = ExampleAppCocoapod/Info.plist;
360363
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
@@ -367,7 +370,7 @@
367370
"@executable_path/Frameworks",
368371
);
369372
MARKETING_VERSION = 1.0;
370-
PRODUCT_BUNDLE_IDENTIFIER = MichaelTest.ExampleAppCocoapod;
373+
PRODUCT_BUNDLE_IDENTIFIER = support.ada.ios.sample;
371374
PRODUCT_NAME = "$(TARGET_NAME)";
372375
SWIFT_EMIT_LOC_STRINGS = YES;
373376
SWIFT_VERSION = 5.0;
@@ -381,9 +384,10 @@
381384
buildSettings = {
382385
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
383386
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
387+
CODE_SIGN_ENTITLEMENTS = ExampleAppCocoapod/ExampleAppCocoapod.entitlements;
384388
CODE_SIGN_STYLE = Automatic;
385389
CURRENT_PROJECT_VERSION = 1;
386-
DEVELOPMENT_TEAM = BY82U3VVS9;
390+
DEVELOPMENT_TEAM = ZRU59KP7YH;
387391
GENERATE_INFOPLIST_FILE = YES;
388392
INFOPLIST_FILE = ExampleAppCocoapod/Info.plist;
389393
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
@@ -396,7 +400,7 @@
396400
"@executable_path/Frameworks",
397401
);
398402
MARKETING_VERSION = 1.0;
399-
PRODUCT_BUNDLE_IDENTIFIER = MichaelTest.ExampleAppCocoapod;
403+
PRODUCT_BUNDLE_IDENTIFIER = support.ada.ios.sample;
400404
PRODUCT_NAME = "$(TARGET_NAME)";
401405
SWIFT_EMIT_LOC_STRINGS = YES;
402406
SWIFT_VERSION = 5.0;

0 commit comments

Comments
 (0)