From a86d42ec652688efcf28b0294a7dcfdaf4d753c2 Mon Sep 17 00:00:00 2001 From: Danmei Chen Date: Wed, 13 Mar 2019 16:54:27 +0100 Subject: [PATCH] enable pod install with loacl sdk --- Podfile | 25 +++++++++++++++---------- README.md | 9 ++++----- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/Podfile b/Podfile index 3d2799a19..0ee94ca65 100644 --- a/Podfile +++ b/Podfile @@ -3,6 +3,19 @@ platform :ios, '9.0' source "https://gitlab.linphone.org/BC/public/podspec.git" source "https://github.com/CocoaPods/Specs.git" +def basic_pods + if ENV['PODFILE_PATH'].nil? + pod 'linphone-sdk', '~> 4.1-221-g241bbf9' + else + pod 'linphone-sdk', :path => ENV['PODFILE_PATH'] # loacl sdk + end + + pod 'Firebase/Core' + pod 'Fabric', '~> 1.9.0' + pod 'Crashlytics', '~> 3.12.0' + pod 'Firebase/Performance' +end + target 'latestCallsWidget' do # Uncomment the next line if you're using Swift or would like to use dynamic frameworks use_frameworks! @@ -24,11 +37,7 @@ target 'liblinphoneTester' do use_frameworks! # Pods for liblinphoneTester - pod 'linphone-sdk', '~> 4.1-221-g241bbf9' - pod 'Firebase/Core' - pod 'Fabric', '~> 1.9.0' - pod 'Crashlytics', '~> 3.12.0' - pod 'Firebase/Performance' + basic_pods target 'liblinphoneTesterTests' do inherit! :search_paths @@ -42,11 +51,7 @@ target 'linphone' do use_frameworks! # Pods for linphone - pod 'linphone-sdk', '~> 4.1-221-g241bbf9' - pod 'Firebase/Core' - pod 'Fabric', '~> 1.9.0' - pod 'Crashlytics', '~> 3.12.0' - pod 'Firebase/Performance' + basic_pods target 'linphoneTests' do inherit! :search_paths diff --git a/README.md b/README.md index 27347f659..b5e1a7bbc 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ Build the linphone-iphone : - pod install It will download the linphone library from our gitlab repository so you don't have to build anything yourelf. -Then open linphone.xcworkspace file (instead of linphone.xcodeproj) to install the app. +Then open linphone.xcworkspace (instead of linphone.xcodeproj) to install the app. # Testing the application @@ -83,11 +83,10 @@ See: https://developer.apple.com/library/archive/documentation/DeveloperTools/Co -Follow the instructions in the linphone-sdk/README file to build the SDK. --Edit in the Podfile, change the way to pod linphone-sdk. - * For example, replace "pod 'linphone-sdk', '~> 4.1-221-g241bbf9'" by "pod 'linphone-sdk', :path => """. - -Rebuild the project: - * pod install + * env ENV[PODFILE_PATH]= pod install + +-Then open linphone.xcworkspace (instead of linphone.xcodeproj) to install the app. # Quick UI reference