Skip to content

Commit

Permalink
Merge pull request #506 from snowplow/release/1.3.0
Browse files Browse the repository at this point in the history
Release/1.3.0
  • Loading branch information
AlexBenny authored Apr 22, 2020
2 parents 6cb20ab + 36bc2ae commit 8c87e99
Show file tree
Hide file tree
Showing 183 changed files with 7,844 additions and 3,265 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Cocoapods
# Ignore Pods folder
**/Pods/** linguist-generated

7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: objective-c
osx_image: xcode11.3
osx_image: xcode11.4

env:
global:
Expand Down Expand Up @@ -28,3 +28,8 @@ jobs:

- name: "Test Snowplow Swift demo app using Cocoapods (use_modular_headers! directive)"
script: .travis/test_ios_demo.sh SnowplowSwiftCocoapodsDemo Podfile_modular_headers "${BUILD_WORKSPACE_SWIFT_DEMO}" "${BUILD_DEST_IOS}" "${BUILD_SCHEME_SWIFT_DEMO_IOS}" "${BUILD_DEST_PAIRED}" "${BUILD_SCHEME_SWIFT_DEMO_WATCH}"

- name: "Test Snowplow Swift demo app using Swift Package Manager"
script: .travis/test_ios_demo.sh SnowplowSwiftSPMDemo SPM "${BUILD_PROJECT_SWIFT_SPM_DEMO}" "${BUILD_DEST_IOS}" "${BUILD_SCHEME_SWIFT_SPM_DEMO_IOS}"


10 changes: 7 additions & 3 deletions .travis/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ fi

printf "\n\n Setup env variables \n"

BUILD_DEST_IOS="platform=iOS Simulator,OS=13.3,name=iPhone 11 Pro"
BUILD_DEST_PAIRED="platform=iOS Simulator,OS=13.3,name=iPhone 11 Pro"
BUILD_DEST_WATCH="platform=watchOS Simulator,OS=6.1.1,name=Apple Watch Series 5 - 44mm"
BUILD_DEST_IOS="platform=iOS Simulator,OS=13.4,name=iPhone 11 Pro"
BUILD_DEST_PAIRED="platform=iOS Simulator,OS=13.4,name=iPhone 11 Pro"
BUILD_DEST_WATCH="platform=watchOS Simulator,OS=6.2,name=Apple Watch Series 5 - 44mm"

BUILD_PROJECT_LIB="-project Snowplow.xcodeproj"
BUILD_SCHEME_LIB_IOS="-scheme Snowplow-iOS"
Expand All @@ -29,3 +29,7 @@ BUILD_PROJECT_SWIFT_DEMO="-project SnowplowSwiftDemo.xcodeproj"
BUILD_SCHEME_SWIFT_DEMO_IOS="-scheme SnowplowSwiftDemo"
BUILD_SCHEME_SWIFT_DEMO_WATCH="-scheme SnowplowSwiftWatch"

BUILD_PROJECT_SWIFT_SPM_DEMO="-project SnowplowSwiftSPMDemo.xcodeproj"
BUILD_SCHEME_SWIFT_SPM_DEMO_IOS="-scheme SnowplowSwiftSPMDemo"


1 change: 1 addition & 0 deletions .travis/test_framework.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
set -e

PROJECT=$1
DEST_IOS=$2
Expand Down
9 changes: 8 additions & 1 deletion .travis/test_ios_demo.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
set -e

APP=$1
DEP_FILE=$2
Expand All @@ -12,7 +13,10 @@ if [ $DEP_FILE == "Cartfile" ]; then
printf "\n\n Carthage update \n"
cd Examples/$APP
./generateCartfile.sh
carthage update
carthage update
elif [ $DEP_FILE == "SPM" ]; then
printf "\n\n Swift Package Manager \n"
cd Examples/$APP
elif [ $DEP_FILE == "Podfile" ]; then
printf "\n\n Pod update \n"
cd Examples/$APP
Expand All @@ -34,3 +38,6 @@ if [ ! -z "$SCHEME_WATCH" ]; then
printf "\n\n Build watchOS ${APP} \n"
set -o pipefail && xcodebuild -destination "${DEST_WATCH}" ${PROJECT} ${SCHEME_WATCH} clean build | xcpretty
fi



13 changes: 13 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
Version 1.3.0 (2020-04-21)
--------------------------
Swift Package Manager unable to find headers on subfolders (#503) (Contribution of @vauxhall)
Replace deprecated CTTelephonyNetworkInfo methods (#479)
Fix deprecated CFURLCreateStringByAddingPercentEscapes (#493)
Fix deprecated keyWindow (#492)
Update Technical Docs link (#443)
Update copyright (#499)
Add GDPR context (#425)
Add support for global contexts (#357)
Add Swift Package Manager support (#474) (Contribution of @vauxhall)
Events processing refactoring (#489)

Version 1.2.2 (2020-03-04)
--------------------------
Fix failing test about ScreenContext (#486)
Expand Down
18 changes: 16 additions & 2 deletions Examples/CommonSwiftCode/AdditionalViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,22 @@
// AdditionalViewController.swift
// SnowplowSwiftDemo
//
// Created by Michael Hadam on 4/12/19.
// Copyright © 2019 snowplowanalytics. All rights reserved.
// Copyright (c) 2015-2020 Snowplow Analytics Ltd. All rights reserved.
//
// This program is licensed to you under the Apache License Version 2.0,
// and you may not use this file except in compliance with the Apache License
// Version 2.0. You may obtain a copy of the Apache License Version 2.0 at
// http://www.apache.org/licenses/LICENSE-2.0.
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the Apache License Version 2.0 is distributed on
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
// express or implied. See the Apache License Version 2.0 for the specific
// language governing permissions and limitations there under.
//
// Authors: Michael Hadam
// Copyright: Copyright (c) 2015-2020 Snowplow Analytics Ltd
// License: Apache License Version 2.0
//

import Foundation
Expand Down
20 changes: 17 additions & 3 deletions Examples/CommonSwiftCode/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,22 @@
// AppDelegate.swift
// SnowplowSwiftDemo
//
// Created by Michael Hadam on 1/17/18.
// Copyright © 2018 snowplowanalytics. All rights reserved.
// Copyright (c) 2015-2020 Snowplow Analytics Ltd. All rights reserved.
//
// This program is licensed to you under the Apache License Version 2.0,
// and you may not use this file except in compliance with the Apache License
// Version 2.0. You may obtain a copy of the Apache License Version 2.0 at
// http://www.apache.org/licenses/LICENSE-2.0.
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the Apache License Version 2.0 is distributed on
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
// express or implied. See the Apache License Version 2.0 for the specific
// language governing permissions and limitations there under.
//
// Authors: Michael Hadam
// Copyright: Copyright (c) 2015-2020 Snowplow Analytics Ltd
// License: Apache License Version 2.0
//

import UIKit
Expand Down Expand Up @@ -43,7 +57,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
builder!.setTitle(requestContent.title)
builder!.setSubtitle(requestContent.subtitle)
builder!.setBody(requestContent.body)
builder!.setBadge(requestContent.badge)
builder!.setBadge(requestContent.badge!)
builder!.setSound(sound)
builder!.setLaunchImageName(requestContent.launchImageName)
builder!.setUserInfo(userInfo)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
Expand Down Expand Up @@ -36,6 +46,16 @@
"filename" : "logo-white-180.png",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
Expand Down Expand Up @@ -71,6 +91,16 @@
"idiom" : "ipad",
"filename" : "logo-white-152.png",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
Expand Down
24 changes: 19 additions & 5 deletions Examples/CommonSwiftCode/DemoUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,22 @@
// DemoUtils.swift
// SnowplowSwiftDemo
//
// Created by Michael Hadam on 1/19/18.
// Copyright © 2018 snowplowanalytics. All rights reserved.
// Copyright (c) 2015-2020 Snowplow Analytics Ltd. All rights reserved.
//
// This program is licensed to you under the Apache License Version 2.0,
// and you may not use this file except in compliance with the Apache License
// Version 2.0. You may obtain a copy of the Apache License Version 2.0 at
// http://www.apache.org/licenses/LICENSE-2.0.
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the Apache License Version 2.0 is distributed on
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
// express or implied. See the Apache License Version 2.0 for the specific
// language governing permissions and limitations there under.
//
// Authors: Michael Hadam
// Copyright: Copyright (c) 2015-2020 Snowplow Analytics Ltd
// License: Apache License Version 2.0
//

import Foundation
Expand Down Expand Up @@ -54,10 +68,10 @@ class DemoUtils {

static func trackPageViewWithTracker(_ tracker: SPTracker) {
let data: NSDictionary = [ "targetUrl": "http://a-target-url.com"]
let sdj = SPSelfDescribingJson(schema: "iglu:com.snowplowanalytics.snowplow/link_click/jsonschema/1-0-1", andData: data);
let sdj = SPSelfDescribingJson(schema: "iglu:com.snowplowanalytics.snowplow/link_click/jsonschema/1-0-1", andData: data)!

var event = SPUnstructured.build({ (builder : SPUnstructuredBuilder?) -> Void in
builder!.setEventData(sdj!)
builder!.setEventData(sdj)
})
tracker.trackUnstructuredEvent(event)

Expand Down Expand Up @@ -113,7 +127,7 @@ class DemoUtils {
builder!.setPrice(0.75)
builder!.setQuantity(1)
builder!.setCurrency("USD")
})! ]
}) ]

var event = SPEcommerce.build({ (builder : SPEcommTransactionBuilder?) -> Void in
builder!.setOrderId(transactionID)
Expand Down
18 changes: 16 additions & 2 deletions Examples/CommonSwiftCode/DemoViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,22 @@
// ViewController.swift
// SnowplowSwiftDemo
//
// Created by Michael Hadam on 1/17/18.
// Copyright © 2018 snowplowanalytics. All rights reserved.
// Copyright (c) 2015-2020 Snowplow Analytics Ltd. All rights reserved.
//
// This program is licensed to you under the Apache License Version 2.0,
// and you may not use this file except in compliance with the Apache License
// Version 2.0. You may obtain a copy of the Apache License Version 2.0 at
// http://www.apache.org/licenses/LICENSE-2.0.
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the Apache License Version 2.0 is distributed on
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
// express or implied. See the Apache License Version 2.0 for the specific
// language governing permissions and limitations there under.
//
// Authors: Michael Hadam
// Copyright: Copyright (c) 2015-2020 Snowplow Analytics Ltd
// License: Apache License Version 2.0
//

import UIKit
Expand Down
18 changes: 16 additions & 2 deletions Examples/CommonSwiftCode/ExtensionDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,22 @@
// ExtensionDelegate.swift
// SnowplowSwiftDemoWatch WatchKit Extension
//
// Created by Leo Mehlig on 12.11.19.
// Copyright © 2019 snowplowanalytics. All rights reserved.
// Copyright (c) 2015-2020 Snowplow Analytics Ltd. All rights reserved.
//
// This program is licensed to you under the Apache License Version 2.0,
// and you may not use this file except in compliance with the Apache License
// Version 2.0. You may obtain a copy of the Apache License Version 2.0 at
// http://www.apache.org/licenses/LICENSE-2.0.
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the Apache License Version 2.0 is distributed on
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
// express or implied. See the Apache License Version 2.0 for the specific
// language governing permissions and limitations there under.
//
// Authors: Leo Mehlig
// Copyright: Copyright (c) 2015-2020 Snowplow Analytics Ltd
// License: Apache License Version 2.0
//

import WatchKit
Expand Down
19 changes: 17 additions & 2 deletions Examples/CommonSwiftCode/InterfaceController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,22 @@
// InterfaceController.swift
// SnowplowSwiftDemoWatch WatchKit Extension
//
// Created by Leo Mehlig on 12.11.19.
// Copyright © 2019 snowplowanalytics. All rights reserved.
// Copyright (c) 2015-2020 Snowplow Analytics Ltd. All rights reserved.
//
// This program is licensed to you under the Apache License Version 2.0,
// and you may not use this file except in compliance with the Apache License
// Version 2.0. You may obtain a copy of the Apache License Version 2.0 at
// http://www.apache.org/licenses/LICENSE-2.0.
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the Apache License Version 2.0 is distributed on
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
// express or implied. See the Apache License Version 2.0 for the specific
// language governing permissions and limitations there under.
//
// Authors: Leo Mehlig
// Copyright: Copyright (c) 2015-2020 Snowplow Analytics Ltd
// License: Apache License Version 2.0
//

import WatchKit
Expand Down Expand Up @@ -39,6 +53,7 @@ class InterfaceController: WKInterfaceController, SPRequestCallback {
builder!.setApplicationContext(true)
builder!.setExceptionEvents(true)
builder!.setInstallEvent(true)
builder!.setGdprContextWith(SPGdprProcessingBasis.consent, documentId: "id", documentVersion: "1.0", documentDescription: "description")
})
return newTracker!
}
Expand Down
18 changes: 16 additions & 2 deletions Examples/CommonSwiftCode/MetricsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,22 @@
// SecondViewController.swift
// SnowplowSwiftDemo
//
// Created by Michael Hadam on 3/3/19.
// Copyright © 2019 snowplowanalytics. All rights reserved.
// Copyright (c) 2015-2020 Snowplow Analytics Ltd. All rights reserved.
//
// This program is licensed to you under the Apache License Version 2.0,
// and you may not use this file except in compliance with the Apache License
// Version 2.0. You may obtain a copy of the Apache License Version 2.0 at
// http://www.apache.org/licenses/LICENSE-2.0.
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the Apache License Version 2.0 is distributed on
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
// express or implied. See the Apache License Version 2.0 for the specific
// language governing permissions and limitations there under.
//
// Authors: Michael Hadam
// Copyright: Copyright (c) 2015-2020 Snowplow Analytics Ltd
// License: Apache License Version 2.0
//

import UIKit
Expand Down
Loading

0 comments on commit 8c87e99

Please sign in to comment.