Skip to content

Commit b3d5869

Browse files
committed
Convert to ARC
1 parent a3c4d38 commit b3d5869

File tree

9 files changed

+196
-19
lines changed

9 files changed

+196
-19
lines changed

SoundCloud-Cocoa-API.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22
s.name = 'SoundCloud-Cocoa-API'
33
s.summary = 'Make authenticated requests to the SoundCloud API.'
4-
s.version = '1.0.4'
4+
s.version = '1.0.5'
55
s.license = { :type => 'propietary', :text => 'https://developers.soundcloud.com/docs/api/terms-of-use' }
66
s.author = 'SoundCloud'
77
s.homepage = 'https://developers.soundcloud.com/docs/api/ios-quickstart'
@@ -16,5 +16,5 @@ Pod::Spec.new do |s|
1616
s.framework = 'Security'
1717
s.dependency 'NXOAuth2Client', '1.2.2'
1818

19-
s.requires_arc = false
19+
s.requires_arc = true
2020
end
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "0630"
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 = "94535F85123FAFDF00BD668A"
18+
BuildableName = "SoundCloudAPI.framework"
19+
BlueprintName = "SoundCloudAPI.framework"
20+
ReferencedContainer = "container:SoundCloudAPI.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
27+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
28+
shouldUseLaunchSchemeArgsEnv = "YES"
29+
buildConfiguration = "Debug">
30+
<Testables>
31+
</Testables>
32+
</TestAction>
33+
<LaunchAction
34+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
35+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
36+
launchStyle = "0"
37+
useCustomWorkingDirectory = "NO"
38+
buildConfiguration = "Debug"
39+
ignoresPersistentStateOnLaunch = "NO"
40+
debugDocumentVersioning = "YES"
41+
allowLocationSimulation = "YES">
42+
<MacroExpansion>
43+
<BuildableReference
44+
BuildableIdentifier = "primary"
45+
BlueprintIdentifier = "94535F85123FAFDF00BD668A"
46+
BuildableName = "SoundCloudAPI.framework"
47+
BlueprintName = "SoundCloudAPI.framework"
48+
ReferencedContainer = "container:SoundCloudAPI.xcodeproj">
49+
</BuildableReference>
50+
</MacroExpansion>
51+
<AdditionalOptions>
52+
</AdditionalOptions>
53+
</LaunchAction>
54+
<ProfileAction
55+
shouldUseLaunchSchemeArgsEnv = "YES"
56+
savedToolIdentifier = ""
57+
useCustomWorkingDirectory = "NO"
58+
buildConfiguration = "Release"
59+
debugDocumentVersioning = "YES">
60+
<MacroExpansion>
61+
<BuildableReference
62+
BuildableIdentifier = "primary"
63+
BlueprintIdentifier = "94535F85123FAFDF00BD668A"
64+
BuildableName = "SoundCloudAPI.framework"
65+
BlueprintName = "SoundCloudAPI.framework"
66+
ReferencedContainer = "container:SoundCloudAPI.xcodeproj">
67+
</BuildableReference>
68+
</MacroExpansion>
69+
</ProfileAction>
70+
<AnalyzeAction
71+
buildConfiguration = "Debug">
72+
</AnalyzeAction>
73+
<ArchiveAction
74+
buildConfiguration = "Release"
75+
revealArchiveInOrganizer = "YES">
76+
</ArchiveAction>
77+
</Scheme>
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "0630"
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 = "D2AAC07D0554694100DB518D"
18+
BuildableName = "libSoundCloudAPI.a"
19+
BlueprintName = "SoundCloudAPI"
20+
ReferencedContainer = "container:SoundCloudAPI.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
27+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
28+
shouldUseLaunchSchemeArgsEnv = "YES"
29+
buildConfiguration = "Debug">
30+
<Testables>
31+
</Testables>
32+
</TestAction>
33+
<LaunchAction
34+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
35+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
36+
launchStyle = "0"
37+
useCustomWorkingDirectory = "NO"
38+
buildConfiguration = "Debug"
39+
ignoresPersistentStateOnLaunch = "NO"
40+
debugDocumentVersioning = "YES"
41+
allowLocationSimulation = "YES">
42+
<MacroExpansion>
43+
<BuildableReference
44+
BuildableIdentifier = "primary"
45+
BlueprintIdentifier = "D2AAC07D0554694100DB518D"
46+
BuildableName = "libSoundCloudAPI.a"
47+
BlueprintName = "SoundCloudAPI"
48+
ReferencedContainer = "container:SoundCloudAPI.xcodeproj">
49+
</BuildableReference>
50+
</MacroExpansion>
51+
<AdditionalOptions>
52+
</AdditionalOptions>
53+
</LaunchAction>
54+
<ProfileAction
55+
shouldUseLaunchSchemeArgsEnv = "YES"
56+
savedToolIdentifier = ""
57+
useCustomWorkingDirectory = "NO"
58+
buildConfiguration = "Release"
59+
debugDocumentVersioning = "YES">
60+
<MacroExpansion>
61+
<BuildableReference
62+
BuildableIdentifier = "primary"
63+
BlueprintIdentifier = "D2AAC07D0554694100DB518D"
64+
BuildableName = "libSoundCloudAPI.a"
65+
BlueprintName = "SoundCloudAPI"
66+
ReferencedContainer = "container:SoundCloudAPI.xcodeproj">
67+
</BuildableReference>
68+
</MacroExpansion>
69+
</ProfileAction>
70+
<AnalyzeAction
71+
buildConfiguration = "Debug">
72+
</AnalyzeAction>
73+
<ArchiveAction
74+
buildConfiguration = "Release"
75+
revealArchiveInOrganizer = "YES">
76+
</ArchiveAction>
77+
</Scheme>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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>SchemeUserState</key>
6+
<dict>
7+
<key>SoundCloudAPI.framework.xcscheme</key>
8+
<dict>
9+
<key>orderHint</key>
10+
<integer>0</integer>
11+
</dict>
12+
<key>SoundCloudAPI.xcscheme</key>
13+
<dict>
14+
<key>orderHint</key>
15+
<integer>1</integer>
16+
</dict>
17+
</dict>
18+
<key>SuppressBuildableAutocreation</key>
19+
<dict>
20+
<key>94535F85123FAFDF00BD668A</key>
21+
<dict>
22+
<key>primary</key>
23+
<true/>
24+
</dict>
25+
<key>D2AAC07D0554694100DB518D</key>
26+
<dict>
27+
<key>primary</key>
28+
<true/>
29+
</dict>
30+
</dict>
31+
</dict>
32+
</plist>

Sources/SoundCloudAPI/SCAccount+Private.m

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ - (id)initWithOAuthAccount:(NXOAuth2Account *)anAccount;
4242
{
4343
self = [super init];
4444
if (self) {
45-
oauthAccount = [anAccount retain];
45+
oauthAccount = anAccount;
4646
}
4747
return self;
4848
}
@@ -54,8 +54,6 @@ - (NXOAuth2Account *)oauthAccount;
5454

5555
- (void)setOauthAccount:(NXOAuth2Account *)anOAuthAccount;
5656
{
57-
[anOAuthAccount retain];
58-
[oauthAccount release];
5957
oauthAccount = anOAuthAccount;
6058
}
6159

Sources/SoundCloudAPI/SCAccount.m

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@
3535

3636
@implementation SCAccount
3737

38-
- (void)dealloc;
39-
{
40-
[oauthAccount release];
41-
[super dealloc];
42-
}
43-
4438
#pragma mark Accessors
4539

4640
- (NSString *)identifier;

Sources/SoundCloudAPI/SCRequest.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ sendingProgressHandler:(SCRequestSendingProgressHandler)progressHandler
5959

6060
#pragma mark Accessors
6161

62-
@property (nonatomic, readwrite, retain) SCAccount *account;
62+
@property (nonatomic, readwrite) SCAccount *account;
6363

6464
@property (nonatomic, assign) SCRequestMethod requestMethod;
65-
@property (nonatomic, readwrite, retain) NSURL *resource;
66-
@property (nonatomic, readwrite, retain) NSDictionary *parameters;
65+
@property (nonatomic, readwrite) NSURL *resource;
66+
@property (nonatomic, readwrite) NSDictionary *parameters;
6767

6868

6969
#pragma mark Signed NSURLRequest

Sources/SoundCloudAPI/SCRequest.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#import "SCRequest.h"
3232

3333
@interface SCRequest ()
34-
@property (nonatomic, retain) NXOAuth2Request *oauthRequest;
34+
@property (nonatomic) NXOAuth2Request *oauthRequest;
3535
@end
3636

3737
@implementation SCRequest
@@ -91,7 +91,7 @@ + (id) performMethod:(SCRequestMethod)aMethod
9191
[nRequest setValue:connection forKey:@"connection"];
9292
[nRequest setValue:nRequest forKey:@"me"];
9393

94-
return [nRequest autorelease];
94+
return nRequest;
9595
}
9696

9797
+ (void)cancelRequest:(id)request;
@@ -152,7 +152,7 @@ - (id)initWithMethod:(SCRequestMethod)aMethod resource:(NSURL *)aResource;
152152
- (SCAccount *)account;
153153
{
154154
if (self.oauthRequest.account) {
155-
return [[[SCAccount alloc] initWithOAuthAccount:self.oauthRequest.account] autorelease];
155+
return [[SCAccount alloc] initWithOAuthAccount:self.oauthRequest.account];
156156
} else {
157157
return nil;
158158
}

Sources/SoundCloudAPI/SCSoundCloud.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ - (id)init;
8585
- (void)dealloc;
8686
{
8787
[[NSNotificationCenter defaultCenter] removeObserver:self];
88-
[super dealloc];
8988
}
9089

9190
#pragma mark Accessors
@@ -94,7 +93,7 @@ + (SCAccount *)account;
9493
{
9594
NSArray *oauthAccounts = [[NXOAuth2AccountStore sharedStore] accountsWithAccountType:kSCAccountType];
9695
if ([oauthAccounts count] > 0) {
97-
return [[[SCAccount alloc] initWithOAuthAccount:[oauthAccounts objectAtIndex:0]] autorelease];
96+
return [[SCAccount alloc] initWithOAuthAccount:[oauthAccounts objectAtIndex:0]];
9897
} else {
9998
return nil;
10099
}

0 commit comments

Comments
 (0)