Skip to content

Commit b3af92d

Browse files
authored
Add Universal Build Script (#432)
* Add Universal Build Script • Now that we are generating universal static & dynamic frameworks for iOS, it is good to combine the logic for generating a framework into a single build script • In the past, it was a bit confusing. We had a runscript on our Static Lib target that was actually producing a universal static framework and copying it to our repo under the /iOS_SDK/Framework folder. • The motivation for this change is that beyond just having dynamic/static flavors of our framework now, we will also be splitting up our SDK into two separate frameworks (one for the Extension service, and one for the main iOS SDK) so instead of having multiple build scripts with a lot of duplicated logic, we just use a single shell script with build settings arguments • This change does multiple things: 1. We now have two aggregate targets. Aggregate targets don't directly generate an output like a normal Xcode target does. Instead, they run a script and that script produces output using xcodebuild CLI 2. Each aggregate target uses custom Build Settings to determine if it produces a static or dynamic framework, where the framework should be copied to in the repo directory, what the name of the framework should be, and what source target is used. * Fix Preprocessor Macro • Previous commit made some changes to build configurations which ended up removing a preprocessor definition from UnitTests build settings. • This preprocessor definition (OS_TEST) is used to change the timing of some HTTP reattempt logic
1 parent 40e068a commit b3af92d

File tree

5 files changed

+274
-160
lines changed

5 files changed

+274
-160
lines changed

iOS_SDK/OneSignalDevApp/OneSignalDevApp.xcodeproj/project.pbxproj

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,19 @@
66
objectVersion = 46;
77
objects = {
88

9+
/* Begin PBXAggregateTarget section */
10+
CA29515B2167F2500064227A /* OneSignal-Static-Framework */ = {
11+
isa = PBXAggregateTarget;
12+
buildConfigurationList = CA29515E2167F2500064227A /* Build configuration list for PBXAggregateTarget "OneSignal-Static-Framework" */;
13+
buildPhases = (
14+
);
15+
dependencies = (
16+
);
17+
name = "OneSignal-Static-Framework";
18+
productName = "OneSignal-Static-Framework";
19+
};
20+
/* End PBXAggregateTarget section */
21+
922
/* Begin PBXBuildFile section */
1023
03432CDC1EBD426A0071FC48 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 03432CDB1EBD426A0071FC48 /* CoreLocation.framework */; };
1124
4529DECC1FA7EAB800CEAB1D /* UserNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 91B6EA051E83215000B5CF01 /* UserNotifications.framework */; };
@@ -286,6 +299,11 @@
286299
};
287300
};
288301
};
302+
CA29515B2167F2500064227A = {
303+
CreatedOnToolsVersion = 10.0;
304+
DevelopmentTeam = 4ZR3G6ZK9T;
305+
ProvisioningStyle = Automatic;
306+
};
289307
};
290308
};
291309
buildConfigurationList = 9112E87D1E724C320022A1CB /* Build configuration list for PBXProject "OneSignalDevApp" */;
@@ -303,6 +321,7 @@
303321
targets = (
304322
9112E8811E724C320022A1CB /* OneSignalDevApp */,
305323
9150E7711E73BEDC00C5D46A /* OneSignalNotificationServiceExtension */,
324+
CA29515B2167F2500064227A /* OneSignal-Static-Framework */,
306325
);
307326
};
308327
/* End PBXProject section */
@@ -544,6 +563,24 @@
544563
};
545564
name = Release;
546565
};
566+
CA29515C2167F2500064227A /* Debug */ = {
567+
isa = XCBuildConfiguration;
568+
buildSettings = {
569+
CODE_SIGN_STYLE = Automatic;
570+
DEVELOPMENT_TEAM = 4ZR3G6ZK9T;
571+
PRODUCT_NAME = "$(TARGET_NAME)";
572+
};
573+
name = Debug;
574+
};
575+
CA29515D2167F2500064227A /* Release */ = {
576+
isa = XCBuildConfiguration;
577+
buildSettings = {
578+
CODE_SIGN_STYLE = Automatic;
579+
DEVELOPMENT_TEAM = 4ZR3G6ZK9T;
580+
PRODUCT_NAME = "$(TARGET_NAME)";
581+
};
582+
name = Release;
583+
};
547584
/* End XCBuildConfiguration section */
548585

549586
/* Begin XCConfigurationList section */
@@ -574,6 +611,15 @@
574611
defaultConfigurationIsVisible = 0;
575612
defaultConfigurationName = Release;
576613
};
614+
CA29515E2167F2500064227A /* Build configuration list for PBXAggregateTarget "OneSignal-Static-Framework" */ = {
615+
isa = XCConfigurationList;
616+
buildConfigurations = (
617+
CA29515C2167F2500064227A /* Debug */,
618+
CA29515D2167F2500064227A /* Release */,
619+
);
620+
defaultConfigurationIsVisible = 0;
621+
defaultConfigurationName = Release;
622+
};
577623
/* End XCConfigurationList section */
578624
};
579625
rootObject = 9112E87A1E724C320022A1CB /* Project object */;

0 commit comments

Comments
 (0)