-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWebEngageAppEx.podspec
More file actions
76 lines (67 loc) · 3.55 KB
/
WebEngageAppEx.podspec
File metadata and controls
76 lines (67 loc) · 3.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
Pod::Spec.new do |spec|
spec.name = 'WebEngageAppEx'
spec.version = '1.3.2'
spec.summary = 'App Extension Target SDK for WebEngage for Rich Push Notifications support.'
spec.description = <<-DESC
This pod includes various subspecs which are intended for use in Application Extensions, and depends on APIs which are App Extension Safe. The Core subspecs provides APIs which lets you track Users and Events from within Application Extensions.
DESC
spec.license = 'MIT'
spec.author = 'Saumitra Bhave', 'Uzma Sayyed', 'Unmesh Rathod', 'Bhavesh Sarwar'
spec.homepage = 'https://webengage.com'
spec.social_media_url = 'http://twitter.com/webengage'
spec.documentation_url = 'https://docs.webengage.com/docs/ios-getting-started'
spec.source = { :git => 'https://github.com/WebEngage/WebEngageAppEx.git', :tag => spec.version.to_s }
spec.platform = :ios
spec.swift_version = '5.0'
spec.ios.deployment_target = '10.0'
spec.static_framework = true
spec.subspec 'CoreApi' do |api|
api.source_files = 'WebEngageAppEx/Classes/CoreApi/**/*.{h,m,swift}'
api.public_header_files = 'WebEngageAppEx/Classes/CoreApi/WebEngageAppEx.h','WebEngageAppEx/Classes/CoreApi/WEXAnalytics.h', 'WebEngageAppEx/Classes/CoreApi/WEXUser.h'
api.frameworks = 'Foundation'
end
spec.subspec 'NotificationService' do |ns|
ns.source_files = 'WebEngageAppEx/Classes/ServiceExtension/*.{h,m}'
ns.public_header_files = 'WebEngageAppEx/Classes/ServiceExtension/*.h'
ns.frameworks = 'Foundation'
ns.weak_frameworks = 'UserNotifications'
ns.resource_bundles = { 'NotificationService' => 'WebEngageAppEx/Classes/ServiceExtension/*.{xcprivacy}' }
end
spec.subspec 'ContentExtension' do |cs|
cs.source_files = 'WebEngageAppEx/Classes/ContentExtension/**/*.{h,m,swift,rb}'
cs.public_header_files = 'WebEngageAppEx/Classes/ContentExtension/WEXRichPushNotificationViewController.h','WebEngageAppEx/Classes/ContentExtension/WEXRichPushLayout.h','WebEngageAppEx/Classes/ContentExtension/WEXRichPushNotificationViewController+Private.h','WebEngageAppEx/Classes/ContentExtension/UIImage+animatedGIF.h'
cs.frameworks = 'Foundation'
cs.weak_frameworks = 'UserNotifications', 'UserNotificationsUI'
cs.dependency 'WebEngageAppEx/CoreApi'
cs.resource_bundles = { 'ContentExtension' => 'WebEngageAppEx/Classes/ContentExtension/*.{xcprivacy}' }
cs.script_phase = {
:name => 'Modify Build Setting',
:script => <<-SCRIPT,
project_path="Pods.xcodeproj"
target_name="WebEngageAppEx"
build_setting="SWIFT_INSTALL_OBJC_HEADER"
build_setting_value="NO"
ruby -r 'xcodeproj' -e "
project = Xcodeproj::Project.open('$project_path')
target = project.targets.find { |t| t.name == '$target_name' }
if target
target.build_configurations.each do |config|
puts config.build_settings['$build_setting']
current_setting = config.build_settings['$build_setting']
if current_setting && current_setting != 'YES'
puts 'Skip Modifying SWIFT_INSTALL_OBJC_HEADER'
else
config.build_settings['$build_setting'] = '$build_setting_value'
puts 'Modified SWIFT_INSTALL_OBJC_HEADER set to NO'
project.save
end
end
else
puts 'Target $target_name not found in the project.'
end
"
SCRIPT
:execution_position => :before_compile
}
end
end