Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Merge branch 'release/v1.0-beta.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
lumaxis committed Aug 7, 2015
2 parents 3139757 + 7bcf462 commit 1105738
Show file tree
Hide file tree
Showing 80 changed files with 768 additions and 555 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
language: objective-c
osx_image: beta-xcode6.3
osx_image: xcode6.4

env:
global:
- PROJECT="Support/ApplicationInsights.xcodeproj"
- SDK="iphonesimulator8.3"
- SDK="iphonesimulator"

matrix:
- SCHEME="ApplicationInsights" DESTINATION="OS=7.1,name=iPad 2" CONFIGURATION="Debug" RUN_TESTS="YES" POD_LINT="NO" XCODEBUILD_GCC_PREPROCESSOR_DEFINITIONS="CI=1"
Expand All @@ -25,7 +25,8 @@ before_install:

notifications:
slack:
secure: dCzA1+dtjKkHk2PK6RWBSE0Obgf0CvIejhXXH4Aba29zfVQg5Bv0yWJ34YHnPMFPA7+eyFrW2TqGqI7gA7L7Ju0RWHwu9Z0XayCcMpOCZVKTOSf/7SrAvtODKNzAT/S55HZOaj8yxK6l5a0cMGXfGM7j+NLdkjyba7ypQKsn0ug=
rooms:
- secure: dCzA1+dtjKkHk2PK6RWBSE0Obgf0CvIejhXXH4Aba29zfVQg5Bv0yWJ34YHnPMFPA7+eyFrW2TqGqI7gA7L7Ju0RWHwu9Z0XayCcMpOCZVKTOSf/7SrAvtODKNzAT/S55HZOaj8yxK6l5a0cMGXfGM7j+NLdkjyba7ypQKsn0ug=
on_success: change
on_failure: always

Expand Down
2 changes: 1 addition & 1 deletion ApplicationInsights.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "ApplicationInsights"
s.version = "1.0-beta.5"
s.version = "1.0-beta.6"
s.summary = "Microsoft Application Insights SDK for iOS"
s.description = <<-DESC
Application Insights is a service that allows developers to keep their applications available, performant, and successful.
Expand Down
107 changes: 107 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
## 1.0-beta.6 (7/8/2015)

* Add CHANGELOG.md
* Update contract files to match newest schema version
* Removed previously deprecated methods to set a custom userID
* Minor bugfixes and improvements

## 1.0-beta.5 (6/7/2014)

* Important improvements to crash reports.
* We now filter some pageviews from standard view controllers in order to reduce noise and make pageviews more useful.
* Smaller refactorings and improvements.

## 1.0-beta.4 (23/6/2015)

* Allow for easier integration in most projects using the `@import ApplicationInsights;` syntax. This makes manual linking of system frameworks unnecessary!
* Add feature to set common properties that will apply to all telemetry data items.

```objectivec
[MSAITelemetryManager setCommonProperties:@{@"custom info":@"some value"}];
```

* Allow for further customization of user context fields.
Note that this means that the old way of setting the user ID, `setUserId:`, is now deprecated!

```objectivec
[[MSAIApplicationInsights sharedInstance] setUserWithConfigurationBlock:^(MSAIUser *user) {
user.userId = @"your_user_id";
user.accountId = @"user@example.com";
}];
```

* Add support for unhandled C++ exceptions
* Switch to sending data in JSON Stream format to improve compatibility with different server backends.
* Improve crash reports by sending additional exception information.
* Add instructions to Readme about how to setup the SDK with WatchKit extensions.
* Add logging incase the developer tries to send objects that are not NSJSONSerialization compatible.
* Fix issues with the backwars compatiblity of the nullability annotation.
* Various other small improvements and fixes.

## 1.0-beta.3 (8/5/2015)

* Add new API to be able to manually set session and user IDs.

``` objectivec
[MSAIApplicationInsights setUserId:@"your_user_id"];
[MSAIApplicationInsights renewSessionWithId:@"4815162342"];
```

* Allow to specify the amount of time that an app has to have been in the background before a new session is triggered.

``` objectivec
[MSAIApplicationInsights setAppBackgroundTimeBeforeSessionExpires:60];
```

* Make our sending-retry policy more robust and only delete data on unrecoverable HTTP status codes.
* Trigger saving of queued-up date when the app goes to the background since then there is a high probability it might be removed from memory by the OS.
* Add our Xcode docset part of the downloaded archive.
* Several small fixes, cleanups and optimizations under the hood.

## 1.0-beta.2 (28/4/2015)

* The size of the devices screen is now reported in physical pixels
* Renamed umbrella-class and product to **ApplicationInsights**
* Cleaned up code
* Removed previously deprecated methods and classes
* The order of stackframes is now reversed to appear in the portal correctly
* Developer Mode for more ease during development/debugging
* Includes Nullability warnings (learn more readin ([Apple's own blogpost]("https://developer.apple.com/swift/blog/?id=25") about this)
* Add gzip-support to dramatically decrease data volume used to send data to the server
* _Developer mode_ for ease of debugging
* Setting a custom server now requires the complete URL to the server (e.g. https://yourdomin/something/tracking/)

### Breaking Changes

Starting with the first 1.0 stable release, we will start deprecating API instead of breaking old ones.

* **[1.0-beta.2]** ```MSAIAppInsights``` was the the central entry-point to use the Application Insights SDK. It has been renamed to ```MSAIApplicationInsights```.
* **[1.0-beta.2]** Setting the custom server URL now requires the complete URL to the server

## 1.0-beta.1 (10/4/2015)

- Add a mechanism to try and save not-yet-persisted events if the containing app crashes. The events will then be sent on next app start.
- Simplify the way session IDs are handled in the background and make it more consistent.
- Fix spelling in different places.
* Please note: `trackEventWithName:properties:mesurements:` is now deprecated and replaced by `trackEventWithName:properties:measurements:`
- Improve error logging when errors occur during sending. (Enable debug logging to see these)
- Update the way we save data in the keychain for maximum compatibility.
- Extend guides to add `Security` system framework.

## 1.0-alpha.3 (26/3/2015)

- Performance improvements
- Expose configuarations:
* Set serverURL programmatically
* Automatic page view tracking
* Set instrumentation key programmatically
- Bug fixes
* Use session id of previous session for crashes
* Session context for page views
* Prevent SDK from crashing if too many events are tracked
- Add user context to payload
- Breaking change: Rename MSAIMetricsManager to MSAITelemetryManager

## 1.0-alpha.2 (25/2/2015)

This pre-release version of the AppInsights iOS SDK adds crash reporting as a feature, as well as lots of improvements and enhancements around our abilities to send metrics data.
6 changes: 3 additions & 3 deletions Classes/MSAIApplication.h
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

@interface MSAIApplication : MSAIObject <NSCoding>

@property (nonatomic, strong) NSString *version;
@property (nonatomic, copy) NSString *version;
@property (nonatomic, copy) NSString *build;
@property (nonatomic, copy) NSString *typeId;

- (instancetype)initWithCoder:(NSCoder *)coder;

- (void)encodeWithCoder:(NSCoder *)coder;


@end
26 changes: 15 additions & 11 deletions Classes/MSAIApplication.m
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@
/// Data contract class for type Application.
@implementation MSAIApplication

/// Initializes a new instance of the class.
- (instancetype)init {
if (self = [super init]) {
}
return self;
}

///
/// Adds all members of this class to a dictionary
/// @param dictionary to which the members of this class will be added.
Expand All @@ -20,22 +13,33 @@ - (MSAIOrderedDictionary *)serializeToDictionary {
if (self.version != nil) {
[dict setObject:self.version forKey:@"ai.application.ver"];
}
return dict;
if (self.build != nil) {
[dict setObject:self.build forKey:@"ai.application.build"];
}
if (self.typeId != nil) {
[dict setObject:self.typeId forKey:@"ai.application.typeId"];
}
return dict;
}

#pragma mark - NSCoding

- (instancetype)initWithCoder:(NSCoder *)coder {
self = [super init];
if(self) {
self.version = [coder decodeObjectForKey:@"self.version"];
self = [super initWithCoder:coder];
if (self) {
_version = [coder decodeObjectForKey:@"self.version"];
_build = [coder decodeObjectForKey:@"self.build"];
_typeId = [coder decodeObjectForKey:@"self.typeId"];
}

return self;
}

- (void)encodeWithCoder:(NSCoder *)coder {
[super encodeWithCoder:coder];
[coder encodeObject:self.version forKey:@"self.version"];
[coder encodeObject:self.build forKey:@"self.build"];
[coder encodeObject:self.typeId forKey:@"self.typeId"];
}


Expand Down
18 changes: 1 addition & 17 deletions Classes/MSAIApplicationInsights.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ NS_ASSUME_NONNULL_BEGIN
* If you set your custom server URL, make sure you set the full URL (e.g. https://yourdomain.com/track/)
* @warning This property needs to be set before calling `start`.
*/
@property (nonatomic, strong) NSString *serverURL;
@property (nonatomic, copy) NSString *serverURL;

#if MSAI_FEATURE_CRASH_REPORTER

Expand Down Expand Up @@ -162,22 +162,6 @@ NS_ASSUME_NONNULL_BEGIN
*/
+ (void)setAutoSessionManagementDisabled:(BOOL)autoSessionManagementDisabled;

/**
* Manually set the current user ID. This ID will automatically be persisted and attached to all appropriate telemetry and crash events.
* The user ID will stay the same until it is changed.
*
* @param userId The string which will be used as the current user's ID.
*/
+ (void)setUserId:(NSString *)userId __deprecated_msg("Use setUserWithConfigurationBlock: instead!");

/**
* Manually set the current user ID. This ID will automatically be persisted and attached to all appropriate telemetry and crash events.
* The user ID will stay the same until it is changed.
*
* @param userId The string which will be used as the current user's ID.
*/
- (void)setUserId:(NSString *)userId __deprecated_msg("Use setUserWithConfigurationBlock: instead!");

/**
* Use this method to configure the current user's context.
*
Expand Down
8 changes: 0 additions & 8 deletions Classes/MSAIApplicationInsights.m
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,6 @@ + (NSString *)build {

#pragma mark - Context meta data

+ (void)setUserId:(NSString *)userId {
[[self sharedInstance] setUserId:userId];
}

- (void)setUserId:(NSString *)userId {
[[MSAIContextHelper sharedInstance] setCurrentUserId:userId];
}

+ (void)setUserWithConfigurationBlock:(void (^)(MSAIUser *user))userConfigurationBlock {
[[self sharedInstance] setUserWithConfigurationBlock:userConfigurationBlock];
}
Expand Down
18 changes: 18 additions & 0 deletions Classes/MSAIAvailabilityData.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#import "MSAITestResult.h"
#import "MSAIObject.h"
#import "MSAITelemetryData.h"
#import "MSAIDomain.h"

@interface MSAIAvailabilityData : MSAIDomain <NSCoding>

@property (nonatomic, copy) NSString *testRunId;
@property (nonatomic, copy) NSString *testTimeStamp;
@property (nonatomic, copy) NSString *testName;
@property (nonatomic, copy) NSString *duration;
@property (nonatomic, strong) MSAITestResult *result;
@property (nonatomic, copy) NSString *runLocation;
@property (nonatomic, copy) NSString *message;
@property (nonatomic, copy) NSNumber *dataSize;
@property (nonatomic, strong) NSDictionary *measurements;

@end
83 changes: 83 additions & 0 deletions Classes/MSAIAvailabilityData.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#import "MSAIAvailabilityData.h"
/// Data contract class for type AvailabilityData.
@implementation MSAIAvailabilityData

/// Initializes a new instance of the class.
- (instancetype)init {
if(self = [super init]) {
self.version = @2;
self.properties = [NSDictionary new];
self.measurements = [NSDictionary new];
}
return self;
}

///
/// Adds all members of this class to a dictionary
/// @param dictionary to which the members of this class will be added.
///
- (MSAIOrderedDictionary *)serializeToDictionary {
MSAIOrderedDictionary *dict = [super serializeToDictionary];
if(self.testRunId != nil) {
[dict setObject:self.testRunId forKey:@"testRunId"];
}
if(self.testTimeStamp != nil) {
[dict setObject:self.testTimeStamp forKey:@"testTimeStamp"];
}
if(self.testName != nil) {
[dict setObject:self.testName forKey:@"testName"];
}
if(self.duration != nil) {
[dict setObject:self.duration forKey:@"duration"];
}
[dict setObject:[NSNumber numberWithInt:(int)self.result] forKey:@"result"];
if(self.runLocation != nil) {
[dict setObject:self.runLocation forKey:@"runLocation"];
}
if(self.message != nil) {
[dict setObject:self.message forKey:@"message"];
}
if(self.dataSize != nil) {
[dict setObject:self.dataSize forKey:@"dataSize"];
}
if(self.properties != nil) {
[dict setObject:self.properties forKey:@"properties"];
}
if(self.measurements != nil) {
[dict setObject:self.measurements forKey:@"measurements"];
}
return dict;
}

#pragma mark - NSCoding

- (id)initWithCoder:(NSCoder *)coder {
self = [super initWithCoder:coder];
if(self) {
self.testRunId = [coder decodeObjectForKey:@"self.testRunId"];
self.testTimeStamp = [coder decodeObjectForKey:@"self.testTimeStamp"];
self.testName = [coder decodeObjectForKey:@"self.testName"];
self.duration = [coder decodeObjectForKey:@"self.duration"];
self.result = [coder decodeObjectForKey:@"self.result"];
self.runLocation = [coder decodeObjectForKey:@"self.runLocation"];
self.message = [coder decodeObjectForKey:@"self.message"];
self.dataSize = [coder decodeObjectForKey:@"self.dataSize"];
self.measurements = [coder decodeObjectForKey:@"self.measurements"];
}
return self;
}

- (void)encodeWithCoder:(NSCoder *)coder {
[super encodeWithCoder:coder];
[coder encodeObject:self.testRunId forKey:@"self.testRunId"];
[coder encodeObject:self.testTimeStamp forKey:@"self.testTimeStamp"];
[coder encodeObject:self.testName forKey:@"self.testName"];
[coder encodeObject:self.duration forKey:@"self.duration"];
[coder encodeObject:self.result forKey:@"self.result"];
[coder encodeObject:self.runLocation forKey:@"self.runLocation"];
[coder encodeObject:self.message forKey:@"self.message"];
[coder encodeObject:self.dataSize forKey:@"self.dataSize"];
[coder encodeObject:self.measurements forKey:@"self.measurements"];
}

@end
2 changes: 1 addition & 1 deletion Classes/MSAIBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

@interface MSAIBase : MSAITelemetryData <NSCoding>

@property (nonatomic, strong) NSString *baseType;
@property (nonatomic, copy) NSString *baseType;

- (instancetype)initWithCoder:(NSCoder *)coder;

Expand Down
9 changes: 1 addition & 8 deletions Classes/MSAIBase.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@
/// Data contract class for type Base.
@implementation MSAIBase

/// Initializes a new instance of the class.
- (instancetype)init {
if (self = [super init]) {
}
return self;
}

///
/// Adds all members of this class to a dictionary
/// @param dictionary to which the members of this class will be added.
Expand All @@ -28,7 +21,7 @@ - (MSAIOrderedDictionary *)serializeToDictionary {
- (instancetype)initWithCoder:(NSCoder *)coder {
self = [super initWithCoder:coder];
if(self) {
self.baseType = [coder decodeObjectForKey:@"self.baseType"];
_baseType = [coder decodeObjectForKey:@"self.baseType"];
}

return self;
Expand Down
Loading

0 comments on commit 1105738

Please sign in to comment.