Skip to content

Commit

Permalink
Merge pull request #2 from SDWebImage/feature_watch_tv
Browse files Browse the repository at this point in the history
Add support for tvOS && watchOS && Carthage dynamic framework
  • Loading branch information
dreampiggy authored Jan 29, 2019
2 parents 64f5569 + 1bd843b commit 89a94b6
Show file tree
Hide file tree
Showing 17 changed files with 476 additions and 39 deletions.
3 changes: 2 additions & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
github "SDWebImage/SDWebImage" >= 5.0.0-beta4
github "SDWebImage/SDWebImage" >= 5.0.0-beta4
github "SDWebImage/libbpg-Xcode" ~>0.9.8
1 change: 1 addition & 0 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
github "SDWebImage/SDWebImage" "5.0.0-beta4"
github "SDWebImage/libbpg-Xcode" "0.9.8"
4 changes: 2 additions & 2 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PODS:
- Expecta (1.0.6)
- SDWebImage/Core (5.0.0-beta4)
- SDWebImageBPGCoder (0.2.1):
- SDWebImageBPGCoder (0.2.2):
- SDWebImage/Core (>= 5.0.0-beta4)
- Specta (1.0.7)

Expand All @@ -23,7 +23,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5
SDWebImage: 56bfe1114b11f1d5766d6d0e3b3456cfd7e1e8b7
SDWebImageBPGCoder: 60038a4c7df995ee39a9cc4d61e7050984f8750d
SDWebImageBPGCoder: b479ed252aa19b2a3c5a38e274e078c6f3607e20
Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66

PODFILE CHECKSUM: 2175744386f7a924ca415e90b59e6cf33d634c7f
Expand Down
5 changes: 5 additions & 0 deletions Example/SDWebImageBPGCoder.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@
LastUpgradeCheck = 0940;
ORGANIZATIONNAME = dreampiggy;
TargetAttributes = {
6003F589195388D20070C39A = {
DevelopmentTeam = H7W77QXGX2;
};
6003F5AD195388D20070C39A = {
TestTargetID = 6003F589195388D20070C39A;
};
Expand Down Expand Up @@ -534,6 +537,7 @@
baseConfigurationReference = BEAE0F6B3B7BB49015E77988 /* Pods-SDWebImageBPGCoder_Example.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = H7W77QXGX2;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "SDWebImageBPGCoder/SDWebImageBPGCoder-Prefix.pch";
INFOPLIST_FILE = "SDWebImageBPGCoder/SDWebImageBPGCoder-Info.plist";
Expand All @@ -549,6 +553,7 @@
baseConfigurationReference = 23CC995E938AB20B65A269A6 /* Pods-SDWebImageBPGCoder_Example.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = H7W77QXGX2;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "SDWebImageBPGCoder/SDWebImageBPGCoder-Prefix.pch";
INFOPLIST_FILE = "SDWebImageBPGCoder/SDWebImageBPGCoder-Info.plist";
Expand Down
2 changes: 1 addition & 1 deletion Example/SDWebImageBPGCoder/SDViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ - (void)viewDidLoad

SDImageBPGCoder *BPGCoder = [SDImageBPGCoder sharedCoder];
[[SDImageCodersManager sharedManager] addCoder:BPGCoder];
NSURL *staticBPGURL = [NSURL URLWithString:@"https://uc8755e25430dc6bccf40320efe8.dl.dropboxusercontent.com/cd/0/get/AMJ3W0LvDVmwTkd48zje8bfP3tXPcT-P-y5Ni7CAuVJD3pcnEJLR-RLhasMY-Rk-bmGYB94nkQQN_HbTTpsRkSb6PcAV1eI-ZwkaEwgnunrAI6OpMTPGi-7lNOPtPaoQDlBI-6PPmpuC8W9x0uBz8qqTp-vk8-jTKp1FIXthk11CkhWefxdOn3z6QhZ_wafO0es/file?dl=1"];
NSURL *staticBPGURL = [NSURL URLWithString:@"https://bellard.org/bpg/003.bpg"];
NSURL *animatedBPGURL = [NSURL URLWithString:@"https://bellard.org/bpg/cinemagraph-6.bpg"];

CGSize screenSize = [UIScreen mainScreen].bounds.size;
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pod 'SDWebImageBPGCoder'

#### Carthage

SDWebImageBPGCoder is available through [Carthage](https://github.com/Carthage/Carthage).
SDWebImageBPGCoder is available through [Carthage](https://github.com/Carthage/Carthage). Which use libbpg as dynamic framework.

```
github "SDWebImage/SDWebImageBPGCoder"
Expand Down
4 changes: 4 additions & 0 deletions SDWebImageBPGCoder.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,15 @@ TODO: Add long description of the pod here.

s.ios.deployment_target = '8.0'
s.osx.deployment_target = '10.10'
s.tvos.deployment_target = '9.0'
s.watchos.deployment_target = '2.0'

s.source_files = 'SDWebImageBPGCoder/Classes/**/*', 'Vendor/libbpg/include/libbpg.h', 'SDWebImageBPGCoder/Module/SDWebImageBPGCoder.h'
s.module_map = 'SDWebImageBPGCoder/Module/SDWebImageBPGCoder.modulemap'
s.public_header_files = 'SDWebImageBPGCoder/Classes/**/*.h', 'SDWebImageBPGCoder/Module/SDWebImageBPGCoder.h'
s.osx.vendored_libraries = 'Vendor/libbpg/lib/mac/libbpg.a'
s.ios.vendored_libraries = 'Vendor/libbpg/lib/ios/libbpg.a'
s.tvos.vendored_libraries = 'Vendor/libbpg/lib/tvos/libbpg.a'
s.watchos.vendored_libraries = 'Vendor/libbpg/lib/watchos/libbpg.a'
s.dependency 'SDWebImage/Core', '>= 5.0.0-beta4'
end
326 changes: 293 additions & 33 deletions SDWebImageBPGCoder.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "329CC13E22006F96001FB68F"
BuildableName = "SDWebImageBPGCoder_tvOS.framework"
BlueprintName = "SDWebImageBPGCoder-tvOS"
ReferencedContainer = "container:SDWebImageBPGCoder.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "329CC13E22006F96001FB68F"
BuildableName = "SDWebImageBPGCoder_tvOS.framework"
BlueprintName = "SDWebImageBPGCoder-tvOS"
ReferencedContainer = "container:SDWebImageBPGCoder.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "329CC13E22006F96001FB68F"
BuildableName = "SDWebImageBPGCoder_tvOS.framework"
BlueprintName = "SDWebImageBPGCoder-tvOS"
ReferencedContainer = "container:SDWebImageBPGCoder.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "329CC14B22006FA0001FB68F"
BuildableName = "SDWebImageBPGCoder_watchOS.framework"
BlueprintName = "SDWebImageBPGCoder-watchOS"
ReferencedContainer = "container:SDWebImageBPGCoder.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "329CC14B22006FA0001FB68F"
BuildableName = "SDWebImageBPGCoder_watchOS.framework"
BlueprintName = "SDWebImageBPGCoder-watchOS"
ReferencedContainer = "container:SDWebImageBPGCoder.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "329CC14B22006FA0001FB68F"
BuildableName = "SDWebImageBPGCoder_watchOS.framework"
BlueprintName = "SDWebImageBPGCoder-watchOS"
ReferencedContainer = "container:SDWebImageBPGCoder.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
4 changes: 4 additions & 0 deletions SDWebImageBPGCoder/Classes/SDImageBPGCoder.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
//

#import "SDImageBPGCoder.h"
#if __has_include(<libbpg/libbpg.h>)
#import <libbpg/libbpg.h>
#else
#import "libbpg.h"
#endif

#define SD_FOUR_CC(c1,c2,c3,c4) ((uint32_t)(((c4) << 24) | ((c3) << 16) | ((c2) << 8) | (c1)))

Expand Down
2 changes: 1 addition & 1 deletion Vendor/libbpg/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.6
0.9.8
2 changes: 2 additions & 0 deletions Vendor/libbpg/include/libbpg.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#ifndef _LIBBPG_H
#define _LIBBPG_H

#include <inttypes.h>

typedef struct BPGDecoderContext BPGDecoderContext;

typedef enum {
Expand Down
Binary file modified Vendor/libbpg/lib/ios/libbpg.a
Binary file not shown.
Binary file modified Vendor/libbpg/lib/mac/libbpg.a
Binary file not shown.
Binary file added Vendor/libbpg/lib/tvos/libbpg.a
Binary file not shown.
Binary file added Vendor/libbpg/lib/watchos/libbpg.a
Binary file not shown.

0 comments on commit 89a94b6

Please sign in to comment.