Skip to content

Commit

Permalink
Merge pull request #6 from infinum/chore/spm-bundle
Browse files Browse the repository at this point in the history
Update SPM bundle module for Assets loading
  • Loading branch information
Dejan Skledar authored Aug 3, 2022
2 parents 7495356 + a443173 commit f3c483e
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Collar.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Collar'
s.version = '1.0.2'
s.version = '1.0.3'
s.summary = 'In-app analytics debugging tool'
s.description = <<-DESC
Collar simplifies analytics debugging by showing events, screen views and user properties of your app as they happen.
Expand Down
8 changes: 6 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.2
// swift-tools-version:5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand All @@ -23,7 +23,11 @@ let package = Package(
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "Collar",
dependencies: []),
dependencies: [],
resources: [
.process("Assets")
]
),
.testTarget(
name: "CollarTests",
dependencies: ["Collar"]),
Expand Down
16 changes: 10 additions & 6 deletions Sources/Collar/Assets/LogItemPopupView.xib
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clipsSubviews="YES" alpha="0.80000000000000004" contentMode="scaleToFill" id="iN0-l3-epB" customClass="LogItemPopupView" customModule="Collar" customModuleProvider="target">
<view clipsSubviews="YES" alpha="0.80000000000000004" contentMode="scaleToFill" id="iN0-l3-epB" customClass="LogItemPopupView" customModule="Collar">
<rect key="frame" x="0.0" y="0.0" width="244" height="82"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view clipsSubviews="YES" userInteractionEnabled="NO" alpha="0.80000000000000004" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="GbJ-Ke-17X">
<rect key="frame" x="0.0" y="0.0" width="244" height="82"/>
<color key="backgroundColor" cocoaTouchSystemColor="viewFlipsideBackgroundColor"/>
<color key="backgroundColor" systemColor="viewFlipsideBackgroundColor"/>
</view>
<stackView opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" axis="vertical" spacing="4" translatesAutoresizingMaskIntoConstraints="NO" id="m14-ob-mvT">
<rect key="frame" x="40" y="12" width="196" height="58"/>
Expand All @@ -43,6 +42,7 @@
</constraints>
</imageView>
</subviews>
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="RMR-yx-Ljs" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="8" id="ESz-ZO-9pL"/>
Expand All @@ -60,7 +60,6 @@
<nil key="simulatedTopBarMetrics"/>
<nil key="simulatedBottomBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
<connections>
<outlet property="subtitleLabel" destination="8Xd-iH-YHn" id="ts5-D2-ReQ"/>
<outlet property="titleLabel" destination="RS0-vK-XaE" id="a1i-RM-N30"/>
Expand All @@ -69,4 +68,9 @@
<point key="canvasLocation" x="15.942028985507248" y="101.11607142857143"/>
</view>
</objects>
<resources>
<systemColor name="viewFlipsideBackgroundColor">
<color red="0.1215686274509804" green="0.12941176470588239" blue="0.14117647058823529" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>
7 changes: 3 additions & 4 deletions Sources/Collar/Assets/LogTableViewCell.xib
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_0" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="LogTableViewCell" rowHeight="173" id="srb-nt-IYD" customClass="LogTableViewCell" customModule="Collar" customModuleProvider="target">
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="LogTableViewCell" rowHeight="173" id="srb-nt-IYD" customClass="LogTableViewCell" customModule="Collar">
<rect key="frame" x="0.0" y="0.0" width="399" height="173"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" multipleTouchEnabled="YES" contentMode="center" tableViewCell="srb-nt-IYD" id="3f4-hx-8Ax">
Expand Down
16 changes: 10 additions & 6 deletions Sources/Collar/Assets/Settings.storyboard
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Settings View Controller-->
<scene sceneID="8ln-T4-J3o">
<objects>
<tableViewController storyboardIdentifier="SettingsViewController" id="dTD-FB-eEp" customClass="SettingsViewController" customModule="Collar" customModuleProvider="target" sceneMemberID="viewController">
<tableViewController storyboardIdentifier="SettingsViewController" id="dTD-FB-eEp" customClass="SettingsViewController" customModule="Collar" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" allowsSelection="NO" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" sectionFooterHeight="18" id="llV-vi-pCl">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
<sections>
<tableViewSection headerTitle="Popup" id="Uh7-NX-0Yd">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="43.5" id="mRi-wu-85g">
<rect key="frame" x="0.0" y="55.5" width="414" height="43.5"/>
<rect key="frame" x="0.0" y="49.5" width="414" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="mRi-wu-85g" id="2c6-Nj-R4F">
<rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
Expand Down Expand Up @@ -64,4 +63,9 @@
<point key="canvasLocation" x="139" y="139"/>
</scene>
</scenes>
<resources>
<systemColor name="groupTableViewBackgroundColor">
<color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>
4 changes: 4 additions & 0 deletions Sources/Collar/Classes/Common/Bundle+Framework.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import Foundation
extension Bundle {

static var framework: Bundle {
#if SWIFT_PACKAGE
return Bundle.module
#endif

let bundle = Bundle(for: LogListViewController.self)
if
let path = bundle.path(forResource: "Collar", ofType: "bundle"),
Expand Down

0 comments on commit f3c483e

Please sign in to comment.