v1.9.3
Added
- Support XCode 12.2
- Latest Swift 5.3 compile support
Install
pod 'WearnotchSDK', podspec => "https://wearnotch-media.s3.amazonaws.com/public/iOS-Releases/1.9.3.json"
Due to a mandatory static library you need to manually remove some frameworks from your top pod module.
Copy the following script at the end of your pod file and update your target name properly.
# Remove the static WearnotchSDK libraries from the app target in order to avoid duplicated static library copy
post_install do |installer|
installer.pods_project.targets.each do |target|
# Remove only from the main app target
# IMPORTANT: Insert target name here
if target.name == "Pods-{YOUR_APP_POD_TARGET_NAME_IN_THIS_FILE}"
puts "Updating #{target.name} OTHER_LDFLAGS"
target.build_configurations.each do |config|
xcconfig_path = config.base_configuration_reference.real_path
# read from xcconfig to build_settings dictionary
build_settings = Hash[*File.read(xcconfig_path).lines.map{|x| x.split(/\s*=\s*/, 2)}.flatten]
# modify OTHER_LDFLAGS
build_settings['OTHER_LDFLAGS']['-framework "JRE"'] = ""
build_settings['OTHER_LDFLAGS']['-framework "JSR305"'] = ""
build_settings['OTHER_LDFLAGS']['-framework "WearnotchSDK"'] = ""
# write build_settings dictionary to xcconfig
File.open(xcconfig_path, "w")
build_settings.each do |key,value|
File.open(xcconfig_path, "a") {|file| file.write("#{key} = #{value}")}
end
end
end
end
end