Commit 3df923be by Shailesh Aher

[IOS-127]: Xcode setup related to the Tercept SDK completed

parent 53f078c0
// Copyright (c) 2021, Tercept (https://www.tercept.com/)
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef PublicHeader_h
#define PublicHeader_h
#import <TerceptSDK/TerceptSDK.h>
#import <TerceptSDK/TerceptSDK-Bridging-Header.h>
#endif /* PublicHeader_h */
# Tercept SDK for iOS
This static iOS library is used for collecting the Performance Data Platform for Digital Publishers
## Requirements
- iOS 9.0+
- Xcode 12+
- Swift 5.3+
## Installation
### CocoaPods
[CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate Tercept SDK into your Xcode project using CocoaPods, specify it in your `Podfile`:
```ruby
pod 'TerceptSDK'
```
## License
Tercept SDK is released under the BSD 2-Clause "Simplified" License. [See LICENSE](https://github.com/Tercept-Inc/Tercept-SDK-iOS/blob/main/LICENSE) for details.
// Copyright (c) 2021, Tercept (https://www.tercept.com/)
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#import <Foundation/Foundation.h>
//! Project version number for TerceptSDK.
FOUNDATION_EXPORT double TerceptSDKVersionNumber;
//! Project version string for TerceptSDK.
FOUNDATION_EXPORT const unsigned char TerceptSDKVersionString[];
// In this header, you should import all the public headers of your framework using statements like
// #import <TerceptSDK/PublicHeader.h>
# Copyright (c) 2021, Tercept (https://www.tercept.com/)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Pod::Spec.new do |spec|
spec.name = 'TerceptSDK'
spec.version = '1.0.22'
spec.author = { 'Gourav Chindlur' => 'hello@tercept.com' }
spec.license = { :type => 'BSD', :file => 'LICENSE' }
spec.homepage = 'http://tercept.com'
spec.summary = 'Tercept SDK for analytics'
spec.description = 'This static iOS library is used for collecting the Performance Data Platform for Digital Publishers'
spec.source = { :git => 'https://github.com/Tercept-Inc/Tercept-SDK-iOS.git', :tag => spec.version.to_s }
spec.platform = :ios, "9.0"
spec.ios.deployment_target = "9.0"
spec.vendored_libraries = 'libTerceptSDK.a'
spec.xcconfig = {
'OTHER_LDFLAGS' => '-ObjC -lTerceptSDK' ,
'LIBRARY_SEARCH_PATHS' => "$(SRCROOT)/Pods/**" ,
'HEADER_SEARCH_PATH' => "$(SRCROOT)/Pods/**",
'IMPORT_PATHS' => "$(SRCROOT)/Pods/**"
}
spec.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' ,
'EXCLUDED_ARCHS[sdk=watchsimulator*]' => 'arm64' }
spec.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' ,
'EXCLUDED_ARCHS[sdk=watchsimulator*]' => 'arm64' }
end
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)
// swift-module-flags: -target armv7-apple-ios9.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name TerceptSDK
import Foundation
import SafariServices
import Swift
import UIKit
import WebKit
public protocol Callable {
associatedtype R
func call() -> Self.R
}
public protocol TaskRunner_Callback {
associatedtype R
func onComplete(result: Self.R)
}
@objc public class TerceptOptimization : ObjectiveC.NSObject {
public static let sdkVersion: Swift.String
public static var isDebugMode: Swift.Bool
public init(_ networkCode: Swift.String)
public func initParams(_ IDFA: Swift.String, _ IDFV: Swift.String, _ params: [Swift.String : Any]?)
public func initParams(_ IDFA: Swift.String, _ IDFV: Swift.String)
public func fetch(_ adunits: [Swift.String]?)
public func logEvent(_ adunit: Swift.String?, _ event: Swift.String?) -> Swift.Bool
public func logEvent(_ adunit: Swift.String?, _ event: Swift.String?, _ customParams: [Swift.String : Any]) -> Swift.Bool
public func getEventsData() -> [Swift.String : Any]?
public func sendEventsData()
public func setCustomParameters(_ params: [Swift.String : Swift.String])
public func getCustomTargetingKeys(_ adunit: Swift.String?) -> Swift.Dictionary<Swift.String, Swift.String?>
@objc override dynamic public init()
@objc deinit
}
extension UIDevice {
public static let modelName: Swift.String
}
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)
// swift-module-flags: -target arm64-apple-ios9.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name TerceptSDK
import Foundation
import SafariServices
import Swift
import UIKit
import WebKit
public protocol Callable {
associatedtype R
func call() -> Self.R
}
public protocol TaskRunner_Callback {
associatedtype R
func onComplete(result: Self.R)
}
@objc public class TerceptOptimization : ObjectiveC.NSObject {
public static let sdkVersion: Swift.String
public static var isDebugMode: Swift.Bool
public init(_ networkCode: Swift.String)
public func initParams(_ IDFA: Swift.String, _ IDFV: Swift.String, _ params: [Swift.String : Any]?)
public func initParams(_ IDFA: Swift.String, _ IDFV: Swift.String)
public func fetch(_ adunits: [Swift.String]?)
public func logEvent(_ adunit: Swift.String?, _ event: Swift.String?) -> Swift.Bool
public func logEvent(_ adunit: Swift.String?, _ event: Swift.String?, _ customParams: [Swift.String : Any]) -> Swift.Bool
public func getEventsData() -> [Swift.String : Any]?
public func sendEventsData()
public func setCustomParameters(_ params: [Swift.String : Swift.String])
public func getCustomTargetingKeys(_ adunit: Swift.String?) -> Swift.Dictionary<Swift.String, Swift.String?>
@objc override dynamic public init()
@objc deinit
}
extension UIDevice {
public static let modelName: Swift.String
}
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)
// swift-module-flags: -target arm64-apple-ios9.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name TerceptSDK
import Foundation
import SafariServices
import Swift
import UIKit
import WebKit
public protocol Callable {
associatedtype R
func call() -> Self.R
}
public protocol TaskRunner_Callback {
associatedtype R
func onComplete(result: Self.R)
}
@objc public class TerceptOptimization : ObjectiveC.NSObject {
public static let sdkVersion: Swift.String
public static var isDebugMode: Swift.Bool
public init(_ networkCode: Swift.String)
public func initParams(_ IDFA: Swift.String, _ IDFV: Swift.String, _ params: [Swift.String : Any]?)
public func initParams(_ IDFA: Swift.String, _ IDFV: Swift.String)
public func fetch(_ adunits: [Swift.String]?)
public func logEvent(_ adunit: Swift.String?, _ event: Swift.String?) -> Swift.Bool
public func logEvent(_ adunit: Swift.String?, _ event: Swift.String?, _ customParams: [Swift.String : Any]) -> Swift.Bool
public func getEventsData() -> [Swift.String : Any]?
public func sendEventsData()
public func setCustomParameters(_ params: [Swift.String : Swift.String])
public func getCustomTargetingKeys(_ adunit: Swift.String?) -> Swift.Dictionary<Swift.String, Swift.String?>
@objc override dynamic public init()
@objc deinit
}
extension UIDevice {
public static let modelName: Swift.String
}
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)
// swift-module-flags: -target armv7-apple-ios9.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name TerceptSDK
import Foundation
import SafariServices
import Swift
import UIKit
import WebKit
public protocol Callable {
associatedtype R
func call() -> Self.R
}
public protocol TaskRunner_Callback {
associatedtype R
func onComplete(result: Self.R)
}
@objc public class TerceptOptimization : ObjectiveC.NSObject {
public static let sdkVersion: Swift.String
public static var isDebugMode: Swift.Bool
public init(_ networkCode: Swift.String)
public func initParams(_ IDFA: Swift.String, _ IDFV: Swift.String, _ params: [Swift.String : Any]?)
public func initParams(_ IDFA: Swift.String, _ IDFV: Swift.String)
public func fetch(_ adunits: [Swift.String]?)
public func logEvent(_ adunit: Swift.String?, _ event: Swift.String?) -> Swift.Bool
public func logEvent(_ adunit: Swift.String?, _ event: Swift.String?, _ customParams: [Swift.String : Any]) -> Swift.Bool
public func getEventsData() -> [Swift.String : Any]?
public func sendEventsData()
public func setCustomParameters(_ params: [Swift.String : Swift.String])
public func getCustomTargetingKeys(_ adunit: Swift.String?) -> Swift.Dictionary<Swift.String, Swift.String?>
@objc override dynamic public init()
@objc deinit
}
extension UIDevice {
public static let modelName: Swift.String
}
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)
// swift-module-flags: -target armv7-apple-ios9.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name TerceptSDK
import Foundation
import SafariServices
import Swift
import UIKit
import WebKit
public protocol Callable {
associatedtype R
func call() -> Self.R
}
public protocol TaskRunner_Callback {
associatedtype R
func onComplete(result: Self.R)
}
@objc public class TerceptOptimization : ObjectiveC.NSObject {
public static let sdkVersion: Swift.String
public static var isDebugMode: Swift.Bool
public init(_ networkCode: Swift.String)
public func initParams(_ IDFA: Swift.String, _ IDFV: Swift.String, _ params: [Swift.String : Any]?)
public func initParams(_ IDFA: Swift.String, _ IDFV: Swift.String)
public func fetch(_ adunits: [Swift.String]?)
public func logEvent(_ adunit: Swift.String?, _ event: Swift.String?) -> Swift.Bool
public func logEvent(_ adunit: Swift.String?, _ event: Swift.String?, _ customParams: [Swift.String : Any]) -> Swift.Bool
public func getEventsData() -> [Swift.String : Any]?
public func sendEventsData()
public func setCustomParameters(_ params: [Swift.String : Swift.String])
public func getCustomTargetingKeys(_ adunit: Swift.String?) -> Swift.Dictionary<Swift.String, Swift.String?>
@objc override dynamic public init()
@objc deinit
}
extension UIDevice {
public static let modelName: Swift.String
}
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)
// swift-module-flags: -target i386-apple-ios9.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name TerceptSDK
import Foundation
import SafariServices
import Swift
import UIKit
import WebKit
public protocol Callable {
associatedtype R
func call() -> Self.R
}
public protocol TaskRunner_Callback {
associatedtype R
func onComplete(result: Self.R)
}
@objc public class TerceptOptimization : ObjectiveC.NSObject {
public static let sdkVersion: Swift.String
public static var isDebugMode: Swift.Bool
public init(_ networkCode: Swift.String)
public func initParams(_ IDFA: Swift.String, _ IDFV: Swift.String, _ params: [Swift.String : Any]?)
public func initParams(_ IDFA: Swift.String, _ IDFV: Swift.String)
public func fetch(_ adunits: [Swift.String]?)
public func logEvent(_ adunit: Swift.String?, _ event: Swift.String?) -> Swift.Bool
public func logEvent(_ adunit: Swift.String?, _ event: Swift.String?, _ customParams: [Swift.String : Any]) -> Swift.Bool
public func getEventsData() -> [Swift.String : Any]?
public func sendEventsData()
public func setCustomParameters(_ params: [Swift.String : Swift.String])
public func getCustomTargetingKeys(_ adunit: Swift.String?) -> Swift.Dictionary<Swift.String, Swift.String?>
@objc override dynamic public init()
@objc deinit
}
extension UIDevice {
public static let modelName: Swift.String
}
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)
// swift-module-flags: -target i386-apple-ios9.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name TerceptSDK
import Foundation
import SafariServices
import Swift
import UIKit
import WebKit
public protocol Callable {
associatedtype R
func call() -> Self.R
}
public protocol TaskRunner_Callback {
associatedtype R
func onComplete(result: Self.R)
}
@objc public class TerceptOptimization : ObjectiveC.NSObject {
public static let sdkVersion: Swift.String
public static var isDebugMode: Swift.Bool
public init(_ networkCode: Swift.String)
public func initParams(_ IDFA: Swift.String, _ IDFV: Swift.String, _ params: [Swift.String : Any]?)
public func initParams(_ IDFA: Swift.String, _ IDFV: Swift.String)
public func fetch(_ adunits: [Swift.String]?)
public func logEvent(_ adunit: Swift.String?, _ event: Swift.String?) -> Swift.Bool
public func logEvent(_ adunit: Swift.String?, _ event: Swift.String?, _ customParams: [Swift.String : Any]) -> Swift.Bool
public func getEventsData() -> [Swift.String : Any]?
public func sendEventsData()
public func setCustomParameters(_ params: [Swift.String : Swift.String])
public func getCustomTargetingKeys(_ adunit: Swift.String?) -> Swift.Dictionary<Swift.String, Swift.String?>
@objc override dynamic public init()
@objc deinit
}
extension UIDevice {
public static let modelName: Swift.String
}
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)
// swift-module-flags: -target x86_64-apple-ios9.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name TerceptSDK
import Foundation
import SafariServices
import Swift
import UIKit
import WebKit
public protocol Callable {
associatedtype R
func call() -> Self.R
}
public protocol TaskRunner_Callback {
associatedtype R
func onComplete(result: Self.R)
}
@objc public class TerceptOptimization : ObjectiveC.NSObject {
public static let sdkVersion: Swift.String
public static var isDebugMode: Swift.Bool
public init(_ networkCode: Swift.String)
public func initParams(_ IDFA: Swift.String, _ IDFV: Swift.String, _ params: [Swift.String : Any]?)
public func initParams(_ IDFA: Swift.String, _ IDFV: Swift.String)
public func fetch(_ adunits: [Swift.String]?)
public func logEvent(_ adunit: Swift.String?, _ event: Swift.String?) -> Swift.Bool
public func logEvent(_ adunit: Swift.String?, _ event: Swift.String?, _ customParams: [Swift.String : Any]) -> Swift.Bool
public func getEventsData() -> [Swift.String : Any]?
public func sendEventsData()
public func setCustomParameters(_ params: [Swift.String : Swift.String])
public func getCustomTargetingKeys(_ adunit: Swift.String?) -> Swift.Dictionary<Swift.String, Swift.String?>
@objc override dynamic public init()
@objc deinit
}
extension UIDevice {
public static let modelName: Swift.String
}
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)
// swift-module-flags: -target x86_64-apple-ios9.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name TerceptSDK
import Foundation
import SafariServices
import Swift
import UIKit
import WebKit
public protocol Callable {
associatedtype R
func call() -> Self.R
}
public protocol TaskRunner_Callback {
associatedtype R
func onComplete(result: Self.R)
}
@objc public class TerceptOptimization : ObjectiveC.NSObject {
public static let sdkVersion: Swift.String
public static var isDebugMode: Swift.Bool
public init(_ networkCode: Swift.String)
public func initParams(_ IDFA: Swift.String, _ IDFV: Swift.String, _ params: [Swift.String : Any]?)
public func initParams(_ IDFA: Swift.String, _ IDFV: Swift.String)
public func fetch(_ adunits: [Swift.String]?)
public func logEvent(_ adunit: Swift.String?, _ event: Swift.String?) -> Swift.Bool
public func logEvent(_ adunit: Swift.String?, _ event: Swift.String?, _ customParams: [Swift.String : Any]) -> Swift.Bool
public func getEventsData() -> [Swift.String : Any]?
public func sendEventsData()
public func setCustomParameters(_ params: [Swift.String : Swift.String])
public func getCustomTargetingKeys(_ adunit: Swift.String?) -> Swift.Dictionary<Swift.String, Swift.String?>
@objc override dynamic public init()
@objc deinit
}
extension UIDevice {
public static let modelName: Swift.String
}
${PODS_ROOT}/Target Support Files/Pods-OneWeatherCore/Pods-OneWeatherCore-resources.sh
${PODS_ROOT}/Swarm/Swarm/swarmAlertTypes.json
${PODS_ROOT}/Swarm/Swarm/swarmLayerGroups.json
\ No newline at end of file
${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/swarmAlertTypes.json
${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/swarmLayerGroups.json
\ No newline at end of file
${PODS_ROOT}/Target Support Files/Pods-OneWeatherCore/Pods-OneWeatherCore-resources.sh
${PODS_ROOT}/Swarm/Swarm/swarmAlertTypes.json
${PODS_ROOT}/Swarm/Swarm/swarmLayerGroups.json
\ No newline at end of file
${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/swarmAlertTypes.json
${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/swarmLayerGroups.json
\ No newline at end of file
#!/bin/sh
set -e
set -u
set -o pipefail
function on_error {
echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
}
trap 'on_error $LINENO' ERR
if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then
# If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy
# resources to, so exit 0 (signalling the script phase was successful).
exit 0
fi
mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
> "$RESOURCES_TO_COPY"
XCASSET_FILES=()
# This protects against multiple targets copying the same framework dependency at the same time. The solution
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
case "${TARGETED_DEVICE_FAMILY:-}" in
1,2)
TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
;;
1)
TARGET_DEVICE_ARGS="--target-device iphone"
;;
2)
TARGET_DEVICE_ARGS="--target-device ipad"
;;
3)
TARGET_DEVICE_ARGS="--target-device tv"
;;
4)
TARGET_DEVICE_ARGS="--target-device watch"
;;
*)
TARGET_DEVICE_ARGS="--target-device mac"
;;
esac
install_resource()
{
if [[ "$1" = /* ]] ; then
RESOURCE_PATH="$1"
else
RESOURCE_PATH="${PODS_ROOT}/$1"
fi
if [[ ! -e "$RESOURCE_PATH" ]] ; then
cat << EOM
error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script.
EOM
exit 1
fi
case $RESOURCE_PATH in
*.storyboard)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
;;
*.xib)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
;;
*.framework)
echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodel)
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom"
;;
*.xcdatamodeld)
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd"
;;
*.xcmappingmodel)
echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true
xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
;;
*.xcassets)
ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH"
XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
;;
*)
echo "$RESOURCE_PATH" || true
echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY"
;;
esac
}
if [[ "$CONFIGURATION" == "Debug" ]]; then
install_resource "${PODS_ROOT}/Swarm/Swarm/swarmAlertTypes.json"
install_resource "${PODS_ROOT}/Swarm/Swarm/swarmLayerGroups.json"
fi
if [[ "$CONFIGURATION" == "Release" ]]; then
install_resource "${PODS_ROOT}/Swarm/Swarm/swarmAlertTypes.json"
install_resource "${PODS_ROOT}/Swarm/Swarm/swarmLayerGroups.json"
fi
mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then
mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
fi
rm -f "$RESOURCES_TO_COPY"
if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ]
then
# Find all other xcassets (this unfortunately includes those of path pods and other targets).
OTHER_XCASSETS=$(find -L "$PWD" -iname "*.xcassets" -type d)
while read line; do
if [[ $line != "${PODS_ROOT}*" ]]; then
XCASSET_FILES+=("$line")
fi
done <<<"$OTHER_XCASSETS"
if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then
printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
else
printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist"
fi
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment