Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Google Analytic by Matomo(Piwik) #1753

Merged
merged 10 commits into from
Feb 2, 2018
42 changes: 31 additions & 11 deletions Podfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Uncomment this line to define a global platform for your project
platform :ios, "8.0"

# Use frameforks to allow usage of pod written in Swift (like PiwikTracker)
use_frameworks!

source 'https://github.com/CocoaPods/Specs.git'


Expand All @@ -21,18 +24,15 @@ def import_MatrixKit
if $matrixKitVersion == 'local'
pod 'MatrixSDK', :path => '../matrix-ios-sdk/MatrixSDK.podspec'
pod 'MatrixSDK/JingleCallStack', :path => '../matrix-ios-sdk/MatrixSDK.podspec'
pod 'MatrixSDK/GoogleAnalytics', :path => '../matrix-ios-sdk/MatrixSDK.podspec'
pod 'MatrixKit', :path => '../matrix-ios-kit/MatrixKit.podspec'
else
if $matrixKitVersion == 'develop'
pod 'MatrixSDK', :git => 'https://github.com/matrix-org/matrix-ios-sdk.git', :branch => 'develop'
pod 'MatrixSDK/JingleCallStack', :git => 'https://github.com/matrix-org/matrix-ios-sdk.git', :branch => 'develop'
pod 'MatrixSDK/GoogleAnalytics', :git => 'https://github.com/matrix-org/matrix-ios-sdk.git', :branch => 'develop'
pod 'MatrixKit', :git => 'https://github.com/matrix-org/matrix-ios-kit.git', :branch => 'develop'
else
pod 'MatrixKit', $matrixKitVersion
pod 'MatrixSDK/JingleCallStack'
pod 'MatrixSDK/GoogleAnalytics'
end
end
end
Expand All @@ -42,18 +42,15 @@ def import_MatrixKitAppExtension
if $matrixKitVersion == 'local'
pod 'MatrixSDK', :path => '../matrix-ios-sdk/MatrixSDK.podspec'
pod 'MatrixSDK/JingleCallStack', :path => '../matrix-ios-sdk/MatrixSDK.podspec'
pod 'MatrixSDK/GoogleAnalytics', :path => '../matrix-ios-sdk/MatrixSDK.podspec'
pod 'MatrixKit/AppExtension', :path => '../matrix-ios-kit/MatrixKit.podspec'
else
if $matrixKitVersion == 'develop'
pod 'MatrixSDK', :git => 'https://github.com/matrix-org/matrix-ios-sdk.git', :branch => 'develop'
pod 'MatrixSDK/JingleCallStack', :git => 'https://github.com/matrix-org/matrix-ios-sdk.git', :branch => 'develop'
pod 'MatrixSDK/GoogleAnalytics', :git => 'https://github.com/matrix-org/matrix-ios-sdk.git', :branch => 'develop'
pod 'MatrixKit/AppExtension', :git => 'https://github.com/matrix-org/matrix-ios-kit.git', :branch => 'develop'
else
pod 'MatrixKit/AppExtension', $matrixKitVersion
pod 'MatrixSDK/JingleCallStack'
pod 'MatrixSDK/GoogleAnalytics'
end
end
end
Expand All @@ -62,12 +59,11 @@ end
abstract_target 'RiotPods' do

pod 'GBDeviceInfo', '~> 4.4.0'
pod 'GoogleAnalytics'

# OLMKit for crypto
pod 'OLMKit'
#pod 'OLMKit', :path => '../olm/OLMKit.podspec'
pod 'Realm', '~> 3.0.1'
# Piwik for analytics
# While https://github.com/matomo-org/matomo-sdk-ios/pull/223 is not released, use the PR branch
pod 'PiwikTracker', :git => 'https://github.com/manuroe/matomo-sdk-ios.git', :branch => 'feature/CustomVariables'
#pod 'PiwikTracker', '~> 4.4.2'

# Remove warnings from "bad" pods
pod 'OLMKit', :inhibit_warnings => true
Expand All @@ -89,3 +85,27 @@ abstract_target 'RiotPods' do

end


post_install do |installer|
installer.pods_project.targets.each do |target|

# Disable bitcode for each pod framework
# Because the WebRTC pod (included by the JingleCallStack pod) does not support it.
# Plus the app does not enable it
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
config.build_settings['SWIFT_VERSION'] = '4.0' # Required for PiwikTracker. Should be removed
end

# Set the right identity to build pods frameworks to be able to make release builds
# See https://github.com/CocoaPods/CocoaPods/issues/3156#issuecomment-102022787
if target.to_s.include? 'Pods'
target.build_configurations.each do |config|
if !config.to_s.include? 'Debug'
config.build_settings['CODE_SIGN_IDENTITY[sdk=iphoneos*]'] = 'iPhone Distribution'
end
end
end
end
end

Loading