This repository has been archived by the owner on Dec 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
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
d70b2ff
commit 05193ad
Showing
30 changed files
with
673 additions
and
51 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,33 @@ | ||
using System; | ||
namespace mParticle.Xamarin | ||
namespace mParticle.MAUI; | ||
|
||
public static class MParticle | ||
{ | ||
public static class MParticle | ||
{ | ||
static Lazy<MParticleSDK> TTS = new Lazy<MParticleSDK>(() => CreateInstance(), System.Threading.LazyThreadSafetyMode.PublicationOnly); | ||
static Lazy<MParticleSDK> TTS = new Lazy<MParticleSDK>(() => CreateInstance(), System.Threading.LazyThreadSafetyMode.PublicationOnly); | ||
|
||
public static MParticleSDK Instance | ||
public static MParticleSDK Instance | ||
{ | ||
get | ||
{ | ||
get | ||
var ret = TTS.Value; | ||
if (ret == null) | ||
{ | ||
var ret = TTS.Value; | ||
if (ret == null) | ||
{ | ||
throw NotImplementedInReferenceAssembly(); | ||
} | ||
return ret; | ||
throw NotImplementedInReferenceAssembly(); | ||
} | ||
return ret; | ||
} | ||
} | ||
|
||
static MParticleSDK CreateInstance() | ||
{ | ||
#if PORTABLE | ||
return null; | ||
#else | ||
return new MParticleSDKImpl(); | ||
#endif | ||
} | ||
static MParticleSDK CreateInstance() | ||
{ | ||
#if PORTABLE | ||
return null; | ||
#else | ||
return new MParticleSDKImpl(); | ||
#endif | ||
} | ||
|
||
internal static Exception NotImplementedInReferenceAssembly() | ||
{ | ||
return new NotImplementedException("This functionality is not implemented in the portable version of this assembly. You should reference the mParticle.Xamarin NuGet package from your main application project in order to reference the platform-specific implementation."); | ||
} | ||
internal static Exception NotImplementedInReferenceAssembly() | ||
{ | ||
return new NotImplementedException("This functionality is not implemented in the portable version of this assembly. You should reference the mParticle.Xamarin NuGet package from your main application project in order to reference the platform-specific implementation."); | ||
} | ||
} |
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,27 @@ | ||
using UIKit; | ||
using Foundation; | ||
|
||
namespace mParticle.MAUI.iOS.Sample; | ||
|
||
[Register ("AppDelegate")] | ||
public class AppDelegate : UIApplicationDelegate { | ||
public override UIWindow? Window { | ||
get; | ||
set; | ||
} | ||
|
||
public override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions) | ||
{ | ||
// create a new window instance based on the screen size | ||
Window = new UIWindow (UIScreen.MainScreen.Bounds); | ||
|
||
// set root view controller | ||
Window.RootViewController = new ViewController(); | ||
|
||
// make the window visible | ||
Window.MakeKeyAndVisible (); | ||
|
||
return true; | ||
} | ||
} | ||
|
118 changes: 118 additions & 0 deletions
118
Samples/mParticle.MAUI.iOS.Sample/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,118 @@ | ||
{ | ||
"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
+10.5 KB
Samples/mParticle.MAUI.iOS.Sample/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
+1.13 KB
Samples/mParticle.MAUI.iOS.Sample/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
+1.35 KB
Samples/mParticle.MAUI.iOS.Sample/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
+1.47 KB
Samples/mParticle.MAUI.iOS.Sample/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
+1.52 KB
Samples/mParticle.MAUI.iOS.Sample/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
+352 Bytes
Samples/mParticle.MAUI.iOS.Sample/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
+422 Bytes
Samples/mParticle.MAUI.iOS.Sample/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
+537 Bytes
Samples/mParticle.MAUI.iOS.Sample/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
+700 Bytes
Samples/mParticle.MAUI.iOS.Sample/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
+700 Bytes
Samples/mParticle.MAUI.iOS.Sample/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
+870 Bytes
Samples/mParticle.MAUI.iOS.Sample/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
+888 Bytes
Samples/mParticle.MAUI.iOS.Sample/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
+942 Bytes
Samples/mParticle.MAUI.iOS.Sample/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>mParticle.MAUI.iOS.Sample</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>com.companyname.mParticle.MAUI.iOS.Sample</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,27 @@ | ||
<?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,9 @@ | ||
using UIKit; | ||
|
||
using mParticle.MAUI.iOS.Sample; | ||
|
||
// 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)); | ||
|
45 changes: 45 additions & 0 deletions
45
Samples/mParticle.MAUI.iOS.Sample/Resources/LaunchScreen.xib
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,45 @@ | ||
<?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> | ||
|
||
|
Oops, something went wrong.