Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/inappmessaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ jobs:
- name: Build Swift
run: ./scripts/test.sh
env:
SCHEME: InAppMessagingExampleSwift
SCHEME: InAppMessagingExample
16 changes: 8 additions & 8 deletions inappmessaging/InAppMessagingExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

/* Begin PBXFileReference section */
81A2FB070295F56CC0B2D523 /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
8DB25F8B20BE0C29000ABEE2 /* InAppMessagingExampleSwift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = InAppMessagingExampleSwift.app; sourceTree = BUILT_PRODUCTS_DIR; };
8DB25F8B20BE0C29000ABEE2 /* InAppMessagingExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = InAppMessagingExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
8DB25F8E20BE0C29000ABEE2 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
8DB25F9020BE0C29000ABEE2 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
8DB25F9320BE0C29000ABEE2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
Expand Down Expand Up @@ -54,7 +54,7 @@
8DB25F8C20BE0C29000ABEE2 /* Products */ = {
isa = PBXGroup;
children = (
8DB25F8B20BE0C29000ABEE2 /* InAppMessagingExampleSwift.app */,
8DB25F8B20BE0C29000ABEE2 /* InAppMessagingExample.app */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -82,9 +82,9 @@
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
8DB25F8A20BE0C29000ABEE2 /* InAppMessagingExampleSwift */ = {
8DB25F8A20BE0C29000ABEE2 /* InAppMessagingExample */ = {
isa = PBXNativeTarget;
buildConfigurationList = 8DB25F9D20BE0C2A000ABEE2 /* Build configuration list for PBXNativeTarget "InAppMessagingExampleSwift" */;
buildConfigurationList = 8DB25F9D20BE0C2A000ABEE2 /* Build configuration list for PBXNativeTarget "InAppMessagingExample" */;
buildPhases = (
8DB25F8720BE0C29000ABEE2 /* Sources */,
8DB25F8820BE0C29000ABEE2 /* Frameworks */,
Expand All @@ -94,9 +94,9 @@
);
dependencies = (
);
name = InAppMessagingExampleSwift;
name = InAppMessagingExample;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

Changing the target name to InAppMessagingExample also changes the product's module name. The Main.storyboard file, however, still has a hardcoded reference to the old module name, InAppMessagingExampleSwift, for the ViewController's customModule attribute. This will cause a runtime crash when the app tries to load the view controller from the storyboard because the old module will not be found.

To fix this, you need to update inappmessaging/InAppMessagingExampleSwift/Base.lproj/Main.storyboard and change customModule="InAppMessagingExampleSwift" to customModule="InAppMessagingExample".

productName = InAppMessagingExampleSwift;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with the updated target name, the productName property should also be changed from InAppMessagingExampleSwift to InAppMessagingExample. Although this property is likely overridden by the PRODUCT_NAME build setting, keeping the project file internally consistent improves maintainability and avoids potential confusion.

productName = InAppMessagingExample;

productReference = 8DB25F8B20BE0C29000ABEE2 /* InAppMessagingExampleSwift.app */;
productReference = 8DB25F8B20BE0C29000ABEE2 /* InAppMessagingExample.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
Expand Down Expand Up @@ -132,7 +132,7 @@
projectDirPath = "";
projectRoot = "";
targets = (
8DB25F8A20BE0C29000ABEE2 /* InAppMessagingExampleSwift */,
8DB25F8A20BE0C29000ABEE2 /* InAppMessagingExample */,
);
};
/* End PBXProject section */
Expand Down Expand Up @@ -347,7 +347,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
8DB25F9D20BE0C2A000ABEE2 /* Build configuration list for PBXNativeTarget "InAppMessagingExampleSwift" */ = {
8DB25F9D20BE0C2A000ABEE2 /* Build configuration list for PBXNativeTarget "InAppMessagingExample" */ = {
isa = XCConfigurationList;
buildConfigurations = (
8DB25F9E20BE0C2A000ABEE2 /* Debug */,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1630"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8DB25F8A20BE0C29000ABEE2"
BuildableName = "InAppMessagingExample.app"
BlueprintName = "InAppMessagingExample"
ReferencedContainer = "container:InAppMessagingExample.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8DB25F8A20BE0C29000ABEE2"
BuildableName = "InAppMessagingExample.app"
BlueprintName = "InAppMessagingExample"
ReferencedContainer = "container:InAppMessagingExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8DB25F8A20BE0C29000ABEE2"
BuildableName = "InAppMessagingExample.app"
BlueprintName = "InAppMessagingExample"
ReferencedContainer = "container:InAppMessagingExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>