-
-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc737cb
commit 1cb066b
Showing
40 changed files
with
2,868 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
namespace Sentry.Samples.Ios; | ||
|
||
[Register("AppDelegate")] | ||
public class AppDelegate : UIApplicationDelegate | ||
{ | ||
public override UIWindow? Window | ||
{ | ||
get; | ||
set; | ||
} | ||
|
||
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) | ||
{ | ||
// Init the Sentry SDK | ||
SentrySdk.Init(o => | ||
{ | ||
o.Debug = true; | ||
o.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537"; | ||
}); | ||
|
||
// create a new window instance based on the screen size | ||
Window = new UIWindow(UIScreen.MainScreen.Bounds); | ||
|
||
// create a UIViewController with a single UILabel | ||
var vc = new UIViewController(); | ||
vc.View!.AddSubview(new UILabel(Window!.Frame) | ||
{ | ||
BackgroundColor = UIColor.SystemBackground, | ||
TextAlignment = UITextAlignment.Center, | ||
Text = "Hello, iOS!", | ||
AutoresizingMask = UIViewAutoresizing.All, | ||
}); | ||
Window.RootViewController = vc; | ||
|
||
// make the window visible | ||
Window.MakeKeyAndVisible(); | ||
|
||
|
||
// Try out the Sentry SDK | ||
SentrySdk.CaptureMessage("From iOS"); | ||
|
||
// Uncomment to try these | ||
// throw new Exception("Test Unhandled Managed Exception"); | ||
// SentrySdk.CauseNativeCrash(); | ||
|
||
return true; | ||
} | ||
} |
117 changes: 117 additions & 0 deletions
117
samples/Sentry.Samples.Ios/Assets.xcassets/AppIcon.appiconset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
{ | ||
"images": [ | ||
{ | ||
"scale": "2x", | ||
"size": "20x20", | ||
"idiom": "iphone", | ||
"filename": "Icon40.png" | ||
}, | ||
{ | ||
"scale": "3x", | ||
"size": "20x20", | ||
"idiom": "iphone", | ||
"filename": "Icon60.png" | ||
}, | ||
{ | ||
"scale": "2x", | ||
"size": "29x29", | ||
"idiom": "iphone", | ||
"filename": "Icon58.png" | ||
}, | ||
{ | ||
"scale": "3x", | ||
"size": "29x29", | ||
"idiom": "iphone", | ||
"filename": "Icon87.png" | ||
}, | ||
{ | ||
"scale": "2x", | ||
"size": "40x40", | ||
"idiom": "iphone", | ||
"filename": "Icon80.png" | ||
}, | ||
{ | ||
"scale": "3x", | ||
"size": "40x40", | ||
"idiom": "iphone", | ||
"filename": "Icon120.png" | ||
}, | ||
{ | ||
"scale": "2x", | ||
"size": "60x60", | ||
"idiom": "iphone", | ||
"filename": "Icon120.png" | ||
}, | ||
{ | ||
"scale": "3x", | ||
"size": "60x60", | ||
"idiom": "iphone", | ||
"filename": "Icon180.png" | ||
}, | ||
{ | ||
"scale": "1x", | ||
"size": "20x20", | ||
"idiom": "ipad", | ||
"filename": "Icon20.png" | ||
}, | ||
{ | ||
"scale": "2x", | ||
"size": "20x20", | ||
"idiom": "ipad", | ||
"filename": "Icon40.png" | ||
}, | ||
{ | ||
"scale": "1x", | ||
"size": "29x29", | ||
"idiom": "ipad", | ||
"filename": "Icon29.png" | ||
}, | ||
{ | ||
"scale": "2x", | ||
"size": "29x29", | ||
"idiom": "ipad", | ||
"filename": "Icon58.png" | ||
}, | ||
{ | ||
"scale": "1x", | ||
"size": "40x40", | ||
"idiom": "ipad", | ||
"filename": "Icon40.png" | ||
}, | ||
{ | ||
"scale": "2x", | ||
"size": "40x40", | ||
"idiom": "ipad", | ||
"filename": "Icon80.png" | ||
}, | ||
{ | ||
"scale": "1x", | ||
"size": "76x76", | ||
"idiom": "ipad", | ||
"filename": "Icon76.png" | ||
}, | ||
{ | ||
"scale": "2x", | ||
"size": "76x76", | ||
"idiom": "ipad", | ||
"filename": "Icon152.png" | ||
}, | ||
{ | ||
"scale": "2x", | ||
"size": "83.5x83.5", | ||
"idiom": "ipad", | ||
"filename": "Icon167.png" | ||
}, | ||
{ | ||
"scale": "1x", | ||
"size": "1024x1024", | ||
"idiom": "ios-marketing", | ||
"filename": "Icon1024.png" | ||
} | ||
], | ||
"properties": {}, | ||
"info": { | ||
"version": 1, | ||
"author": "xcode" | ||
} | ||
} |
Binary file added
BIN
+68.8 KB
samples/Sentry.Samples.Ios/Assets.xcassets/AppIcon.appiconset/Icon1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.68 KB
samples/Sentry.Samples.Ios/Assets.xcassets/AppIcon.appiconset/Icon120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.64 KB
samples/Sentry.Samples.Ios/Assets.xcassets/AppIcon.appiconset/Icon152.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.58 KB
samples/Sentry.Samples.Ios/Assets.xcassets/AppIcon.appiconset/Icon167.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.07 KB
samples/Sentry.Samples.Ios/Assets.xcassets/AppIcon.appiconset/Icon180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.28 KB
samples/Sentry.Samples.Ios/Assets.xcassets/AppIcon.appiconset/Icon20.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+845 Bytes
samples/Sentry.Samples.Ios/Assets.xcassets/AppIcon.appiconset/Icon29.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.08 KB
samples/Sentry.Samples.Ios/Assets.xcassets/AppIcon.appiconset/Icon40.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.72 KB
samples/Sentry.Samples.Ios/Assets.xcassets/AppIcon.appiconset/Icon58.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.48 KB
samples/Sentry.Samples.Ios/Assets.xcassets/AppIcon.appiconset/Icon60.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.28 KB
samples/Sentry.Samples.Ios/Assets.xcassets/AppIcon.appiconset/Icon76.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.4 KB
samples/Sentry.Samples.Ios/Assets.xcassets/AppIcon.appiconset/Icon80.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.69 KB
samples/Sentry.Samples.Ios/Assets.xcassets/AppIcon.appiconset/Icon87.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?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> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?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>CFBundleDisplayName</key> | ||
<string>Sentry.Samples.Ios</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>com.companyname.Sentry.Samples.Ios</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.0</string> | ||
<key>CFBundleVersion</key> | ||
<string>1.0</string> | ||
<key>LSRequiresIPhoneOS</key> | ||
<true/> | ||
<key>UIDeviceFamily</key> | ||
<array> | ||
<integer>1</integer> | ||
<integer>2</integer> | ||
</array> | ||
<key>UILaunchStoryboardName</key> | ||
<string>LaunchScreen</string> | ||
<key>UIRequiredDeviceCapabilities</key> | ||
<array> | ||
<string>armv7</string> | ||
</array> | ||
<key>UISupportedInterfaceOrientations</key> | ||
<array> | ||
<string>UIInterfaceOrientationPortrait</string> | ||
<string>UIInterfaceOrientationLandscapeLeft</string> | ||
<string>UIInterfaceOrientationLandscapeRight</string> | ||
</array> | ||
<key>UISupportedInterfaceOrientations~ipad</key> | ||
<array> | ||
<string>UIInterfaceOrientationPortrait</string> | ||
<string>UIInterfaceOrientationPortraitUpsideDown</string> | ||
<string>UIInterfaceOrientationLandscapeLeft</string> | ||
<string>UIInterfaceOrientationLandscapeRight</string> | ||
</array> | ||
<key>XSAppIconAssets</key> | ||
<string>Assets.xcassets/AppIcon.appiconset</string> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="222" launchScreen="YES"> | ||
<dependencies> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/> | ||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
</dependencies> | ||
<scenes> | ||
<scene sceneID="221"> | ||
<objects> | ||
<viewController id="222" sceneMemberID="viewController"> | ||
<layoutGuides> | ||
<viewControllerLayoutGuide type="top" id="219"/> | ||
<viewControllerLayoutGuide type="bottom" id="220"/> | ||
</layoutGuides> | ||
<view key="view" contentMode="scaleToFill" id="223"> | ||
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/> | ||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
</view> | ||
</viewController> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="224" userLabel="First Responder" sceneMemberID="firstResponder"/> | ||
</objects> | ||
<point key="canvasLocation" x="-200" y="-388"/> | ||
</scene> | ||
</scenes> | ||
</document> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
using Sentry.Samples.Ios; | ||
|
||
// This is the main entry point of the application. | ||
// If you want to use a different Application Delegate class from "AppDelegate" | ||
// you can specify it here. | ||
UIApplication.Main (args, null, typeof (AppDelegate)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<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"> | ||
<dependencies> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207" /> | ||
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1" /> | ||
</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="480" height="480" /> | ||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" /> | ||
<subviews> | ||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2017 " textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" | ||
minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye"> | ||
<rect key="frame" x="20" y="439" width="441" height="21" /> | ||
<fontDescription key="fontDescription" type="system" pointSize="17" /> | ||
<color key="textColor" cocoaTouchSystemColor="darkTextColor" /> | ||
<nil key="highlightedColor" /> | ||
</label> | ||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="NewApp" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" | ||
minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX"> | ||
<rect key="frame" x="20" y="140" width="441" height="43" /> | ||
<fontDescription key="fontDescription" type="boldSystem" pointSize="36" /> | ||
<color key="textColor" cocoaTouchSystemColor="darkTextColor" /> | ||
<nil key="highlightedColor" /> | ||
</label> | ||
</subviews> | ||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite" /> | ||
<constraints> | ||
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC" /> | ||
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk" /> | ||
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l" /> | ||
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0" /> | ||
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9" /> | ||
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g" /> | ||
</constraints> | ||
<nil key="simulatedStatusBarMetrics" /> | ||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics" /> | ||
<point key="canvasLocation" x="548" y="455" /> | ||
</view> | ||
</objects> | ||
</document> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
namespace Sentry.Samples.Ios; | ||
|
||
[Register("SceneDelegate")] | ||
public class SceneDelegate : UIResponder, IUIWindowSceneDelegate | ||
{ | ||
|
||
[Export("window")] public UIWindow? Window { get; set; } | ||
|
||
[Export("scene:willConnectToSession:options:")] | ||
public void WillConnect(UIScene scene, UISceneSession session, UISceneConnectionOptions connectionOptions) | ||
{ | ||
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. | ||
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene. | ||
// This delegate does not imply the connecting scene or session are new (see UIApplicationDelegate `GetConfiguration` instead). | ||
} | ||
|
||
[Export("sceneDidDisconnect:")] | ||
public void DidDisconnect(UIScene scene) | ||
{ | ||
// Called as the scene is being released by the system. | ||
// This occurs shortly after the scene enters the background, or when its session is discarded. | ||
// Release any resources associated with this scene that can be re-created the next time the scene connects. | ||
// The scene may re-connect later, as its session was not neccessarily discarded (see UIApplicationDelegate `DidDiscardSceneSessions` instead). | ||
} | ||
|
||
[Export("sceneDidBecomeActive:")] | ||
public void DidBecomeActive(UIScene scene) | ||
{ | ||
// Called when the scene has moved from an inactive state to an active state. | ||
// Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. | ||
} | ||
|
||
[Export("sceneWillResignActive:")] | ||
public void WillResignActive(UIScene scene) | ||
{ | ||
// Called when the scene will move from an active state to an inactive state. | ||
// This may occur due to temporary interruptions (ex. an incoming phone call). | ||
} | ||
|
||
[Export("sceneWillEnterForeground:")] | ||
public void WillEnterForeground(UIScene scene) | ||
{ | ||
// Called as the scene transitions from the background to the foreground. | ||
// Use this method to undo the changes made on entering the background. | ||
} | ||
|
||
[Export("sceneDidEnterBackground:")] | ||
public void DidEnterBackground(UIScene scene) | ||
{ | ||
// Called as the scene transitions from the foreground to the background. | ||
// Use this method to save data, release shared resources, and store enough scene-specific state information | ||
// to restore the scene back to its current state. | ||
} | ||
} |
Oops, something went wrong.