Skip to content

Commit

Permalink
Fix publish issue for cocoapods (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
haoliu-amp authored Oct 1, 2020
1 parent e638e2f commit 3006833
Show file tree
Hide file tree
Showing 22 changed files with 350 additions and 445 deletions.
20 changes: 0 additions & 20 deletions Amplitude-iOS.podspec

This file was deleted.

26 changes: 21 additions & 5 deletions Amplitude.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,28 @@ Pod::Spec.new do |s|
s.license = { :type => "MIT" }
s.author = { "Amplitude" => "dev@amplitude.com" }
s.source = { :git => "https://github.com/amplitude/Amplitude-iOS.git", :tag => "v#{s.version}" }
s.requires_arc = true
s.library = 'sqlite3.0'

s.ios.deployment_target = '10.0'
s.ios.source_files = 'Sources/Amplitude/*.{h,m}'
s.ios.resources = 'Sources/Amplitude/**/*.{der,xib,png}'

s.tvos.deployment_target = '9.0'
s.tvos.source_files = 'Sources/Amplitude/*.{h,m}'
s.tvos.resources = 'Sources/Amplitude/**/*.{der}'
s.tvos.exclude_files = [
'Sources/Amplitude/AMPBubbleView.{h,m}',
'Sources/Amplitude/AMPEventExplorer.{h,m}',
'Sources/Amplitude/AMPInfoViewController.{h,m}'
]

s.osx.deployment_target = '10.10'
s.source_files = 'Sources/Amplitude/*.{h,m}', 'Sources/Amplitude/SSLCertificatePinning/*.{h,m}'
s.resources = 'Sources/Amplitude/*.der'
s.requires_arc = true
s.library = 'sqlite3.0'
s.ios.resource_bundles = {'Amplitude' => ['Sources/Amplitude/*.xcassets', 'Sources/Amplitude/*.xib']}
s.osx.source_files = 'Sources/Amplitude/*.{h,m}'
s.osx.resources = 'Sources/Amplitude/**/*.{der}'
s.osx.exclude_files = [
'Sources/Amplitude/AMPBubbleView.{h,m}',
'Sources/Amplitude/AMPEventExplorer.{h,m}',
'Sources/Amplitude/AMPInfoViewController.{h,m}'
]
end
606 changes: 292 additions & 314 deletions Amplitude.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
// swift-tools-version:5.1
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "Amplitude",
platforms: [
.iOS(.v10),
.tvOS(.v9),
.macOS(.v10_10)
],
products: [
.library(
name: "Amplitude",
targets: ["Amplitude"]),
.library(name: "Amplitude", targets: ["Amplitude"]),
],
targets: [
.target(
name: "Amplitude",
path: "Sources/Amplitude",
exclude: [],
publicHeadersPath: "."),
publicHeadersPath: ".")
]
)
6 changes: 3 additions & 3 deletions Sources/Amplitude/AMPBubbleView.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ - (instancetype)initWithFrame:(CGRect)frame {
}

- (void)loadViewFromNib {
NSURL *bundleURL = [[[NSBundle bundleForClass:self.class] resourceURL] URLByAppendingPathComponent:@"Amplitude.bundle"];
NSBundle *resBundle = [NSBundle bundleWithURL:bundleURL];
UINib *nib = [UINib nibWithNibName:@"AMPBubbleView" bundle:resBundle];
NSBundle *bundle = [NSBundle bundleForClass:[AMPBubbleView class]];
UINib *nib = [UINib nibWithNibName:@"AMPBubbleView" bundle:bundle];

NSArray *views = [nib instantiateWithOwner:self options:nil];
UIView *view = [views objectAtIndex:0];
view.frame = self.bounds;
Expand Down
6 changes: 2 additions & 4 deletions Sources/Amplitude/AMPEventExplorer.m
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,8 @@ - (void)showInfoView {
if (self.bubbleView != nil) {
UIViewController *rootViewController = [[[AMPUtils getSharedApplication] keyWindow] rootViewController];

NSURL *bundleURL = [[[NSBundle bundleForClass:self.class] resourceURL] URLByAppendingPathComponent:@"Amplitude.bundle"];
NSBundle *resBundle = [NSBundle bundleWithURL:bundleURL];

AMPInfoViewController *infoVC = [[AMPInfoViewController alloc] initWithNibName:@"AMPInfoViewController" bundle:resBundle];
NSBundle *bundle = [NSBundle bundleForClass:[AMPInfoViewController class]];
AMPInfoViewController *infoVC = [[AMPInfoViewController alloc] initWithNibName:@"AMPInfoViewController" bundle:bundle];
infoVC.instanceName = self.instanceName;

[infoVC setModalPresentationStyle:UIModalPresentationFullScreen];
Expand Down
6 changes: 0 additions & 6 deletions Sources/Amplitude/Assets.xcassets/Contents.json

This file was deleted.

This file was deleted.

23 changes: 0 additions & 23 deletions Sources/Amplitude/Assets.xcassets/amp_logo.imageset/Contents.json

This file was deleted.

23 changes: 0 additions & 23 deletions Sources/Amplitude/Assets.xcassets/blue_x.imageset/Contents.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097.3" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" 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="16087"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand All @@ -14,25 +14,25 @@
<rect key="frame" x="0.0" y="0.0" width="414" height="528"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="amp_logo" translatesAutoresizingMaskIntoConstraints="NO" id="hmO-o9-Njq">
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="logo-button.png" translatesAutoresizingMaskIntoConstraints="NO" id="hmO-o9-Njq">
<rect key="frame" x="187" y="244" width="40" height="40"/>
<constraints>
<constraint firstAttribute="width" constant="40" id="a6l-yI-MEY"/>
<constraint firstAttribute="height" constant="40" id="xHf-Rm-QMQ"/>
</constraints>
</imageView>
</subviews>
<viewLayoutGuide key="safeArea" id="lWT-B1-1eZ"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="hmO-o9-Njq" firstAttribute="centerY" secondItem="Mmh-9r-w4b" secondAttribute="centerY" id="Mym-Qv-9D3"/>
<constraint firstItem="hmO-o9-Njq" firstAttribute="centerX" secondItem="Mmh-9r-w4b" secondAttribute="centerX" id="kRW-Gm-aWN"/>
</constraints>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<viewLayoutGuide key="safeArea" id="lWT-B1-1eZ"/>
<point key="canvasLocation" x="111.59420289855073" y="-49.553571428571423"/>
</view>
</objects>
<resources>
<image name="amp_logo" width="56" height="56"/>
<image name="logo-button.png" width="56" height="56"/>
</resources>
</document>
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097.3" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" 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="16087"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
<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>
Expand All @@ -27,21 +28,21 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="z91-oh-MQd">
<rect key="frame" x="0.0" y="44" width="414" height="48"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="amp_banner" translatesAutoresizingMaskIntoConstraints="NO" id="yC4-g4-P0A">
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="logo-banner.png" translatesAutoresizingMaskIntoConstraints="NO" id="yC4-g4-P0A">
<rect key="frame" x="130.5" y="8" width="153" height="32"/>
<constraints>
<constraint firstAttribute="width" constant="153" id="e8q-Jb-fvR"/>
</constraints>
</imageView>
<imageView clipsSubviews="YES" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="blue_x" translatesAutoresizingMaskIntoConstraints="NO" id="KGS-Ro-eke">
<imageView clipsSubviews="YES" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="cancel.png" translatesAutoresizingMaskIntoConstraints="NO" id="KGS-Ro-eke">
<rect key="frame" x="374" y="11.5" width="25" height="25"/>
<constraints>
<constraint firstAttribute="height" constant="25" id="MDV-8m-3Gp"/>
<constraint firstAttribute="width" constant="25" id="iae-49-UVU"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="KGS-Ro-eke" secondAttribute="trailing" constant="15" id="8ox-nZ-04y"/>
<constraint firstAttribute="height" constant="48" id="Dy5-iB-XNa"/>
Expand All @@ -54,13 +55,13 @@
<rect key="frame" x="0.0" y="100" width="414" height="168"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="User Information" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Qd4-uu-WlG">
<rect key="frame" x="16" y="12" width="139" height="22"/>
<rect key="frame" x="16" y="12" width="138" height="22"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
<color key="textColor" red="0.047058823529411764" green="0.16470588235294117" blue="0.29411764705882354" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="DEVICE ID" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fa0-Z3-EQI">
<rect key="frame" x="16" y="44" width="72" height="18"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="DEVICE ID" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fa0-Z3-EQI">
<rect key="frame" x="16" y="44" width="90" height="18"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="15"/>
<color key="textColor" red="0.047058823530000002" green="0.1647058824" blue="0.29411764709999999" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
Expand All @@ -83,7 +84,7 @@
<color key="textColor" red="0.047058823530000002" green="0.1647058824" blue="0.29411764709999999" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="GsY-6b-iDe">
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="GsY-6b-iDe">
<rect key="frame" x="331" y="44" width="60" height="25"/>
<constraints>
<constraint firstAttribute="height" constant="25" id="7hx-qd-OxK"/>
Expand All @@ -96,7 +97,7 @@
<action selector="deviceIdCopyTapped:" destination="-1" eventType="touchUpInside" id="ABU-87-3gr"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Os2-uY-wnr">
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Os2-uY-wnr">
<rect key="frame" x="331" y="103" width="60" height="25"/>
<constraints>
<constraint firstAttribute="width" constant="60" id="0qG-0I-uas"/>
Expand All @@ -121,7 +122,7 @@
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="Sim-bI-hZ8" firstAttribute="centerX" secondItem="NVp-UW-fyd" secondAttribute="centerX" id="15I-AG-OBl"/>
<constraint firstItem="GsY-6b-iDe" firstAttribute="centerX" secondItem="Os2-uY-wnr" secondAttribute="centerX" id="1fE-Y5-egw"/>
Expand All @@ -145,6 +146,7 @@
</constraints>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="Q5M-cg-NOt"/>
<color key="backgroundColor" red="0.89803921568627454" green="0.89803921568627454" blue="0.89803921568627454" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="z91-oh-MQd" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" id="5to-xW-cFJ"/>
Expand All @@ -155,12 +157,14 @@
<constraint firstItem="z91-oh-MQd" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="oXm-xM-cz8"/>
<constraint firstItem="z91-oh-MQd" firstAttribute="trailing" secondItem="Q5M-cg-NOt" secondAttribute="trailing" id="sMI-JR-Pbz"/>
</constraints>
<viewLayoutGuide key="safeArea" id="Q5M-cg-NOt"/>
<point key="canvasLocation" x="137.68115942028987" y="-70.3125"/>
</view>
</objects>
<resources>
<image name="amp_banner" width="154" height="32"/>
<image name="blue_x" width="24" height="24"/>
<image name="cancel.png" width="24" height="24"/>
<image name="logo-banner.png" width="154" height="32"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
File renamed without changes
File renamed without changes
File renamed without changes

0 comments on commit 3006833

Please sign in to comment.