Skip to content

Commit 683c7ed

Browse files
committed
watchOS Demo, created a static watchos lib target, renamed static SDWebImage to "SDWebImage iOS static", added the webp files to all targets (as libwebp is compatible with all 4 platforms). Updated Travis CI
1 parent 442b134 commit 683c7ed

File tree

18 files changed

+1475
-16
lines changed

18 files changed

+1475
-16
lines changed

.travis.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,19 @@ script:
2727
- pod lib lint --allow-warnings
2828

2929
- echo Build as static library
30-
- xcodebuild clean build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage-static' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Debug | xcpretty -c
30+
- xcodebuild clean build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage iOS static' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Debug | xcpretty -c
31+
- xcodebuild clean build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage watchOS static' -sdk watchsimulator -configuration Debug | xcpretty -c
3132

3233
- echo Build as dynamic framework
3334
- xcodebuild clean build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage OSX' -sdk macosx -configuration Debug | xcpretty -c
3435
- xcodebuild clean build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage iOS' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Debug | xcpretty -c
3536
- xcodebuild clean build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage tvOS' -sdk appletvsimulator -configuration Debug | xcpretty -c
3637
- xcodebuild clean build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage watchOS' -sdk watchsimulator -configuration Debug | xcpretty -c
3738

38-
- echo Build the Demo app
39-
- xcodebuild clean build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage Demo' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Debug | xcpretty -c
39+
- echo Build the Demo apps
40+
- xcodebuild clean build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage iOS Demo' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Debug | xcpretty -c
41+
- xcodebuild clean build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage OSX Demo' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Debug | xcpretty -c
42+
- xcodebuild clean build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage Watch Demo' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Debug | xcpretty -c
4043

4144
- echo Run the tests
4245
- pod install --project-directory=Tests

Examples/SDWebImage Demo.xcodeproj/project.pbxproj

+398
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "0730"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "43A629ED1D0E07600089D7DD"
18+
BuildableName = "SDWebImage Watch Demo.app"
19+
BlueprintName = "SDWebImage Watch Demo"
20+
ReferencedContainer = "container:SDWebImage Demo.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
<BuildActionEntry
24+
buildForTesting = "YES"
25+
buildForRunning = "YES"
26+
buildForProfiling = "YES"
27+
buildForArchiving = "YES"
28+
buildForAnalyzing = "YES">
29+
<BuildableReference
30+
BuildableIdentifier = "primary"
31+
BlueprintIdentifier = "43A629F91D0E07600089D7DD"
32+
BuildableName = "SDWebImage Watch Demo Extension.appex"
33+
BlueprintName = "SDWebImage Watch Demo Extension"
34+
ReferencedContainer = "container:SDWebImage Demo.xcodeproj">
35+
</BuildableReference>
36+
</BuildActionEntry>
37+
<BuildActionEntry
38+
buildForTesting = "YES"
39+
buildForRunning = "YES"
40+
buildForProfiling = "YES"
41+
buildForArchiving = "YES"
42+
buildForAnalyzing = "YES">
43+
<BuildableReference
44+
BuildableIdentifier = "primary"
45+
BlueprintIdentifier = "53761294155AB74D005750A4"
46+
BuildableName = "SDWebImage iOS Demo.app"
47+
BlueprintName = "SDWebImage iOS Demo"
48+
ReferencedContainer = "container:SDWebImage Demo.xcodeproj">
49+
</BuildableReference>
50+
</BuildActionEntry>
51+
</BuildActionEntries>
52+
</BuildAction>
53+
<TestAction
54+
buildConfiguration = "Debug"
55+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
56+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
57+
shouldUseLaunchSchemeArgsEnv = "YES">
58+
<Testables>
59+
</Testables>
60+
<MacroExpansion>
61+
<BuildableReference
62+
BuildableIdentifier = "primary"
63+
BlueprintIdentifier = "43A629ED1D0E07600089D7DD"
64+
BuildableName = "SDWebImage Watch Demo.app"
65+
BlueprintName = "SDWebImage Watch Demo"
66+
ReferencedContainer = "container:SDWebImage Demo.xcodeproj">
67+
</BuildableReference>
68+
</MacroExpansion>
69+
<AdditionalOptions>
70+
</AdditionalOptions>
71+
</TestAction>
72+
<LaunchAction
73+
buildConfiguration = "Debug"
74+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
75+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
76+
launchStyle = "0"
77+
useCustomWorkingDirectory = "NO"
78+
ignoresPersistentStateOnLaunch = "NO"
79+
debugDocumentVersioning = "YES"
80+
debugServiceExtension = "internal"
81+
allowLocationSimulation = "YES">
82+
<RemoteRunnable
83+
runnableDebuggingMode = "2"
84+
BundleIdentifier = "com.apple.carousel"
85+
RemotePath = "/SDWebImage iOS Demo">
86+
<BuildableReference
87+
BuildableIdentifier = "primary"
88+
BlueprintIdentifier = "43A629ED1D0E07600089D7DD"
89+
BuildableName = "SDWebImage Watch Demo.app"
90+
BlueprintName = "SDWebImage Watch Demo"
91+
ReferencedContainer = "container:SDWebImage Demo.xcodeproj">
92+
</BuildableReference>
93+
</RemoteRunnable>
94+
<MacroExpansion>
95+
<BuildableReference
96+
BuildableIdentifier = "primary"
97+
BlueprintIdentifier = "43A629ED1D0E07600089D7DD"
98+
BuildableName = "SDWebImage Watch Demo.app"
99+
BlueprintName = "SDWebImage Watch Demo"
100+
ReferencedContainer = "container:SDWebImage Demo.xcodeproj">
101+
</BuildableReference>
102+
</MacroExpansion>
103+
<AdditionalOptions>
104+
</AdditionalOptions>
105+
</LaunchAction>
106+
<ProfileAction
107+
buildConfiguration = "Release"
108+
shouldUseLaunchSchemeArgsEnv = "YES"
109+
savedToolIdentifier = ""
110+
useCustomWorkingDirectory = "NO"
111+
debugDocumentVersioning = "YES">
112+
<RemoteRunnable
113+
runnableDebuggingMode = "2"
114+
BundleIdentifier = "com.apple.carousel"
115+
RemotePath = "/SDWebImage iOS Demo">
116+
<BuildableReference
117+
BuildableIdentifier = "primary"
118+
BlueprintIdentifier = "43A629ED1D0E07600089D7DD"
119+
BuildableName = "SDWebImage Watch Demo.app"
120+
BlueprintName = "SDWebImage Watch Demo"
121+
ReferencedContainer = "container:SDWebImage Demo.xcodeproj">
122+
</BuildableReference>
123+
</RemoteRunnable>
124+
<MacroExpansion>
125+
<BuildableReference
126+
BuildableIdentifier = "primary"
127+
BlueprintIdentifier = "43A629ED1D0E07600089D7DD"
128+
BuildableName = "SDWebImage Watch Demo.app"
129+
BlueprintName = "SDWebImage Watch Demo"
130+
ReferencedContainer = "container:SDWebImage Demo.xcodeproj">
131+
</BuildableReference>
132+
</MacroExpansion>
133+
</ProfileAction>
134+
<AnalyzeAction
135+
buildConfiguration = "Debug">
136+
</AnalyzeAction>
137+
<ArchiveAction
138+
buildConfiguration = "Release"
139+
revealArchiveInOrganizer = "YES">
140+
</ArchiveAction>
141+
</Scheme>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Did you know that git does not support storing empty directories?
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//
2+
// ExtensionDelegate.h
3+
// SDWebImage Watch Demo Extension
4+
//
5+
// Created by Bogdan on 13/06/16.
6+
// Copyright © 2016 Dailymotion. All rights reserved.
7+
//
8+
9+
#import <WatchKit/WatchKit.h>
10+
11+
@interface ExtensionDelegate : NSObject <WKExtensionDelegate>
12+
13+
@end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
//
2+
// ExtensionDelegate.m
3+
// SDWebImage Watch Demo Extension
4+
//
5+
// Created by Bogdan on 13/06/16.
6+
// Copyright © 2016 Dailymotion. All rights reserved.
7+
//
8+
9+
#import "ExtensionDelegate.h"
10+
11+
@implementation ExtensionDelegate
12+
13+
- (void)applicationDidFinishLaunching {
14+
// Perform any final initialization of your application.
15+
}
16+
17+
- (void)applicationDidBecomeActive {
18+
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
19+
}
20+
21+
- (void)applicationWillResignActive {
22+
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
23+
// Use this method to pause ongoing tasks, disable timers, etc.
24+
}
25+
26+
@end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>NSAppTransportSecurity</key>
6+
<dict>
7+
<key>NSAllowsArbitraryLoads</key>
8+
<true/>
9+
</dict>
10+
<key>CFBundleDevelopmentRegion</key>
11+
<string>en</string>
12+
<key>CFBundleDisplayName</key>
13+
<string>SDWebImage Watch Demo Extension</string>
14+
<key>CFBundleExecutable</key>
15+
<string>$(EXECUTABLE_NAME)</string>
16+
<key>CFBundleIdentifier</key>
17+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
18+
<key>CFBundleInfoDictionaryVersion</key>
19+
<string>6.0</string>
20+
<key>CFBundleName</key>
21+
<string>$(PRODUCT_NAME)</string>
22+
<key>CFBundlePackageType</key>
23+
<string>XPC!</string>
24+
<key>CFBundleShortVersionString</key>
25+
<string>1.0</string>
26+
<key>CFBundleSignature</key>
27+
<string>????</string>
28+
<key>CFBundleVersion</key>
29+
<string>1</string>
30+
<key>NSExtension</key>
31+
<dict>
32+
<key>NSExtensionAttributes</key>
33+
<dict>
34+
<key>WKAppBundleIdentifier</key>
35+
<string>com.dailymotion.SDWebImage-iOS-Demo.watchkitapp</string>
36+
</dict>
37+
<key>NSExtensionPointIdentifier</key>
38+
<string>com.apple.watchkit</string>
39+
</dict>
40+
<key>WKExtensionDelegateClassName</key>
41+
<string>ExtensionDelegate</string>
42+
</dict>
43+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//
2+
// InterfaceController.h
3+
// SDWebImage Watch Demo Extension
4+
//
5+
// Created by Bogdan on 13/06/16.
6+
// Copyright © 2016 Dailymotion. All rights reserved.
7+
//
8+
9+
#import <WatchKit/WatchKit.h>
10+
#import <Foundation/Foundation.h>
11+
12+
@interface InterfaceController : WKInterfaceController
13+
14+
@end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
//
2+
// InterfaceController.m
3+
// SDWebImage Watch Demo Extension
4+
//
5+
// Created by Bogdan on 13/06/16.
6+
// Copyright © 2016 Dailymotion. All rights reserved.
7+
//
8+
9+
#import "InterfaceController.h"
10+
#import <SDWebImage/SDWebImageManager.h>
11+
12+
13+
@interface InterfaceController()
14+
15+
@property (weak) IBOutlet WKInterfaceImage *imageInterface;
16+
17+
@end
18+
19+
20+
@implementation InterfaceController
21+
22+
- (void)awakeWithContext:(id)context {
23+
[super awakeWithContext:context];
24+
25+
// Configure interface objects here.
26+
}
27+
28+
- (void)willActivate {
29+
// This method is called when watch view controller is about to be visible to user
30+
[super willActivate];
31+
32+
NSString *urlString = @"http://s3.amazonaws.com/fast-image-cache/demo-images/FICDDemoImage000.jpg";
33+
[[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:urlString] options:0 progress:nil completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) {
34+
self.imageInterface.image = image;
35+
}];
36+
}
37+
38+
- (void)didDeactivate {
39+
// This method is called when watch view controller is no longer visible
40+
[super didDeactivate];
41+
}
42+
43+
@end
44+
45+
46+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//
2+
// NotificationController.h
3+
// SDWebImage Watch Demo Extension
4+
//
5+
// Created by Bogdan on 13/06/16.
6+
// Copyright © 2016 Dailymotion. All rights reserved.
7+
//
8+
9+
#import <WatchKit/WatchKit.h>
10+
#import <Foundation/Foundation.h>
11+
12+
@interface NotificationController : WKUserNotificationInterfaceController
13+
14+
@end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
//
2+
// NotificationController.m
3+
// SDWebImage Watch Demo Extension
4+
//
5+
// Created by Bogdan on 13/06/16.
6+
// Copyright © 2016 Dailymotion. All rights reserved.
7+
//
8+
9+
#import "NotificationController.h"
10+
11+
12+
@interface NotificationController()
13+
14+
@end
15+
16+
17+
@implementation NotificationController
18+
19+
- (instancetype)init {
20+
self = [super init];
21+
if (self){
22+
// Initialize variables here.
23+
// Configure interface objects here.
24+
25+
}
26+
return self;
27+
}
28+
29+
- (void)willActivate {
30+
// This method is called when watch view controller is about to be visible to user
31+
[super willActivate];
32+
}
33+
34+
- (void)didDeactivate {
35+
// This method is called when watch view controller is no longer visible
36+
[super didDeactivate];
37+
}
38+
39+
/*
40+
- (void)didReceiveLocalNotification:(UILocalNotification *)localNotification withCompletion:(void (^)(WKUserNotificationInterfaceType))completionHandler {
41+
// This method is called when a local notification needs to be presented.
42+
// Implement it if you use a dynamic notification interface.
43+
// Populate your dynamic notification interface as quickly as possible.
44+
//
45+
// After populating your dynamic notification interface call the completion block.
46+
completionHandler(WKUserNotificationInterfaceTypeCustom);
47+
}
48+
*/
49+
50+
/*
51+
- (void)didReceiveRemoteNotification:(NSDictionary *)remoteNotification withCompletion:(void (^)(WKUserNotificationInterfaceType))completionHandler {
52+
// This method is called when a remote notification needs to be presented.
53+
// Implement it if you use a dynamic notification interface.
54+
// Populate your dynamic notification interface as quickly as possible.
55+
//
56+
// After populating your dynamic notification interface call the completion block.
57+
completionHandler(WKUserNotificationInterfaceTypeCustom);
58+
}
59+
*/
60+
61+
@end
62+
63+
64+

0 commit comments

Comments
 (0)