Skip to content

Commit aacfb43

Browse files
authored
Merge pull request #23 from willowtreeapps/develop
Merge Develop into Master V1.0.1
2 parents 15663a4 + 5070cb8 commit aacfb43

File tree

81 files changed

+641
-158
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+641
-158
lines changed

Core/HyperionCore.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
// THE SOFTWARE.
2020
//
2121

22+
#import <Foundation/Foundation.h>
23+
2224
//! Project version number for HyperionCore.
2325
FOUNDATION_EXPORT double HyperionCoreVersionNumber;
2426

@@ -36,7 +38,6 @@ FOUNDATION_EXPORT const unsigned char HyperionCoreVersionString[];
3638
#import "HYPPluginMenuItem.h"
3739
#import "HYPSnapshotPluginModule.h"
3840
#import "HYPPluginHelper.h"
39-
4041
#import "HyperionManager.h"
4142
#import "HYPActivationGestureOptions.h"
4243

Core/Public/HyperionManager.m

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,14 @@ -(void)setActivationGesture:(HYPActivationGestureOptions)gesture {
202202
if ([pluginClass conformsToProtocol:@protocol(HYPPlugin)])
203203
{
204204
id <HYPPluginModule> module = [pluginClass createPluginModule:pluginExtension];
205-
[mutablePluginModules addObject:module];
205+
if (module)
206+
{
207+
[mutablePluginModules addObject:module];
208+
}
209+
else
210+
{
211+
NSLog(@"%@ createPluginModule returned a nil plugin module", NSStringFromClass(pluginClass));
212+
}
206213
}
207214
else
208215
{

Core/Resources/linkButton.png

1.28 KB
Loading

Core/Resources/linkButton@2x.png

1.85 KB
Loading

Core/SnapShotDebuggingWindow/PluginListViewController.m

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,63 @@ -(void)loadTabs
109109
{
110110
[self.pluginList addArrangedSubview:view];
111111
}
112+
113+
if (self.containerViews.count == 0) {
114+
[self addEmptyState];
115+
}
116+
}
117+
118+
- (void)addEmptyState
119+
{
120+
UIView *emptyStateView = [[UIView alloc] init];
121+
122+
UILabel *noPluginsLabel = [[UILabel alloc] init];
123+
124+
noPluginsLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightRegular];
125+
noPluginsLabel.textColor = [UIColor colorWithRed:142.0/255.0 green:142.0/255.0 blue:147.0/255.0 alpha:1.0];
126+
noPluginsLabel.lineBreakMode = NSLineBreakByWordWrapping;
127+
noPluginsLabel.numberOfLines = 0;
128+
noPluginsLabel.text = NSLocalizedString(@"Oops! You don't have any plugins yet.", nil);
129+
[emptyStateView addSubview:noPluginsLabel];
130+
131+
UILabel *linkLabel = [[UILabel alloc] init];
132+
[linkLabel addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(linkTap:)]];
133+
linkLabel.userInteractionEnabled = true;
134+
135+
linkLabel.textColor = [UIColor colorWithRed:43.0/255.0 green:87.0/255.0 blue:244.0/255.0 alpha:1.0];
136+
linkLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightSemibold];
137+
linkLabel.lineBreakMode = NSLineBreakByWordWrapping;
138+
linkLabel.numberOfLines = 0;
139+
NSMutableAttributedString *linkString = [[NSMutableAttributedString alloc]
140+
initWithString:NSLocalizedString(@"Follow this guide to add plugins ", nil)];
141+
NSTextAttachment *attachment = [[NSTextAttachment alloc] init];
142+
attachment.image = [UIImage imageWithContentsOfFile:[[NSBundle bundleForClass:[self class]] pathForResource:@"linkButton" ofType:@"png"]];
143+
144+
[linkString appendAttributedString:[NSAttributedString attributedStringWithAttachment:attachment]];
145+
linkLabel.attributedText = linkString;
146+
[emptyStateView addSubview:linkLabel];
147+
148+
emptyStateView.translatesAutoresizingMaskIntoConstraints = false;
149+
noPluginsLabel.translatesAutoresizingMaskIntoConstraints = false;
150+
linkLabel.translatesAutoresizingMaskIntoConstraints = false;
151+
152+
[noPluginsLabel.topAnchor constraintEqualToAnchor:emptyStateView.topAnchor].active = true;
153+
[noPluginsLabel.centerXAnchor constraintEqualToAnchor:emptyStateView.centerXAnchor].active = true;
154+
[noPluginsLabel.widthAnchor constraintEqualToConstant:147].active = true;
155+
[noPluginsLabel.heightAnchor constraintEqualToConstant:70].active = true;
156+
[noPluginsLabel.bottomAnchor constraintEqualToAnchor:linkLabel.topAnchor constant:-30].active = true;
157+
158+
[linkLabel.widthAnchor constraintEqualToConstant:141.3].active = true;
159+
[linkLabel.centerXAnchor constraintEqualToAnchor:emptyStateView.centerXAnchor].active = true;
160+
161+
[emptyStateView.heightAnchor constraintEqualToConstant:150].active = true;
162+
163+
[self.pluginList addArrangedSubview:emptyStateView];
164+
}
165+
166+
- (void)linkTap:(UITapGestureRecognizer *)recognizer
167+
{
168+
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://github.com/willowtreeapps/Hyperion-iOS/blob/master/README.md?utm_source=hyperion-core&utm_medium=referral&utm_campaign=introducing-hyperion#installation"]];
112169
}
113170

114171
-(void)setPluginModules:(NSArray<id<HYPPluginModule>> *)pluginModules

Example/HyperioniOS.xcodeproj/xcshareddata/xcschemes/HyperioniOS-Example.xcscheme

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,7 @@
7373
ReferencedContainer = "container:HyperioniOS.xcodeproj">
7474
</BuildableReference>
7575
</BuildableProductRunnable>
76-
<EnvironmentVariables>
77-
<EnvironmentVariable
78-
key = "MallocStackLogging"
79-
value = "1"
80-
isEnabled = "YES">
81-
</EnvironmentVariable>
82-
</EnvironmentVariables>
8376
<AdditionalOptions>
84-
<AdditionalOption
85-
key = "MallocStackLogging"
86-
value = ""
87-
isEnabled = "YES">
88-
</AdditionalOption>
8977
</AdditionalOptions>
9078
</LaunchAction>
9179
<ProfileAction

Example/HyperioniOS/Images.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,111 @@
11
{
22
"images" : [
33
{
4-
"idiom" : "iphone",
54
"size" : "20x20",
5+
"idiom" : "iphone",
6+
"filename" : "Icon-Spotlight-41.png",
67
"scale" : "2x"
78
},
89
{
9-
"idiom" : "iphone",
1010
"size" : "20x20",
11+
"idiom" : "iphone",
12+
"filename" : "iPhoneApp60x60.png",
1113
"scale" : "3x"
1214
},
1315
{
14-
"idiom" : "iphone",
1516
"size" : "29x29",
17+
"idiom" : "iphone",
18+
"filename" : "Icon-Small@2x.png",
1619
"scale" : "2x"
1720
},
1821
{
19-
"idiom" : "iphone",
2022
"size" : "29x29",
23+
"idiom" : "iphone",
24+
"filename" : "Icon-Small@3x.png",
2125
"scale" : "3x"
2226
},
2327
{
24-
"idiom" : "iphone",
2528
"size" : "40x40",
29+
"idiom" : "iphone",
30+
"filename" : "Icon-Spotlight-40@2x.png",
2631
"scale" : "2x"
2732
},
2833
{
29-
"idiom" : "iphone",
3034
"size" : "40x40",
35+
"idiom" : "iphone",
36+
"filename" : "Icon-Spotlight-40@3x.png",
3137
"scale" : "3x"
3238
},
3339
{
3440
"size" : "60x60",
3541
"idiom" : "iphone",
36-
"filename" : "iPhoneApp120X120.png",
42+
"filename" : "Icon-60@2x.png",
3743
"scale" : "2x"
3844
},
3945
{
4046
"size" : "60x60",
4147
"idiom" : "iphone",
42-
"filename" : "iPhoneApp180X180.png",
48+
"filename" : "Icon-60@3x.png",
4349
"scale" : "3x"
4450
},
4551
{
46-
"idiom" : "ipad",
4752
"size" : "20x20",
53+
"idiom" : "ipad",
54+
"filename" : "ipad20pt.png",
4855
"scale" : "1x"
4956
},
5057
{
51-
"idiom" : "ipad",
5258
"size" : "20x20",
59+
"idiom" : "ipad",
60+
"filename" : "Icon-Spotlight-42.png",
5361
"scale" : "2x"
5462
},
5563
{
56-
"idiom" : "ipad",
5764
"size" : "29x29",
65+
"idiom" : "ipad",
66+
"filename" : "Icon-Small.png",
5867
"scale" : "1x"
5968
},
6069
{
61-
"idiom" : "ipad",
6270
"size" : "29x29",
71+
"idiom" : "ipad",
72+
"filename" : "Icon-Small@2x-1.png",
6373
"scale" : "2x"
6474
},
6575
{
66-
"idiom" : "ipad",
6776
"size" : "40x40",
77+
"idiom" : "ipad",
78+
"filename" : "Icon-Spotlight-40.png",
6879
"scale" : "1x"
6980
},
7081
{
71-
"idiom" : "ipad",
7282
"size" : "40x40",
83+
"idiom" : "ipad",
84+
"filename" : "Icon-Spotlight-40@2x-1.png",
7385
"scale" : "2x"
7486
},
7587
{
76-
"idiom" : "ipad",
7788
"size" : "76x76",
89+
"idiom" : "ipad",
90+
"filename" : "Icon-76.png",
7891
"scale" : "1x"
7992
},
8093
{
81-
"idiom" : "ipad",
8294
"size" : "76x76",
95+
"idiom" : "ipad",
96+
"filename" : "Icon-76@2x.png",
8397
"scale" : "2x"
8498
},
8599
{
86-
"idiom" : "ipad",
87100
"size" : "83.5x83.5",
101+
"idiom" : "ipad",
102+
"filename" : "Icon-iPadPro@2x.png",
88103
"scale" : "2x"
89104
},
90105
{
91-
"idiom" : "ios-marketing",
92106
"size" : "1024x1024",
107+
"idiom" : "ios-marketing",
108+
"filename" : "iTunesArtWork1X512X512.png",
93109
"scale" : "1x"
94110
}
95111
],
2.79 KB
Loading
4.3 KB
Loading
1.74 KB
Loading

0 commit comments

Comments
 (0)