-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unity Plugin v2.0.0 (Update iOS SDK to 7.2.2)
- Loading branch information
Showing
85 changed files
with
2,816 additions
and
705 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// | ||
// AMPBubbleView.h | ||
// Amplitude | ||
// | ||
// Copyright (c) 2020 Amplitude Inc. (https://amplitude.com/) | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
// in the Software without restriction, including without limitation the rights | ||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in | ||
// all copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
// THE SOFTWARE. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
#import <UIKit/UIKit.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface AMPBubbleView : UIView | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
2 changes: 1 addition & 1 deletion
2
...plitude/AMPLocationManagerDelegate.h.meta → ...lugins/iOS/Amplitude/AMPBubbleView.h.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
2 changes: 1 addition & 1 deletion
2
...plitude/AMPLocationManagerDelegate.m.meta → ...lugins/iOS/Amplitude/AMPBubbleView.m.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,38 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> | ||
<device id="retina6_1" orientation="portrait" appearance="light"/> | ||
<dependencies> | ||
<deployment identifier="iOS"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/> | ||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> | ||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
</dependencies> | ||
<objects> | ||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="AMPBubbleView"/> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> | ||
<view contentMode="scaleToFill" id="Mmh-9r-w4b"> | ||
<rect key="frame" x="0.0" y="0.0" width="414" height="528"/> | ||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||
<subviews> | ||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="logo-button.png" translatesAutoresizingMaskIntoConstraints="NO" id="hmO-o9-Njq"> | ||
<rect key="frame" x="187" y="244" width="40" height="40"/> | ||
<constraints> | ||
<constraint firstAttribute="width" constant="40" id="a6l-yI-MEY"/> | ||
<constraint firstAttribute="height" constant="40" id="xHf-Rm-QMQ"/> | ||
</constraints> | ||
</imageView> | ||
</subviews> | ||
<viewLayoutGuide key="safeArea" id="lWT-B1-1eZ"/> | ||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
<constraints> | ||
<constraint firstItem="hmO-o9-Njq" firstAttribute="centerY" secondItem="Mmh-9r-w4b" secondAttribute="centerY" id="Mym-Qv-9D3"/> | ||
<constraint firstItem="hmO-o9-Njq" firstAttribute="centerX" secondItem="Mmh-9r-w4b" secondAttribute="centerX" id="kRW-Gm-aWN"/> | ||
</constraints> | ||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> | ||
<point key="canvasLocation" x="111.59420289855073" y="-49.553571428571423"/> | ||
</view> | ||
</objects> | ||
<resources> | ||
<image name="logo-button.png" width="56" height="56"/> | ||
</resources> | ||
</document> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,78 @@ | ||
// | ||
// AMPConfigManager.m | ||
// Copyright (c) 2020 Amplitude Inc. (https://amplitude.com/) | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
// in the Software without restriction, including without limitation the rights | ||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in | ||
// all copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
// THE SOFTWARE. | ||
// | ||
|
||
#import "AMPConfigManager.h" | ||
#import "AMPConstants.h" | ||
|
||
@interface AMPConfigManager () | ||
|
||
@property (nonatomic, strong, readwrite) NSString *ingestionEndpoint; | ||
|
||
@end | ||
|
||
@implementation AMPConfigManager | ||
|
||
+ (instancetype)sharedInstance { | ||
static id instance; | ||
static dispatch_once_t onceToken; | ||
dispatch_once(&onceToken, ^{ | ||
instance = [[self alloc] init]; | ||
}); | ||
return instance; | ||
} | ||
|
||
- (instancetype)init { | ||
if ((self = [super init])) { | ||
self.ingestionEndpoint = kAMPEventLogUrl; | ||
} | ||
return self; | ||
} | ||
|
||
- (void)refresh:(void(^)(void))completionHandler { | ||
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:kAMPDyanmicConfigUrl]]; | ||
|
||
NSURLSession *session = [NSURLSession sharedSession]; | ||
NSURLSessionDataTask *task = [session dataTaskWithRequest:request | ||
completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) { | ||
if (!error) { | ||
NSError *jsonError = nil; | ||
NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&jsonError]; | ||
NSString *urlString = [dictionary objectForKey:@"ingestionEndpoint"]; | ||
if (urlString) { | ||
NSString *ingestionEndpoint = [NSString stringWithFormat:@"https://%@", urlString]; | ||
|
||
NSURL *url = [NSURL URLWithString:ingestionEndpoint]; | ||
if (url && url.scheme && url.host) { | ||
self.ingestionEndpoint = ingestionEndpoint; | ||
} | ||
} | ||
} else { | ||
// Error | ||
} | ||
|
||
completionHandler(); | ||
}]; | ||
[task resume]; | ||
} | ||
|
||
@end |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.