Skip to content

Commit

Permalink
fix: SPM macOS/tvOS disable event explorer (#315)
Browse files Browse the repository at this point in the history
* Reorganize folder structure to reflect XCode structure and SPM requirements

* Adjust podspec for new project structure

* Update .gitignore

* update cocoapods
  • Loading branch information
jooohhn authored Nov 17, 2020
1 parent 64aa1ad commit e3e763c
Show file tree
Hide file tree
Showing 30 changed files with 145 additions and 121 deletions.
26 changes: 23 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,31 @@
.DS_STORE
/Pods
*.xcuserdatad*
*.xccheckout
/Build/
/DerivedData/
*.xcworkspace/xcshareddata/*.xcscmblueprint
Carthage/Build

doc/
.swiftpm

## Xcode user settings
xcuserdata/

## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
*.xcscmblueprint
*.xccheckout

## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
*build/
DerivedData/
*.moved-aside
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3

## Gcc Patch
/*.gcno
14 changes: 2 additions & 12 deletions Amplitude.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,14 @@ Pod::Spec.new do |s|
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.ios.source_files = 'Sources/Amplitude/**/*.{h,m}', 'Sources/EventExplorer/*.{h,m}'
s.ios.resources = 'Sources/Amplitude/**/*.{der,xib,png}', 'Sources/EventExplorer/**/*.{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.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
179 changes: 91 additions & 88 deletions Amplitude.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
source 'https://rubygems.org'

gem 'cocoapods'
gem 'cocoapods', '~>1.1'
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ PLATFORMS
ruby

DEPENDENCIES
cocoapods
cocoapods (~> 1.1)

BUNDLED WITH
2.1.4
41 changes: 26 additions & 15 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,35 @@ let package = Package(
.library(name: "Amplitude", targets: ["Amplitude"]),
],
targets: [
.target(
name: "Amplitude",
path: "Sources/Amplitude",
exclude: ["AppledocSettings.plist"],
.target(
name: "EventExplorer",
path: "Sources/EventExplorer",
resources: [
.process("Resources/AMPBubbleView.xib"),
.process("Resources/AMPInfoViewController.xib"),
.process("Resources/cancel.png"),
.process("Resources/[email protected]"),
.process("Resources/[email protected]"),
.process("Resources/ComodoRsaDomainValidationCA.der"),
.process("Resources/logo-banner.png"),
.process("Resources/[email protected]"),
.process("Resources/[email protected]"),
.process("Resources/logo-button.png"),
.process("Resources/[email protected]"),
.process("Resources/[email protected]")
.process("Resources/Images/cancel.png"),
.process("Resources/Images/[email protected]"),
.process("Resources/Images/[email protected]"),
.process("Resources/Images/logo-banner.png"),
.process("Resources/Images/[email protected]"),
.process("Resources/Images/[email protected]"),
.process("Resources/Images/logo-button.png"),
.process("Resources/Images/[email protected]"),
.process("Resources/Images/[email protected]")
],
publicHeadersPath: ".",
cSettings: [
.headerSearchPath("../Amplitude")
]
),
.target(
name: "Amplitude",
dependencies: [
.target(name: "EventExplorer", condition: .when(platforms: [.iOS])),
],
publicHeadersPath: ".")
path: "Sources/Amplitude",
resources: [.process("Resources/ComodoRsaDomainValidationCA.der")],
publicHeadersPath: "."),
]
)

2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: c234af1832073dccffe31825daef96d6b0eb126c

COCOAPODS: 1.9.3
COCOAPODS: 1.10.0
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes

0 comments on commit e3e763c

Please sign in to comment.