Skip to content

Commit

Permalink
The IDE will now build a fake framework with the xcframework included…
Browse files Browse the repository at this point in the history
… as a resource. This will

make this distribution compatible with Carthage.
  • Loading branch information
balthisar committed Dec 24, 2019
1 parent ba6989f commit 9d89b44
Show file tree
Hide file tree
Showing 12 changed files with 435 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Config/RMStoreFramework-iOS.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

PRODUCT_NAME = RMStoreFramework
PRODUCT_BUNDLE_IDENTIFIER = com.balthisar.RMStore-iOS
INFOPLIST_FILE = RMStoreFramework/Info.plist
INFOPLIST_FILE = RMStoreFramework/RMStoreFramework-Info.plist
SUPPORTS_MACCATALYST = YES
DEFINES_MODULE = YES

Expand Down
2 changes: 1 addition & 1 deletion Config/RMStoreFramework-macOS.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

PRODUCT_NAME = RMStoreFramework
PRODUCT_BUNDLE_IDENTIFIER = com.balthisar.RMStore-macOS
INFOPLIST_FILE = RMStoreFramework/Info.plist
INFOPLIST_FILE = RMStoreFramework/RMStoreFramework-Info.plist
SDKROOT = macosx
DEFINES_MODULE = YES

Expand Down
2 changes: 1 addition & 1 deletion Config/RMStoreFramework-tvOS.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
PRODUCT_NAME = RMStoreFramework
SDKROOT = appletvos
PRODUCT_BUNDLE_IDENTIFIER = com.balthisar.RMStore-tvOS
INFOPLIST_FILE = RMStoreFramework/Info.plist
INFOPLIST_FILE = RMStoreFramework/RMStoreFramework-Info.plist
TARGETED_DEVICE_FAMILY = 3
DEFINES_MODULE = YES

Expand Down
114 changes: 112 additions & 2 deletions RMStore.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@
/* Begin PBXFileReference section */
15AD6C9D228BF84E00B68F53 /* RMStoreFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RMStoreFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; };
15AD6C9F228BF84E00B68F53 /* RMStoreFramework.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RMStoreFramework.h; sourceTree = "<group>"; };
15AD6CA0228BF84E00B68F53 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
15AD6CA0228BF84E00B68F53 /* RMStoreFramework-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "RMStoreFramework-Info.plist"; sourceTree = "<group>"; };
8700D1C017DCA548005C8F5D /* NSNotification+RMStoreTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSNotification+RMStoreTests.m"; sourceTree = "<group>"; };
876046471812FB7500C9B78C /* RMStoreKeychainPersistence.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RMStoreKeychainPersistence.h; sourceTree = "<group>"; };
876046481812FB7500C9B78C /* RMStoreKeychainPersistence.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RMStoreKeychainPersistence.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -307,6 +307,11 @@
D0576EE623A8044E0097012E /* RMStoreViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RMStoreViewController.xib; sourceTree = "<group>"; };
D0576EE723A8044E0097012E /* RMPurchasesViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RMPurchasesViewController.xib; sourceTree = "<group>"; };
D05ADFA7237AE2D00018CD6A /* Launch Screen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = "Launch Screen.storyboard"; sourceTree = "<group>"; };
D064399723A858BA0083EF25 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
D064399823A858C90083EF25 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
D064399E23A85E0E0083EF25 /* RMStore-ContainerFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = "RMStore-ContainerFramework.framework"; sourceTree = BUILT_PRODUCTS_DIR; };
D06439AD23A85EB70083EF25 /* RMStore_ContainerFramework-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "RMStore_ContainerFramework-Info.plist"; sourceTree = "<group>"; };
D06439AF23A85EC70083EF25 /* RMStore_ContainerFramework.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RMStore_ContainerFramework.h; sourceTree = "<group>"; };
D06825952373A31C00EAF052 /* libRMStore.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRMStore.a; sourceTree = BUILT_PRODUCTS_DIR; };
D0725F0023A322340072C528 /* PurchasesViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PurchasesViewController.h; sourceTree = "<group>"; };
D0725F0123A322340072C528 /* PurchasesViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PurchasesViewController.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -406,6 +411,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
D064399B23A85E0E0083EF25 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
D068258B2373A31C00EAF052 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -455,7 +467,9 @@
isa = PBXGroup;
children = (
15AD6C9F228BF84E00B68F53 /* RMStoreFramework.h */,
15AD6CA0228BF84E00B68F53 /* Info.plist */,
15AD6CA0228BF84E00B68F53 /* RMStoreFramework-Info.plist */,
D06439AF23A85EC70083EF25 /* RMStore_ContainerFramework.h */,
D06439AD23A85EB70083EF25 /* RMStore_ContainerFramework-Info.plist */,
);
path = RMStoreFramework;
sourceTree = "<group>";
Expand Down Expand Up @@ -553,6 +567,7 @@
D0EB86B3239E870900992915 /* RMStoreFramework.framework */,
D0188DD5239FC8CA002CC46B /* RMStoreTestsHost.app */,
D0188DFC23A01C28002CC46B /* RMStoreTestsMacOS.xctest */,
D064399E23A85E0E0083EF25 /* RMStore-ContainerFramework.framework */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -610,6 +625,7 @@
A0AF3D7617A8085900D2E836 /* RMStoreDemo-iOS */ = {
isa = PBXGroup;
children = (
D064399823A858C90083EF25 /* README.md */,
A0AF3D7C17A8085900D2E836 /* main.m */,
A0AF3D7F17A8085900D2E836 /* RMAppDelegate.h */,
A0AF3D8017A8085900D2E836 /* RMAppDelegate.m */,
Expand Down Expand Up @@ -665,6 +681,7 @@
D078FA7B23734C1300982C56 /* RMStoreDemo-macOS */ = {
isa = PBXGroup;
children = (
D064399723A858BA0083EF25 /* README.md */,
D078FA8123734C1300982C56 /* main.m */,
D078FA7C23734C1300982C56 /* AppDelegate.h */,
D078FA8323734C1300982C56 /* AppDelegate.m */,
Expand Down Expand Up @@ -715,6 +732,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
D064399923A85E0E0083EF25 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
D078FA8B2373554700982C56 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -853,6 +877,25 @@
productReference = D0188DFC23A01C28002CC46B /* RMStoreTestsMacOS.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
D064399D23A85E0E0083EF25 /* RMStore-ContainerFramework */ = {
isa = PBXNativeTarget;
buildConfigurationList = D06439A323A85E0E0083EF25 /* Build configuration list for PBXNativeTarget "RMStore-ContainerFramework" */;
buildPhases = (
D064399923A85E0E0083EF25 /* Headers */,
D064399A23A85E0E0083EF25 /* Sources */,
D064399B23A85E0E0083EF25 /* Frameworks */,
D064399C23A85E0E0083EF25 /* Resources */,
D0EF44AB23AA8C3F003C810D /* ShellScript */,
);
buildRules = (
);
dependencies = (
);
name = "RMStore-ContainerFramework";
productName = "RMStore-ContainerFramework";
productReference = D064399E23A85E0E0083EF25 /* RMStore-ContainerFramework.framework */;
productType = "com.apple.product-type.framework";
};
D06825832373A31C00EAF052 /* RMStore (macOS) */ = {
isa = PBXNativeTarget;
buildConfigurationList = D06825922373A31C00EAF052 /* Build configuration list for PBXNativeTarget "RMStore (macOS)" */;
Expand Down Expand Up @@ -966,6 +1009,9 @@
D0188DFB23A01C28002CC46B = {
CreatedOnToolsVersion = 11.2.1;
};
D064399D23A85E0E0083EF25 = {
CreatedOnToolsVersion = 11.3;
};
D078FA8F2373554700982C56 = {
CreatedOnToolsVersion = 11.1;
ProvisioningStyle = Automatic;
Expand Down Expand Up @@ -1006,6 +1052,7 @@
15AD6C9C228BF84E00B68F53 /* RMStoreFramework (iOS) */,
D0EB86B2239E870900992915 /* RMStoreFramework (tvOS) */,
D078FA8F2373554700982C56 /* RMStoreFramework (macOS) */,
D064399D23A85E0E0083EF25 /* RMStore-ContainerFramework */,
);
};
/* End PBXProject section */
Expand Down Expand Up @@ -1046,6 +1093,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
D064399C23A85E0E0083EF25 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
D078FA8E2373554700982C56 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -1082,6 +1136,26 @@
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
D0EF44AB23AA8C3F003C810D /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "BUILD=\"${BUILT_PRODUCTS_DIR}/RMStore-ContainerFramework.framework/Versions/A/Resources\"\n\n# In the event that you have a a proxy defined here.\nsource \"${HOME}/.zshenv\"\n\n# Build the XCFramework\n./RMStoreFramework/build_xcframework.sh\n\n# Copy it into the fake framework.\ncp -r \"$BUILD_DIR/RMStoreFramework.xcframework\" \"${BUILD}/\"\n";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
15AD6C99228BF84E00B68F53 /* Sources */ = {
isa = PBXSourcesBuildPhase;
Expand Down Expand Up @@ -1162,6 +1236,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
D064399A23A85E0E0083EF25 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
D06825842373A31C00EAF052 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -1404,6 +1485,26 @@
};
name = Release;
};
D06439A423A85E0E0083EF25 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
INFOPLIST_FILE = "RMStoreFramework/RMStore_ContainerFramework-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "com.balthisar.RMStore-ContainerFramework";
PRODUCT_NAME = "RMStore-ContainerFramework";
SDKROOT = macosx;
};
name = Debug;
};
D06439A523A85E0E0083EF25 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
INFOPLIST_FILE = "RMStoreFramework/RMStore_ContainerFramework-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "com.balthisar.RMStore-ContainerFramework";
PRODUCT_NAME = "RMStore-ContainerFramework";
SDKROOT = macosx;
};
name = Release;
};
D06825932373A31C00EAF052 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = D07E3C91237F32B200BBAE5B /* RMStoreLib-macOS.xcconfig */;
Expand Down Expand Up @@ -1542,6 +1643,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D06439A323A85E0E0083EF25 /* Build configuration list for PBXNativeTarget "RMStore-ContainerFramework" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D06439A423A85E0E0083EF25 /* Debug */,
D06439A523A85E0E0083EF25 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D06825922373A31C00EAF052 /* Build configuration list for PBXNativeTarget "RMStore (macOS)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D064399D23A85E0E0083EF25"
BuildableName = "RMStore-ContainerFramework.framework"
BlueprintName = "RMStore-ContainerFramework"
ReferencedContainer = "container:RMStore.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</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">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D064399D23A85E0E0083EF25"
BuildableName = "RMStore-ContainerFramework.framework"
BlueprintName = "RMStore-ContainerFramework"
ReferencedContainer = "container:RMStore.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
1 change: 0 additions & 1 deletion RMStore/Optional/RMAppReceipt.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
//

#import "RMAppReceipt.h"
#import <openssl/pkcs7.h>
#import <openssl/objects.h>
#import <openssl/sha.h>
#import <openssl/x509.h>
Expand Down
15 changes: 15 additions & 0 deletions RMStoreDemo-iOS/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# RMStoreDemo-macOS

These materials build all of the iphoneos-derived demo applications, as described
below. The all share the same source code, although Apple TV requires its own
resources, and the targets link to appropriate versions of the RMStoreFramework.

- iPhone/iPad and simulators
- Mac Catalyst
- Apple TV and simulator

Note that in-app-purchases (even in the IAP sandbox) aren't supported by _any_ of the
simulators, and you'll need a real device to try the demos. All of the simulators except
Apple TV simulator can pull the products from the Apple Store, though. You'll need a
real Apple TV to see anything useful with the demo.

3 changes: 3 additions & 0 deletions RMStoreDemo-macOS/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# RMStoreDemo-macOS

These materials build the macOS native demo application.
File renamed without changes.
22 changes: 22 additions & 0 deletions RMStoreFramework/RMStore_ContainerFramework-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
</plist>
18 changes: 18 additions & 0 deletions RMStoreFramework/RMStore_ContainerFramework.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// RMStore_ContainerFramework.h
// RMStore-ContainerFramework
//
// Created by Jim Derry on 12/16/19.
//

#import <Foundation/Foundation.h>

//! Project version number for RMStore_ContainerFramework.
FOUNDATION_EXPORT double RMStore_ContainerFrameworkVersionNumber;

//! Project version string for RMStore_ContainerFramework.
FOUNDATION_EXPORT const unsigned char RMStore_ContainerFrameworkVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <RMStore_ContainerFramework/PublicHeader.h>


Loading

0 comments on commit 9d89b44

Please sign in to comment.