File tree 5 files changed +61
-3
lines changed
5 files changed +61
-3
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,17 @@ extension ApiCall {
32
32
}
33
33
34
34
request. addValue ( type. rawValue, forHTTPHeaderField: " Content-Type " )
35
+ request. addValue ( userAgent, forHTTPHeaderField: " User-Agent " )
36
+
35
37
return request
36
38
}
39
+
40
+ private var userAgent : String {
41
+ let codeVersion = Bundle . compassSDK? . object ( forInfoDictionaryKey: " CFBundleShortVersionString " ) as? String ?? " unknown "
42
+ let deviceType = UIDevice . current. userInterfaceIdiom == . pad ? " tablet " : " mobile "
43
+
44
+ return " Marfeel-iOS-SDK/ \( codeVersion) ( \( UIDevice . current. model) ) \( deviceType) "
45
+ }
37
46
}
38
47
39
48
protocol ApiRouting : AnyObject {
Original file line number Diff line number Diff line change @@ -18,4 +18,8 @@ extension Bundle {
18
18
19
19
var pageTechnology : Int ? { object ( forInfoDictionaryKey: " COMPASS_PAGE_TYPE " ) as? Int }
20
20
21
+ static var compassSDK : Bundle ? {
22
+ return Bundle ( for: CompassTracker . self)
23
+ }
24
+
21
25
}
Original file line number Diff line number Diff line change 15
15
<key >CFBundlePackageType </key >
16
16
<string >$(PRODUCT_BUNDLE_PACKAGE_TYPE) </string >
17
17
<key >CFBundleShortVersionString </key >
18
- <string >$(MARKETING_VERSION) </string >
18
+ <string >2.13.0 </string >
19
19
<key >CFBundleVersion </key >
20
20
<string >$(CURRENT_PROJECT_VERSION) </string >
21
21
</dict >
Original file line number Diff line number Diff line change @@ -16,10 +16,11 @@ Pod::Spec.new do |spec|
16
16
#
17
17
18
18
spec . name = "MarfeelSDK-iOS"
19
- spec . version = "2.12.1 "
19
+ spec . version = "2.13.0 "
20
20
spec . summary = "iOS version of MarfeelSDK."
21
21
22
- # This description is used to generate tags and improve search results.
22
+
23
+ # This description is used to generate tags and improve searc h results.
23
24
# * Think: What does it do? Why did you write it? What is the focus?
24
25
# * Try to keep it short, snappy and to the point.
25
26
# * Write the description between the DESC delimiters below.
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Check if version argument is provided
4
+ if [ -z " $1 " ]; then
5
+ echo " Usage: ./bump_version.sh <new_version>"
6
+ exit 1
7
+ fi
8
+
9
+ NEW_VERSION=" $1 "
10
+
11
+ # Define paths for podspec and Info.plist
12
+ PODSPEC_FILE=" MarfeelSDK-iOS.podspec"
13
+ PLIST_PATH=" CompassSDK/Info.plist"
14
+
15
+ # Check if the podspec file exists
16
+ if [ ! -f " $PODSPEC_FILE " ]; then
17
+ echo " Podspec file not found at $PODSPEC_FILE "
18
+ exit 1
19
+ fi
20
+
21
+ # Check if the Info.plist file exists
22
+ if [ ! -f " $PLIST_PATH " ]; then
23
+ echo " Info.plist file not found at $PLIST_PATH "
24
+ exit 1
25
+ fi
26
+
27
+ # Update the version in the .podspec file
28
+ echo " Updating podspec version..."
29
+ sed -i ' ' " s/spec.version = \" .*\" /spec.version = \" $NEW_VERSION \" /" " $PODSPEC_FILE "
30
+
31
+ # Update the version in the Info.plist file
32
+ echo " Updating Info.plist version..."
33
+ plutil -replace CFBundleShortVersionString -string " $NEW_VERSION " " $PLIST_PATH "
34
+
35
+ # Check if the changes were successful
36
+ if [ $? -eq 0 ]; then
37
+ echo " Version updated successfully in both podspec and Info.plist"
38
+ else
39
+ echo " Failed to update version in podspec or Info.plist"
40
+ exit 1
41
+ fi
42
+
43
+
44
+ echo " Version bump complete"
You can’t perform that action at this time.
0 commit comments