...
 
Commits (2)
......@@ -49,6 +49,8 @@ This avoids alot of issues resulting from poor cocoapods support by react native
# Publish android build to the Google Play beta track
yarn release:android
## Create release build (ios)
We use fastlane and certificate management via fastlane match. Ask nikolai@studentersamfundet.no for access to the certs.
## Libraries
We use https://nativebase.io/ for generic UI components
......@@ -106,7 +106,7 @@ android {
applicationId "no.neuf.chateau"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 24
versionCode 25
versionName "1.3.0"
}
splits {
......
......@@ -10,7 +10,12 @@ platform :android do
gradle(task: "bundle", build_type: "Release")
# upload to Google Play
upload_to_play_store(track: "beta", skip_upload_images: true)
upload_to_play_store(
track: "beta",
skip_upload_images: true,
# Specify these to avoid `gradle clean`
skip_upload_apk: true,
aab: "./app/build/outputs/bundle/release/app.aab")
slack(message: "Chateau Neuf app build uploaded to Google Play")
end
......
......@@ -19,7 +19,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>4</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
......
......@@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>4</string>
</dict>
</plist>
This diff is collapsed.
......@@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.2.2</string>
<string>1.3.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2</string>
<string>5</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>comgooglemaps</string>
......@@ -75,5 +75,7 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
</dict>
</plist>
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import <React/RCTLog.h>
#import <React/RCTRootView.h>
#define TIMEOUT_SECONDS 600
#define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
@interface DuskenTests : XCTestCase
@end
@implementation DuskenTests
- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
{
if (test(view)) {
return YES;
}
for (UIView *subview in [view subviews]) {
if ([self findSubviewInView:subview matching:test]) {
return YES;
}
}
return NO;
}
- (void)testRendersWelcomeScreen
{
UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
BOOL foundElement = NO;
__block NSString *redboxError = nil;
RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
if (level >= RCTLogLevelError) {
redboxError = message;
}
});
while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
[[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
[[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
return YES;
}
return NO;
}];
}
RCTSetLogFunction(RCTDefaultLogFunction);
XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
}
@end
<?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>en</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>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.2.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2</string>
</dict>
</plist>
# https://docs.fastlane.tools/actions/
# Change the syntax highlighting to Ruby
# update_fastlane
min_fastlane_version("2.73.0")
default_platform(:ios)
platform :ios do
......@@ -15,8 +11,8 @@ platform :ios do
desc "Submit a new Beta Build to Apple TestFlight"
desc "This will also make sure the profile is up to date"
lane :beta do
increment_build_number
increment_version_number
match(type: 'appstore', readonly: true)
increment_build_number(xcodeproj: "Dusken.xcodeproj")
build_app(scheme: "Dusken")
upload_to_testflight(skip_waiting_for_build_processing: true)
slack(message: "Chateau Neuf app build uploaded to TestFlight")
......@@ -24,12 +20,10 @@ platform :ios do
desc "Deploy a new version to the App Store"
lane :release do
increment_build_number
increment_version_number
# capture_screenshots
match(type: 'appstore', readonly: true)
increment_build_number(xcodeproj: "Dusken.xcodeproj")
build_app(scheme: "Dusken")
upload_to_app_store(force: true)
# frame_screenshots
slack(message: "Chateau Neuf app build uploaded to App Store")
end
......
git_url("git@git.neuf.no:edb/appstore-certs.git")
storage_mode("git")
type("development") # The default type, can be: appstore, adhoc, enterprise or development
app_identifier(["no.neuf.chateau"])
username("nikolai@studentersamfundet.no")
# The docs are available on https://docs.fastlane.tools/actions/match
......@@ -8,13 +8,11 @@ Make sure you have the latest version of the Xcode command line tools installed:
xcode-select --install
```
## Choose your installation method:
| Method | OS support | Description |
|----------------------------|-----------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|
| [Homebrew](http://brew.sh) | macOS | `brew cask install fastlane` |
| Installer Script | macOS | [Download the zip file](https://download.fastlane.tools). Then double click on the `install` script (or run it in a terminal window). |
| RubyGems | macOS or Linux with Ruby 2.0.0 or above | `sudo gem install fastlane -NV` |
Install _fastlane_ using
```
[sudo] gem install fastlane -NV
```
or alternatively using `brew cask install fastlane`
# Available Actions
## iOS
......@@ -30,6 +28,11 @@ This will also make sure the profile is up to date
fastlane ios release
```
Deploy a new version to the App Store
### ios build
```
fastlane ios build
```
----
......
......@@ -27,7 +27,7 @@ const tabBarOptions = {
android: {
backgroundColor: '#fff',
borderTopWidth: StyleSheet.hairlineWidth,
borderTopColor: 'rgba(0, 0, 0, 0.1)',
borderTopColor: 'rgba(0, 0, 0, 0.2)',
},
}),
},
......@@ -36,13 +36,14 @@ const tabBarOptions = {
},
activeTintColor: '#f58220',
inactiveTintColor: '#333333',
showIcon: true,
labelStyle: {
fontSize: 10,
marginBottom: 0,
fontSize: 12,
...Platform.select({
android: {
fontWeight: 'bold',
marginBottom: 4,
},
ios: {
marginBottom: 0,
},
}),
},
......