Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/nullability and recommended settings #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions MulticastDelegatorFramework.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
07AADA35211FC22E003B2B11 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0940;
LastUpgradeCheck = 1130;
ORGANIZATIONNAME = merrygobyebye;
TargetAttributes = {
07AADA3D211FC22E003B2B11 = {
Expand All @@ -172,6 +172,7 @@
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 07AADA34211FC22E003B2B11;
productRefGroup = 07AADA3F211FC22E003B2B11 /* Products */;
Expand Down Expand Up @@ -340,6 +341,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 11.4;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand Down Expand Up @@ -410,7 +412,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "MulticastDelegatorFrameworkTests/MulticastDelegatorFrameworkTests-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -430,7 +432,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.merrygobyebye.MulticastDelegatorFrameworkTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "MulticastDelegatorFrameworkTests/MulticastDelegatorFrameworkTests-Bridging-Header.h";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1010"
LastUpgradeVersion = "1130"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -27,6 +27,15 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "07AADA3D211FC22E003B2B11"
BuildableName = "MulticastDelegatorFramework.framework"
BlueprintName = "MulticastDelegatorFramework"
ReferencedContainer = "container:MulticastDelegatorFramework.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -39,17 +48,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "07AADA3D211FC22E003B2B11"
BuildableName = "MulticastDelegatorFramework.framework"
BlueprintName = "MulticastDelegatorFramework"
ReferencedContainer = "container:MulticastDelegatorFramework.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -70,8 +68,6 @@
ReferencedContainer = "container:MulticastDelegatorFramework.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
6 changes: 5 additions & 1 deletion MulticastDelegatorFramework/MulticastDelegator.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

@import Foundation;

NS_ASSUME_NONNULL_BEGIN

/*!
@brief An object that holds a collection (set) of weak references to objects.

Expand Down Expand Up @@ -52,6 +54,8 @@

@param invocation A block that takes in a non-null ObjectType to pass information from the MulticastDelegator to the ObjectType.
*/
- (void)invokeDelegates:(void (^ __nonnull)(__nonnull ObjectType))invocation;
- (void)invokeDelegates:(void (^)(ObjectType))invocation;

@end

NS_ASSUME_NONNULL_END
2 changes: 1 addition & 1 deletion MulticastDelegatorFramework/MulticastDelegator.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ - (void)removeDelegate:(id)delegate
[self._delegates removeObject:delegate];
}

- (void)invokeDelegates:(void (^ __nonnull)(__nonnull id))invocation
- (void)invokeDelegates:(void (^)(id))invocation
{
for (id delegate in self.delegates)
{
Expand Down