Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Commit

Permalink
fix: iOS - Fix a crash when action not registered is triggered (#1387)
Browse files Browse the repository at this point in the history
* fix: iOS - Fix a crash when action not registered is triggered

* project changes
  • Loading branch information
dantes-git authored Feb 24, 2021
1 parent a9766ba commit a051669
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 32 deletions.
4 changes: 0 additions & 4 deletions iOS/Sources/Beagle/Beagle.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
3D3400DB25D56A440079CD6F /* IfSome.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D3400DA25D56A440079CD6F /* IfSome.swift */; };
3D526B5D25CA14140027AB03 /* PopView-1.json in Resources */ = {isa = PBXBuildFile; fileRef = 3D526B5C25CA14140027AB03 /* PopView-1.json */; };
3D526B6825CA14C30027AB03 /* ActionAttributesTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DB1BF8C25B1E9B1008248C6 /* ActionAttributesTest.swift */; };
3D6D9A5B25C8C3B9004FF423 /* AssertNever.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D6D9A5A25C8C3B9004FF423 /* AssertNever.swift */; };
3D8209AB25E3F48300DCAA0E /* SetContext-1.json in Resources */ = {isa = PBXBuildFile; fileRef = 3D8209AA25E3F48300DCAA0E /* SetContext-1.json */; };
3D8E5C7E2542341C002B92E2 /* HttpAditionalData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D8E5C7D2542341C002B92E2 /* HttpAditionalData.swift */; };
3D9B27D325C9D4C900144CF5 /* DecodeActionAnalyticsConfigTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DB1BF8125B0FC53008248C6 /* DecodeActionAnalyticsConfigTests.swift */; };
Expand Down Expand Up @@ -379,7 +378,6 @@
3D3400DA25D56A440079CD6F /* IfSome.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IfSome.swift; sourceTree = "<group>"; };
3D526B5C25CA14140027AB03 /* PopView-1.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "PopView-1.json"; sourceTree = "<group>"; };
3D526B7625CA179D0027AB03 /* __Snapshots__ */ = {isa = PBXFileReference; lastKnownFileType = folder; path = __Snapshots__; sourceTree = "<group>"; };
3D6D9A5A25C8C3B9004FF423 /* AssertNever.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AssertNever.swift; sourceTree = "<group>"; };
3D8209AA25E3F48300DCAA0E /* SetContext-1.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "SetContext-1.json"; sourceTree = "<group>"; };
3D8E5C7D2542341C002B92E2 /* HttpAditionalData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HttpAditionalData.swift; sourceTree = "<group>"; };
3DAEFAEE25D1E91B002B0109 /* ScreenRecordFactoryTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScreenRecordFactoryTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2087,7 +2085,6 @@
E5A6F4A72358A53B008906F8 /* Util */ = {
isa = PBXGroup;
children = (
3D6D9A5A25C8C3B9004FF423 /* AssertNever.swift */,
E5A6F4A82358A547008906F8 /* FatalErrorUtil.swift */,
931B6E31237610B300DE73FD /* FunctiontalUtils.swift */,
3D3400DA25D56A440079CD6F /* IfSome.swift */,
Expand Down Expand Up @@ -2396,7 +2393,6 @@
931B6E302375BA7400DE73FD /* Theme.swift in Sources */,
9398CA3825531E9D0003A010 /* SendRequest.swift in Sources */,
93B9744F23A2833600B0D1CF /* NetworkClient.swift in Sources */,
3D6D9A5B25C8C3B9004FF423 /* AssertNever.swift in Sources */,
3DB1BF7C25B0F544008248C6 /* ActionAnalyticsConfig.swift in Sources */,
A05C74D62497F524009DBB66 /* Navigate+Extensions.swift in Sources */,
A05C74D02497F2BF009DBB66 /* FormLocalAction+Extensions.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct ActionRecordFactory {
let globalConfig: AnalyticsConfig.AttributesByActionName

func makeRecord() -> AnalyticsRecord? {
guard let name = getActionName() else { return assertNeverGetsHere(or: nil) }
guard let name = getActionName() else { return nil }
guard let values = enabledValuesForAction(named: name) else { return nil }

let attributes = info.action.getAttributes(values.attributes, contextProvider: info.origin)
Expand Down
27 changes: 0 additions & 27 deletions iOS/Sources/Beagle/Sources/Common/Util/AssertNever.swift

This file was deleted.

0 comments on commit a051669

Please sign in to comment.