Skip to content

Commit

Permalink
Separate staging and release build types
Browse files Browse the repository at this point in the history
  • Loading branch information
robertying committed Apr 12, 2019
1 parent 6f49652 commit f7f0839
Show file tree
Hide file tree
Showing 8 changed files with 144 additions and 6 deletions.
10 changes: 10 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,22 @@ android {
buildTypes {
debug {
manifestPlaceholders = [isDebug: true]
applicationIdSuffix ".debug"
buildConfigField "String", "CODEPUSH_KEY", '""'
}
releaseStaging {
manifestPlaceholders = [isDebug: false]
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
buildConfigField "String", "CODEPUSH_KEY", '"85HbNLH52a6R9ukGlaQ2IU9BhaujBy9a1NntV"'
}
release {
manifestPlaceholders = [isDebug: false]
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
buildConfigField "String", "CODEPUSH_KEY", '"Ims62DStmtYSRrADmEal4lQKU4g8Hy5ak4nYV"'
}
}
// applicationVariants are e.g. debug, release
Expand Down
3 changes: 3 additions & 0 deletions android/app/src/debug/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<resources>
<string name="app_name">learnX-Debug</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public boolean getUseDeveloperSupport() {
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new CodePush(getResources().getString(R.string.reactNativeCodePush_androidDeploymentKey), getApplicationContext(), BuildConfig.DEBUG),
new CodePush(BuildConfig.CODEPUSH_KEY, getApplicationContext(), BuildConfig.DEBUG),
new BlurViewPackage(),
new LinearGradientPackage(),
new RNFetchBlobPackage(),
Expand Down
1 change: 0 additions & 1 deletion android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<resources>
<string moduleConfig="true" name="reactNativeCodePush_androidDeploymentKey">85HbNLH52a6R9ukGlaQ2IU9BhaujBy9a1NntV</string>
<string name="app_name">learnX</string>
</resources>
94 changes: 92 additions & 2 deletions ios/learnX.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
3FC8248E3E74486EA6818941 /* FontAwesome5_Regular.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome5_Regular.ttf; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf"; sourceTree = "<group>"; };
443FA5B275874ED871E76062 /* Pods-learnXTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-learnXTests.debug.xcconfig"; path = "Target Support Files/Pods-learnXTests/Pods-learnXTests.debug.xcconfig"; sourceTree = "<group>"; };
490051384AF4472F8A9F7980 /* Octicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Octicons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Octicons.ttf"; sourceTree = "<group>"; };
59F216114CA3551F20AC00A2 /* Pods-learnX.staging.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-learnX.staging.xcconfig"; path = "Target Support Files/Pods-learnX/Pods-learnX.staging.xcconfig"; sourceTree = "<group>"; };
5C2616418AE84CAE8A6D5327 /* Entypo.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Entypo.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Entypo.ttf"; sourceTree = "<group>"; };
787DF3BC90244716AAA883EF /* Foundation.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Foundation.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Foundation.ttf"; sourceTree = "<group>"; };
813616FCFA4B470283F47A5A /* FontAwesome.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome.ttf; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf"; sourceTree = "<group>"; };
Expand All @@ -40,7 +41,8 @@
C46F3667AE2D5E49A2253C9E /* Pods-learnX.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-learnX.debug.xcconfig"; path = "Target Support Files/Pods-learnX/Pods-learnX.debug.xcconfig"; sourceTree = "<group>"; };
C904C302C1D466306290CFB2 /* Pods-learnX.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-learnX.release.xcconfig"; path = "Target Support Files/Pods-learnX/Pods-learnX.release.xcconfig"; sourceTree = "<group>"; };
CE248A3AEAD54031B5620049 /* FontAwesome5_Solid.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome5_Solid.ttf; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf"; sourceTree = "<group>"; };
D437877C2260C2780097D821 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "zh-Hans"; path = "zh-Hans.lproj/LaunchScreen.xib"; sourceTree = "<group>"; };
D4DD7ADF2260CFB100F221AF /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
D4DD7AE02260CFBC00F221AF /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "zh-Hans"; path = "zh-Hans.lproj/LaunchScreen.xib"; sourceTree = "<group>"; };
E0D27A9FD4944305A002F34D /* EvilIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = EvilIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf"; sourceTree = "<group>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
Expand Down Expand Up @@ -93,6 +95,7 @@
C904C302C1D466306290CFB2 /* Pods-learnX.release.xcconfig */,
443FA5B275874ED871E76062 /* Pods-learnXTests.debug.xcconfig */,
BA0F45B70E76EA4C96EFCFEF /* Pods-learnXTests.release.xcconfig */,
59F216114CA3551F20AC00A2 /* Pods-learnX.staging.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
Expand Down Expand Up @@ -188,6 +191,7 @@
hasScannedForEncodings = 0;
knownRegions = (
Base,
en,
"zh-Hans",
);
mainGroup = 83CBB9F61A601CBA00E9B192;
Expand Down Expand Up @@ -355,7 +359,8 @@
isa = PBXVariantGroup;
children = (
13B07FB21A68108700A75B9A /* Base */,
D437877C2260C2780097D821 /* zh-Hans */,
D4DD7ADF2260CFB100F221AF /* en */,
D4DD7AE02260CFBC00F221AF /* zh-Hans */,
);
name = LaunchScreen.xib;
path = learnX;
Expand Down Expand Up @@ -424,6 +429,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand All @@ -447,6 +453,7 @@
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODEPUSH_KEY = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand Down Expand Up @@ -478,6 +485,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand All @@ -501,6 +509,7 @@
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODEPUSH_KEY = Qp1abaOFYSc091n4hT0OdzFXpXUISykcJE3YV;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
Expand All @@ -521,6 +530,85 @@
};
name = Release;
};
D437877D2260CDA90097D821 /* Staging */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODEPUSH_KEY = "7NdRqz1VWpbZBJ8NZPrD8QWpPh_YSk-Jcy43tV";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/Release$(EFFECTIVE_PLATFORM_NAME)";
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Staging;
};
D437877E2260CDA90097D821 /* Staging */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 59F216114CA3551F20AC00A2 /* Pods-learnX.staging.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 15;
DEVELOPMENT_TEAM = QX9PZ6H89F;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-cookies/ios/RNCookieManagerIOS",
);
INFOPLIST_FILE = learnX/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
"-lc++",
);
PRODUCT_BUNDLE_IDENTIFIER = io.robertying.learnX;
PRODUCT_NAME = learnX;
PROVISIONING_PROFILE_SPECIFIER = "match Development io.robertying.learnX";
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
};
name = Staging;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
Expand All @@ -529,6 +617,7 @@
buildConfigurations = (
13B07F941A680F5B00A75B9A /* Debug */,
13B07F951A680F5B00A75B9A /* Release */,
D437877E2260CDA90097D821 /* Staging */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
Expand All @@ -538,6 +627,7 @@
buildConfigurations = (
83CBBA201A601CBA00E9B192 /* Debug */,
83CBBA211A601CBA00E9B192 /* Release */,
D437877D2260CDA90097D821 /* Staging */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
Expand Down
4 changes: 2 additions & 2 deletions ios/learnX/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<key>CFBundleVersion</key>
<string>15</string>
<key>CodePushDeploymentKey</key>
<string>7NdRqz1VWpbZBJ8NZPrD8QWpPh_YSk-Jcy43tV</string>
<string>$(CODEPUSH_KEY)</string>
<key>Fabric</key>
<dict>
<key>APIKey</key>
Expand Down Expand Up @@ -68,7 +68,7 @@
<key>NSMicrophoneUsageDescription</key>
<string>Allow learnX to access your microphone</string>
<key>NSMotionUsageDescription</key>
<string>Allow learnX to access your device's accelerometer</string>
<string>Allow learnX to access your device&apos;s accelerometer</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Give learnX periences permission to save photos</string>
<key>NSPhotoLibraryUsageDescription</key>
Expand Down
35 changes: 35 additions & 0 deletions ios/learnX/en.lproj/LaunchScreen.xib
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="410" height="684"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="X" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="157.5" y="252.5" width="95.5" height="179.5"/>
<fontDescription key="fontDescription" type="system" pointSize="150"/>
<color key="textColor" red="0.40000000000000002" green="0.031372549019607843" blue="0.45490196078431372" alpha="0.80000000000000004" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="ALU-gq-YFX"/>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="fvF-W1-DHV"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="497.10144927536237" y="522.99107142857144"/>
</view>
</objects>
</document>
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "learnX",
"scripts": {
"android": "react-native run-android",
"android:beta": "bundle exec fastlane android beta",
Expand Down

0 comments on commit f7f0839

Please sign in to comment.