Skip to content

Commit 307cb47

Browse files
committed
Add Bitrise sample project
1 parent 05313a9 commit 307cb47

File tree

23 files changed

+1290
-0
lines changed

23 files changed

+1290
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Generated by CocoaPods
2+
BitriseSampleUnitAndOtherTestsApp.xcworkspace
3+
# Do not commit pods
4+
Pods
5+
# Intermediates
6+
DerivedData
7+
*.build
8+
build
9+
compile_commands.json
10+
# Fastlane reports
11+
fastlane/report.xml
12+
fastlane/test_output/

projects/BitriseSampleUnitAndOtherTestsApp/BitriseSampleUnitAndOtherTestsApp.xcodeproj/project.pbxproj

Lines changed: 529 additions & 0 deletions
Large diffs are not rendered by default.

projects/BitriseSampleUnitAndOtherTestsApp/BitriseSampleUnitAndOtherTestsApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
6+
<false/>
7+
<key>IDESourceControlProjectIdentifier</key>
8+
<string>07529588-2568-4464-9D55-E3A30DB2D63A</string>
9+
<key>IDESourceControlProjectName</key>
10+
<string>BitriseSampleUnitAndOtherTestsApp</string>
11+
<key>IDESourceControlProjectOriginsDictionary</key>
12+
<dict>
13+
<key>D8379880FB320D8E1DBD87F3490D48DFF1337CDB</key>
14+
<string>github.com:bitrise-io/sample-apps-ios-unit-and-other-tests.git</string>
15+
</dict>
16+
<key>IDESourceControlProjectPath</key>
17+
<string>BitriseSampleUnitAndOtherTestsApp/BitriseSampleUnitAndOtherTestsApp.xcodeproj</string>
18+
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
19+
<dict>
20+
<key>D8379880FB320D8E1DBD87F3490D48DFF1337CDB</key>
21+
<string>../../..</string>
22+
</dict>
23+
<key>IDESourceControlProjectURL</key>
24+
<string>github.com:bitrise-io/sample-apps-ios-unit-and-other-tests.git</string>
25+
<key>IDESourceControlProjectVersion</key>
26+
<integer>111</integer>
27+
<key>IDESourceControlProjectWCCIdentifier</key>
28+
<string>D8379880FB320D8E1DBD87F3490D48DFF1337CDB</string>
29+
<key>IDESourceControlProjectWCConfigurations</key>
30+
<array>
31+
<dict>
32+
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
33+
<string>public.vcs.git</string>
34+
<key>IDESourceControlWCCIdentifierKey</key>
35+
<string>D8379880FB320D8E1DBD87F3490D48DFF1337CDB</string>
36+
<key>IDESourceControlWCCName</key>
37+
<string>sample-apps-ios-unit-and-other-tests</string>
38+
</dict>
39+
</array>
40+
</dict>
41+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "0610"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "BA0609D51AA610E100F24A40"
18+
BuildableName = "BitriseSampleUnitAndOtherTestsApp.app"
19+
BlueprintName = "BitriseSampleUnitAndOtherTestsApp"
20+
ReferencedContainer = "container:BitriseSampleUnitAndOtherTestsApp.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
<BuildActionEntry
24+
buildForTesting = "YES"
25+
buildForRunning = "YES"
26+
buildForProfiling = "NO"
27+
buildForArchiving = "NO"
28+
buildForAnalyzing = "YES">
29+
<BuildableReference
30+
BuildableIdentifier = "primary"
31+
BlueprintIdentifier = "BA0609F11AA610E100F24A40"
32+
BuildableName = "BitriseSampleUnitAndOtherTestsAppTests.xctest"
33+
BlueprintName = "BitriseSampleUnitAndOtherTestsAppTests"
34+
ReferencedContainer = "container:BitriseSampleUnitAndOtherTestsApp.xcodeproj">
35+
</BuildableReference>
36+
</BuildActionEntry>
37+
</BuildActionEntries>
38+
</BuildAction>
39+
<TestAction
40+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
41+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
42+
shouldUseLaunchSchemeArgsEnv = "YES"
43+
buildConfiguration = "Debug">
44+
<Testables>
45+
<TestableReference
46+
skipped = "NO">
47+
<BuildableReference
48+
BuildableIdentifier = "primary"
49+
BlueprintIdentifier = "BA0609F11AA610E100F24A40"
50+
BuildableName = "BitriseSampleUnitAndOtherTestsAppTests.xctest"
51+
BlueprintName = "BitriseSampleUnitAndOtherTestsAppTests"
52+
ReferencedContainer = "container:BitriseSampleUnitAndOtherTestsApp.xcodeproj">
53+
</BuildableReference>
54+
</TestableReference>
55+
</Testables>
56+
<MacroExpansion>
57+
<BuildableReference
58+
BuildableIdentifier = "primary"
59+
BlueprintIdentifier = "BA0609D51AA610E100F24A40"
60+
BuildableName = "BitriseSampleUnitAndOtherTestsApp.app"
61+
BlueprintName = "BitriseSampleUnitAndOtherTestsApp"
62+
ReferencedContainer = "container:BitriseSampleUnitAndOtherTestsApp.xcodeproj">
63+
</BuildableReference>
64+
</MacroExpansion>
65+
</TestAction>
66+
<LaunchAction
67+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
68+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
69+
launchStyle = "0"
70+
useCustomWorkingDirectory = "NO"
71+
buildConfiguration = "Debug"
72+
ignoresPersistentStateOnLaunch = "NO"
73+
debugDocumentVersioning = "YES"
74+
allowLocationSimulation = "YES">
75+
<BuildableProductRunnable>
76+
<BuildableReference
77+
BuildableIdentifier = "primary"
78+
BlueprintIdentifier = "BA0609D51AA610E100F24A40"
79+
BuildableName = "BitriseSampleUnitAndOtherTestsApp.app"
80+
BlueprintName = "BitriseSampleUnitAndOtherTestsApp"
81+
ReferencedContainer = "container:BitriseSampleUnitAndOtherTestsApp.xcodeproj">
82+
</BuildableReference>
83+
</BuildableProductRunnable>
84+
<AdditionalOptions>
85+
</AdditionalOptions>
86+
</LaunchAction>
87+
<ProfileAction
88+
shouldUseLaunchSchemeArgsEnv = "YES"
89+
savedToolIdentifier = ""
90+
useCustomWorkingDirectory = "NO"
91+
buildConfiguration = "Release"
92+
debugDocumentVersioning = "YES">
93+
<BuildableProductRunnable>
94+
<BuildableReference
95+
BuildableIdentifier = "primary"
96+
BlueprintIdentifier = "BA0609D51AA610E100F24A40"
97+
BuildableName = "BitriseSampleUnitAndOtherTestsApp.app"
98+
BlueprintName = "BitriseSampleUnitAndOtherTestsApp"
99+
ReferencedContainer = "container:BitriseSampleUnitAndOtherTestsApp.xcodeproj">
100+
</BuildableReference>
101+
</BuildableProductRunnable>
102+
</ProfileAction>
103+
<AnalyzeAction
104+
buildConfiguration = "Debug">
105+
</AnalyzeAction>
106+
<ArchiveAction
107+
buildConfiguration = "Release"
108+
revealArchiveInOrganizer = "YES">
109+
</ArchiveAction>
110+
</Scheme>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//
2+
// AppDelegate.h
3+
// BitriseSampleUnitAndOtherTestsApp
4+
//
5+
// Created by Viktor Benei on 3/3/15.
6+
// Copyright (c) 2015 Bitrise. All rights reserved.
7+
//
8+
9+
#import <UIKit/UIKit.h>
10+
#import <CoreData/CoreData.h>
11+
12+
@interface AppDelegate : UIResponder <UIApplicationDelegate>
13+
14+
@property (strong, nonatomic) UIWindow *window;
15+
16+
@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext;
17+
@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;
18+
@property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;
19+
20+
- (void)saveContext;
21+
- (NSURL *)applicationDocumentsDirectory;
22+
23+
24+
@end
25+
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
//
2+
// AppDelegate.m
3+
// BitriseSampleUnitAndOtherTestsApp
4+
//
5+
// Created by Viktor Benei on 3/3/15.
6+
// Copyright (c) 2015 Bitrise. All rights reserved.
7+
//
8+
9+
#import "AppDelegate.h"
10+
11+
@interface AppDelegate ()
12+
13+
@end
14+
15+
@implementation AppDelegate
16+
17+
18+
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19+
// Override point for customization after application launch.
20+
return YES;
21+
}
22+
23+
- (void)applicationWillResignActive:(UIApplication *)application {
24+
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
25+
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
26+
}
27+
28+
- (void)applicationDidEnterBackground:(UIApplication *)application {
29+
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
30+
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31+
}
32+
33+
- (void)applicationWillEnterForeground:(UIApplication *)application {
34+
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
35+
}
36+
37+
- (void)applicationDidBecomeActive:(UIApplication *)application {
38+
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
39+
}
40+
41+
- (void)applicationWillTerminate:(UIApplication *)application {
42+
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43+
// Saves changes in the application's managed object context before the application terminates.
44+
[self saveContext];
45+
}
46+
47+
#pragma mark - Core Data stack
48+
49+
@synthesize managedObjectContext = _managedObjectContext;
50+
@synthesize managedObjectModel = _managedObjectModel;
51+
@synthesize persistentStoreCoordinator = _persistentStoreCoordinator;
52+
53+
- (NSURL *)applicationDocumentsDirectory {
54+
// The directory the application uses to store the Core Data store file. This code uses a directory named "com.bitrise.BitriseSampleUnitAndOtherTestsApp" in the application's documents directory.
55+
return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
56+
}
57+
58+
- (NSManagedObjectModel *)managedObjectModel {
59+
// The managed object model for the application. It is a fatal error for the application not to be able to find and load its model.
60+
if (_managedObjectModel != nil) {
61+
return _managedObjectModel;
62+
}
63+
NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"BitriseSampleUnitAndOtherTestsApp" withExtension:@"momd"];
64+
_managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL];
65+
return _managedObjectModel;
66+
}
67+
68+
- (NSPersistentStoreCoordinator *)persistentStoreCoordinator {
69+
// The persistent store coordinator for the application. This implementation creates and return a coordinator, having added the store for the application to it.
70+
if (_persistentStoreCoordinator != nil) {
71+
return _persistentStoreCoordinator;
72+
}
73+
74+
// Create the coordinator and store
75+
76+
_persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]];
77+
NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"BitriseSampleUnitAndOtherTestsApp.sqlite"];
78+
NSError *error = nil;
79+
NSString *failureReason = @"There was an error creating or loading the application's saved data.";
80+
if (![_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:nil error:&error]) {
81+
// Report any error we got.
82+
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
83+
dict[NSLocalizedDescriptionKey] = @"Failed to initialize the application's saved data";
84+
dict[NSLocalizedFailureReasonErrorKey] = failureReason;
85+
dict[NSUnderlyingErrorKey] = error;
86+
error = [NSError errorWithDomain:@"YOUR_ERROR_DOMAIN" code:9999 userInfo:dict];
87+
// Replace this with code to handle the error appropriately.
88+
// abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
89+
NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
90+
abort();
91+
}
92+
93+
return _persistentStoreCoordinator;
94+
}
95+
96+
97+
- (NSManagedObjectContext *)managedObjectContext {
98+
// Returns the managed object context for the application (which is already bound to the persistent store coordinator for the application.)
99+
if (_managedObjectContext != nil) {
100+
return _managedObjectContext;
101+
}
102+
103+
NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator];
104+
if (!coordinator) {
105+
return nil;
106+
}
107+
_managedObjectContext = [[NSManagedObjectContext alloc] init];
108+
[_managedObjectContext setPersistentStoreCoordinator:coordinator];
109+
return _managedObjectContext;
110+
}
111+
112+
#pragma mark - Core Data Saving support
113+
114+
- (void)saveContext {
115+
NSManagedObjectContext *managedObjectContext = self.managedObjectContext;
116+
if (managedObjectContext != nil) {
117+
NSError *error = nil;
118+
if ([managedObjectContext hasChanges] && ![managedObjectContext save:&error]) {
119+
// Replace this implementation with code to handle the error appropriately.
120+
// abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
121+
NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
122+
abort();
123+
}
124+
}
125+
}
126+
127+
@end
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
3+
<dependencies>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207"/>
5+
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
6+
</dependencies>
7+
<objects>
8+
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
9+
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
10+
<view contentMode="scaleToFill" id="iN0-l3-epB">
11+
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
12+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
13+
<subviews>
14+
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 Bitrise. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
15+
<rect key="frame" x="20" y="439" width="441" height="21"/>
16+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
17+
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
18+
<nil key="highlightedColor"/>
19+
</label>
20+
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="BitriseSampleUnitAndOtherTestsApp" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
21+
<rect key="frame" x="20" y="140" width="441" height="43"/>
22+
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
23+
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
24+
<nil key="highlightedColor"/>
25+
</label>
26+
</subviews>
27+
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
28+
<constraints>
29+
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
30+
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
31+
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
32+
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
33+
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
34+
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
35+
</constraints>
36+
<nil key="simulatedStatusBarMetrics"/>
37+
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
38+
<point key="canvasLocation" x="548" y="455"/>
39+
</view>
40+
</objects>
41+
</document>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
3+
<dependencies>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
5+
</dependencies>
6+
<scenes>
7+
<!--View Controller-->
8+
<scene sceneID="tne-QT-ifu">
9+
<objects>
10+
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController">
11+
<layoutGuides>
12+
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
13+
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
14+
</layoutGuides>
15+
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
16+
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
17+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
18+
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
19+
</view>
20+
</viewController>
21+
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
22+
</objects>
23+
</scene>
24+
</scenes>
25+
</document>

0 commit comments

Comments
 (0)