Skip to content

Commit

Permalink
feat: inline in-app (#864)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shahroz16 authored Jan 30, 2025
2 parents 31ba347 + a6dd933 commit 35fba9b
Show file tree
Hide file tree
Showing 32 changed files with 2,034 additions and 407 deletions.
24 changes: 24 additions & 0 deletions Apps/APN-UIKit/APN UIKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,13 @@
46EE277929ED833D0068F9A3 /* Settings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46EE277829ED833D0068F9A3 /* Settings.swift */; };
46EE278429EEEDF30068F9A3 /* NotificationUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46EE278329EEEDF30068F9A3 /* NotificationUtil.swift */; };
46EE278629F01F9C0068F9A3 /* ImageViewExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46EE278529F01F9B0068F9A3 /* ImageViewExtension.swift */; };
68050B6E2D417D100090B4BB /* InlineInAppMessageSwiftUiViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68050B6D2D417D100090B4BB /* InlineInAppMessageSwiftUiViewController.swift */; };
68050B722D417DAA0090B4BB /* InlineInAppMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68050B712D417DAA0090B4BB /* InlineInAppMessageView.swift */; };
68050B742D4246CE0090B4BB /* ColorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68050B732D4246CE0090B4BB /* ColorExtension.swift */; };
9443F22C2A66CD650019E744 /* MetadataUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9443F22B2A66CD650019E744 /* MetadataUtil.swift */; };
94AF7C9F2A44BE9B004880BD /* BaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94AF7C9E2A44BE9B004880BD /* BaseViewController.swift */; };
94C5C26C2A718E970066A072 /* DateExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94C5C26B2A718E970066A072 /* DateExtension.swift */; };
A76FCBF62D48AE5000625DD9 /* InlineInAppMessageUikitViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A76FCBF52D48AE5000625DD9 /* InlineInAppMessageUikitViewController.swift */; };
A776886C2B9875B5004F2A49 /* DataPipelines in Frameworks */ = {isa = PBXBuildFile; productRef = A776886B2B9875B5004F2A49 /* DataPipelines */; };
A776886E2B9875D0004F2A49 /* DataPipelines in Frameworks */ = {isa = PBXBuildFile; productRef = A776886D2B9875D0004F2A49 /* DataPipelines */; };
F74F41F92A168316000D61B9 /* BuildEnvironment.swift in Sources */ = {isa = PBXBuildFile; fileRef = F74F41F82A168316000D61B9 /* BuildEnvironment.swift */; };
Expand Down Expand Up @@ -138,9 +142,13 @@
46EE277829ED833D0068F9A3 /* Settings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Settings.swift; sourceTree = "<group>"; };
46EE278329EEEDF30068F9A3 /* NotificationUtil.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationUtil.swift; sourceTree = "<group>"; };
46EE278529F01F9B0068F9A3 /* ImageViewExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageViewExtension.swift; sourceTree = "<group>"; };
68050B6D2D417D100090B4BB /* InlineInAppMessageSwiftUiViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InlineInAppMessageSwiftUiViewController.swift; sourceTree = "<group>"; };
68050B712D417DAA0090B4BB /* InlineInAppMessageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InlineInAppMessageView.swift; sourceTree = "<group>"; };
68050B732D4246CE0090B4BB /* ColorExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorExtension.swift; sourceTree = "<group>"; };
9443F22B2A66CD650019E744 /* MetadataUtil.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MetadataUtil.swift; sourceTree = "<group>"; };
94AF7C9E2A44BE9B004880BD /* BaseViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseViewController.swift; sourceTree = "<group>"; };
94C5C26B2A718E970066A072 /* DateExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DateExtension.swift; sourceTree = "<group>"; };
A76FCBF52D48AE5000625DD9 /* InlineInAppMessageUikitViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InlineInAppMessageUikitViewController.swift; sourceTree = "<group>"; };
F74F41F82A168316000D61B9 /* BuildEnvironment.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BuildEnvironment.swift; sourceTree = SOURCE_ROOT; };
F7820EA92A15631000B346A9 /* DIGraphShared.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DIGraphShared.swift; sourceTree = "<group>"; };
F78934232A168E08005D3DF7 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -261,13 +269,15 @@
46D5D9B029E56DE000EAF40B /* View */ = {
isa = PBXGroup;
children = (
68050B702D417D7D0090B4BB /* Inline */,
46D5D9B829E5887A00EAF40B /* Extension */,
46D5D9B329E56F1E00EAF40B /* Customisation */,
46D5D9B129E56E0E00EAF40B /* LoginViewController.swift */,
46D5D9C029E58EB600EAF40B /* DashboardViewController.swift */,
46D5D9C629E59A5E00EAF40B /* CustomDataViewController.swift */,
46D5D9CB29E830AD00EAF40B /* SettingsViewController.swift */,
4650331029F696B8001B6552 /* DeepLinkViewController.swift */,
A76FCBF52D48AE5000625DD9 /* InlineInAppMessageUikitViewController.swift */,
94AF7C9E2A44BE9B004880BD /* BaseViewController.swift */,
);
path = View;
Expand All @@ -291,6 +301,7 @@
46EE275C29E9ECE60068F9A3 /* StringExtension.swift */,
46EE278529F01F9B0068F9A3 /* ImageViewExtension.swift */,
94C5C26B2A718E970066A072 /* DateExtension.swift */,
68050B732D4246CE0090B4BB /* ColorExtension.swift */,
);
path = Extension;
sourceTree = "<group>";
Expand Down Expand Up @@ -358,6 +369,15 @@
path = Util;
sourceTree = "<group>";
};
68050B702D417D7D0090B4BB /* Inline */ = {
isa = PBXGroup;
children = (
68050B6D2D417D100090B4BB /* InlineInAppMessageSwiftUiViewController.swift */,
68050B712D417DAA0090B4BB /* InlineInAppMessageView.swift */,
);
path = Inline;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -544,13 +564,15 @@
46D5D9B229E56E0E00EAF40B /* LoginViewController.swift in Sources */,
46D5D98529E459D600EAF40B /* ViewController.swift in Sources */,
46D5D9BC29E58D2000EAF40B /* StoryboardExtension.swift in Sources */,
A76FCBF62D48AE5000625DD9 /* InlineInAppMessageUikitViewController.swift in Sources */,
4650331329F69845001B6552 /* DeepLinksHandlerUtil.swift in Sources */,
46D5D98129E459D600EAF40B /* AppDelegate.swift in Sources */,
94AF7C9F2A44BE9B004880BD /* BaseViewController.swift in Sources */,
46D5D9BA29E5889F00EAF40B /* TextFieldExtension.swift in Sources */,
46EE276029E9F1BD0068F9A3 /* Storage.swift in Sources */,
46EE278629F01F9C0068F9A3 /* ImageViewExtension.swift in Sources */,
94C5C26C2A718E970066A072 /* DateExtension.swift in Sources */,
68050B722D417DAA0090B4BB /* InlineInAppMessageView.swift in Sources */,
46D5D9BF29E58DE700EAF40B /* LoginRouter.swift in Sources */,
46D5D9C529E596F300EAF40B /* ViewControllerExtension.swift in Sources */,
46D5D98329E459D600EAF40B /* SceneDelegate.swift in Sources */,
Expand All @@ -559,10 +581,12 @@
46EE276229ED679D0068F9A3 /* UserDefaultKeys.swift in Sources */,
F7820EAA2A15631000B346A9 /* DIGraphShared.swift in Sources */,
46EE277629ED802D0068F9A3 /* DIDependencies.swift in Sources */,
68050B742D4246CE0090B4BB /* ColorExtension.swift in Sources */,
46EE275D29E9ECE60068F9A3 /* StringExtension.swift in Sources */,
46D5D9C129E58EB600EAF40B /* DashboardViewController.swift in Sources */,
46EE277429ED722E0068F9A3 /* AutoMockable.generated.swift in Sources */,
46EE277329ED722E0068F9A3 /* AutoDependencyInjection.generated.swift in Sources */,
68050B6E2D417D100090B4BB /* InlineInAppMessageSwiftUiViewController.swift in Sources */,
4650331129F696B8001B6552 /* DeepLinkViewController.swift in Sources */,
46EE274D29E9CBCE0068F9A3 /* SettingsRouter.swift in Sources */,
9443F22C2A66CD650019E744 /* MetadataUtil.swift in Sources */,
Expand Down
67 changes: 62 additions & 5 deletions Apps/APN-UIKit/APN UIKit/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="iXp-Fu-ehx">
<rect key="frame" x="20" y="240" width="344" height="35"/>
<rect key="frame" x="20" y="240.00000000000003" width="344" height="34.333333333333343"/>
<color key="tintColor" red="0.44313725490196076" green="0.19215686274509802" blue="1" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" title="Generate Random Login"/>
Expand Down Expand Up @@ -154,13 +154,13 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="What would you like to test?" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gm6-Cg-tg6">
<rect key="frame" x="10" y="157.66666666666666" width="394" height="27.333333333333343"/>
<rect key="frame" x="10" y="91.666666666666671" width="394" height="27.333333333333329"/>
<fontDescription key="fontDescription" name="Avenir-Book" family="Avenir" pointSize="20"/>
<color key="textColor" red="0.24313725489999999" green="0.24313725489999999" blue="0.24313725489999999" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalCentering" alignment="center" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="AIH-WX-Xne">
<rect key="frame" x="20" y="225" width="374" height="446"/>
<rect key="frame" x="20" y="159" width="374" height="578"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yOE-0O-ICW" customClass="ThemeButton" customModule="APN_UIKit" customModuleProvider="target">
<rect key="frame" x="94.666666666666686" y="0.0" width="185" height="50"/>
Expand Down Expand Up @@ -241,8 +241,34 @@
<action selector="send3rdPartyPush:" destination="0ax-47-4zI" eventType="touchUpInside" id="DR5-oa-iJr"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Lb4-oP-0VA" userLabel="Inline examples (UiKit)" customClass="ThemeButton" customModule="APN_UIKit" customModuleProvider="target">
<rect key="frame" x="80.666666666666671" y="404" width="212.66666666666663" height="34.333333333333314"/>
<color key="backgroundColor" red="0.2352941036" green="0.26274511220000002" blue="0.49019610879999997" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="185" id="R99-5x-1ES"/>
</constraints>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" title="Inline Examples (SwiftUI)"/>
<connections>
<action selector="openInlineSwiftUiExamples:" destination="0ax-47-4zI" eventType="touchUpInside" id="n9s-20-5vO"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xg6-ZV-bDY" customClass="ThemeButton" customModule="APN_UIKit" customModuleProvider="target">
<rect key="frame" x="89.666666666666671" y="470" width="194.66666666666663" height="34.333333333333314"/>
<color key="backgroundColor" red="0.23529411759999999" green="0.26274509800000001" blue="0.49019607840000001" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="185" id="CXH-fW-VDm"/>
</constraints>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" title="Inline Examples (UIKit)"/>
<connections>
<action selector="openInlineUikitExamples:" destination="0ax-47-4zI" eventType="touchUpInside" id="BOs-sF-hvl"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gSy-pH-Zuu" customClass="ThemeButton" customModule="APN_UIKit" customModuleProvider="target">
<rect key="frame" x="94.666666666666686" y="396" width="185" height="50"/>
<rect key="frame" x="94.666666666666686" y="528" width="185" height="50"/>
<color key="backgroundColor" red="0.23529411759999999" green="0.26274509800000001" blue="0.49019607840000001" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="185" id="uv2-HN-pr3"/>
Expand Down Expand Up @@ -271,7 +297,7 @@
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="What would you like to test?" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mIk-22-9js">
<rect key="frame" x="10" y="130.33333333333334" width="394" height="27.333333333333343"/>
<rect key="frame" x="10" y="64.333333333333329" width="394" height="27.333333333333329"/>
<fontDescription key="fontDescription" name="Avenir-Heavy" family="Avenir" pointSize="20"/>
<color key="textColor" red="0.24313725489999999" green="0.24313725489999999" blue="0.24313725489999999" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<nil key="highlightedColor"/>
Expand Down Expand Up @@ -869,6 +895,37 @@
</objects>
<point key="canvasLocation" x="4202" y="4"/>
</scene>
<!--Inline In App Message Swift Ui View Controller-->
<scene sceneID="UVM-d0-6Zn">
<objects>
<viewController storyboardIdentifier="InlineInAppMessageSwiftUiViewController" id="eep-l7-eum" customClass="InlineInAppMessageSwiftUiViewController" customModule="APN_UIKit" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Vni-O4-X2d">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<viewLayoutGuide key="safeArea" id="tcJ-0P-ZLy"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
</viewController>
<navigationItem id="OhY-DD-4vP"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="hZc-t9-INr" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="4912" y="8"/>
</scene>
<!--Inline In App Message Uikit View Controller-->
<scene sceneID="XvK-Jp-F9O">
<objects>
<viewController storyboardIdentifier="InlineInAppMessageUikitViewController" id="aGf-c1-OHL" userLabel="Inline In App Message Uikit View Controller" customClass="InlineInAppMessageUikitViewController" customModule="APN_UIKit" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8oU-G6-4m4">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<viewLayoutGuide key="safeArea" id="YGe-lJ-MdQ"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Jgv-iL-1eI" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="5651" y="7"/>
</scene>
</scenes>
<resources>
<image name="copy" width="512" height="512"/>
Expand Down
Loading

0 comments on commit 35fba9b

Please sign in to comment.