Skip to content

Commit 289fc63

Browse files
authored
feat: create SDK utils library and add URLRequest extensions for setting RAS headers SDKCF-1521
1 parent b26fb88 commit 289fc63

18 files changed

+903
-0
lines changed

.gitignore

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# macos
2+
.DS_Store
3+
.LSOverride
4+
5+
# vim
6+
*.swp
7+
8+
# Xcode
9+
xcuserdata
10+
*.xccheckout
11+
*.xcworkspace
12+
*.playground
13+
build
14+
15+
# Cocoapods
16+
Pods
17+
18+
# Fastlane
19+
/artifacts
20+
/fastlane/report.xml
21+
/fastlane/README.md
22+
/fastlane/.env
23+
24+
# Jazzy-generated documentation
25+
docs/
26+
27+
# Use latest gem versions
28+
Gemfile.lock

Cakefile

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# https://github.com/jcampbell05/xcake
2+
# http://www.rubydoc.info/github/jcampbell05/xcake/master/file/docs/Cakefile.md
3+
4+
iOSdeploymentTarget = "10.0"
5+
currentSwiftVersion = "5.0"
6+
companyIdentifier = "com.rakuten.tech"
7+
project.name = "RSDKUtils"
8+
project.organization = "Rakuten, Inc."
9+
10+
project.all_configurations.each do |configuration|
11+
configuration.settings["CURRENT_PROJECT_VERSION"] = "1" # just default non-empty value
12+
configuration.settings["DEFINES_MODULE"] = "YES" # http://stackoverflow.com/a/27251979
13+
configuration.settings["SWIFT_OPTIMIZATION_LEVEL"] = "-Onone"
14+
configuration.settings["ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES"] = "$(inherited)" # "YES"
15+
configuration.settings["SWIFT_VERSION"] = currentSwiftVersion
16+
end
17+
18+
target do |target|
19+
20+
target.name = "SampleApp"
21+
target.language = :swift
22+
target.type = :application
23+
target.platform = :ios
24+
target.deployment_target = iOSdeploymentTarget
25+
target.scheme(target.name)
26+
27+
target.all_configurations.each do |configuration|
28+
configuration.product_bundle_identifier = companyIdentifier + "." + target.name
29+
configuration.supported_devices = :universal
30+
configuration.settings["INFOPLIST_FILE"] = "Sample/Info.plist"
31+
configuration.settings["PRODUCT_NAME"] = "$(TARGET_NAME)"
32+
end
33+
34+
unit_tests_for target do |test_target|
35+
36+
test_target.name = "Tests"
37+
test_target.scheme(test_target.name) do |scheme|
38+
scheme.test_configuration = "Tests"
39+
end
40+
41+
test_target.all_configurations.each do |configuration|
42+
configuration.settings["INFOPLIST_FILE"] = "Tests/" + test_target.name + "-Info.plist"
43+
end
44+
45+
test_target.include_files = ["Tests/**/*.swift"]
46+
47+
end
48+
49+
end

Podfile

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
source 'https://github.com/CocoaPods/Specs.git'
2+
3+
workspace 'RSDKUtils.xcworkspace'
4+
project 'RSDKUtils.xcodeproj'
5+
6+
platform :ios, '10.0'
7+
8+
use_frameworks!
9+
10+
target 'Tests' do
11+
pod 'Quick'
12+
pod 'Nimble'
13+
pod 'RSDKUtils', :path => './RSDKUtils.podspec'
14+
end
15+
16+
post_install do |installer|
17+
# Needed so 'internal' module classes can be tested
18+
installer.pods_project.targets.each do |target|
19+
target.build_configurations.each do |config|
20+
config.build_settings['ENABLE_TESTABILITY'] = 'YES'
21+
end
22+
end
23+
end
24+
25+
# vim:syntax=ruby:et:sts=2:sw=2:ts=2:ff=unix:

Podfile.lock

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
PODS:
2+
- Nimble (8.0.4)
3+
- Quick (2.2.0)
4+
- RSDKUtils (1.0.0)
5+
6+
DEPENDENCIES:
7+
- Nimble
8+
- Quick
9+
- RSDKUtils (from `./RSDKUtils.podspec`)
10+
11+
SPEC REPOS:
12+
https://github.com/cocoapods/specs.git:
13+
- Nimble
14+
- Quick
15+
16+
EXTERNAL SOURCES:
17+
RSDKUtils:
18+
:path: "./RSDKUtils.podspec"
19+
20+
SPEC CHECKSUMS:
21+
Nimble: 18d5360282923225d62b09d781f63abc1a0111fc
22+
Quick: 7fb19e13be07b5dfb3b90d4f9824c855a11af40e
23+
RSDKUtils: ed1d2488439d4026f21a23b1b8a53d26f6c70f85
24+
25+
PODFILE CHECKSUM: 28af16319bea95387b37864f519180b247d1d5fb
26+
27+
COCOAPODS: 1.7.5

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
## Rakuten's SDK Team internal utilities module

RSDKUtils.podspec

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Pod::Spec.new do |s|
2+
s.name = "RSDKUtils"
3+
s.version = "1.0.0"
4+
s.authors = "Rakuten Ecosystem Mobile"
5+
s.summary = "Rakuten's SDK Team internal utilities module."
6+
s.homepage = "https://github.com/rakutentech/ios-sdkutils"
7+
s.license = { :type => 'MIT', :file => 'LICENSE' }
8+
s.source = { :git => "https://github.com/rakutentech/ios-sdkutils", :tag => s.version.to_s }
9+
s.platform = :ios, '10.0'
10+
s.swift_version = '5.0'
11+
s.requires_arc = true
12+
s.pod_target_xcconfig = {
13+
'CLANG_ENABLE_MODULES' => 'YES',
14+
'CLANG_MODULES_AUTOLINK' => 'YES',
15+
'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',
16+
'GCC_C_LANGUAGE_STANDARD' => 'gnu11',
17+
'OTHER_CFLAGS' => "'-DRPT_SDK_VERSION=#{s.version.to_s}'"
18+
}
19+
s.user_target_xcconfig = {
20+
'CLANG_ENABLE_MODULES' => 'YES',
21+
'CLANG_MODULES_AUTOLINK' => 'YES',
22+
'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',
23+
}
24+
s.weak_frameworks = [
25+
'Foundation',
26+
]
27+
s.source_files = "RSDKUtils/**/*.{swift,m,h}"
28+
s.public_header_files = "RSDKUtils/*.h,RSDKUtils/StandardHeaders/*.h"
29+
s.module_map = 'RSDKUtils/RSDKUtils.modulemap'
30+
end
31+
# vim:syntax=ruby:et:sts=2:sw=2:ts=2:ff=unix:

0 commit comments

Comments
 (0)