Skip to content

Commit 5e1c121

Browse files
committed
Merge pull request #3 from cheekiatng/MOD-1892
[MOD-1892] iOS8: replaced deprecated "backgroundSessionConfiguration:"
2 parents 0bae468 + 9e035bd commit 5e1c121

File tree

5 files changed

+35
-9
lines changed

5 files changed

+35
-9
lines changed

.travis.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,22 @@ install:
99
- curl -o install.sh https://raw.githubusercontent.com/appcelerator-modules/ci/master/travis/install.sh
1010
- source install.sh
1111
script:
12+
- ./build.sh
1213
- curl -o script.sh https://raw.githubusercontent.com/appcelerator-modules/ci/master/travis/script.sh
1314
- source script.sh
14-
after_success: # and this only on success
15-
- curl -o deploy.sh https://raw.githubusercontent.com/appcelerator-modules/ci/master/travis/deploy.sh
16-
- source deploy.sh
15+
- mkdir -p "$MODULE_ROOT/s3"
16+
- NOW=$(date +"%Y%m%d%H%M")
17+
- echo "cp -p \"${MODULE_ROOT}/build/${MODULE_NAME}-iphone-${MODULE_VERSION}.zip\" \"${MODULE_ROOT}/s3/${MODULE_NAME}-iphone-${MODULE_VERSION}-${TRAVIS_BRANCH}-${NOW}.zip\""
18+
- cp -p "${MODULE_ROOT}/build/${MODULE_NAME}-iphone-${MODULE_VERSION}.zip" "${MODULE_ROOT}/s3/${MODULE_NAME}-iphone-${MODULE_VERSION}-${TRAVIS_BRANCH}-${NOW}.zip"
19+
deploy:
20+
provider: s3
21+
access_key_id: AKIAJEU4ONO4EVCH6DRA
22+
secret_access_key:
23+
secure: DjoNYXNIjuURlV+tIXBJtaL6sZGI46OgT2IkYfk/iETBTz6QUUQnPcvkMjcl63TjVPKlcxwDswAy/iu7+vSg/VTZLk22PTGksPLJf/fV0BNnqlDWpBh8SIcdxoly0Kmwmf41KLG9lI/8IEi1zOL/x/qbA1nKN72RgiXmLISgFjM=
24+
upload-dir: modules/ti.urlsession
25+
bucket: builds.appcelerator.com
26+
local-dir: $TRAVIS_BUILD_DIR/s3/
27+
skip_cleanup: true
28+
on:
29+
repo: appcelerator-modules/ti.urlsession
30+
branch: master

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# urlSession iOS module.
44
#
5-
# Copyright (c) 2014 by Appcelerator, Inc. All Rights Reserved.
5+
# Copyright (c) 2014-2015 by Appcelerator, Inc. All Rights Reserved.
66
# Licensed under the terms of the Apache Public License.
77
# Please see the LICENSE included with this distribution for details.
88

@@ -13,7 +13,7 @@
1313

1414
declare -r build_dir="build"
1515
declare -r module_name="com.appcelerator.urlSession"
16-
declare -r module_version="1.1.0"
16+
declare -r module_version="1.1.1"
1717
declare -r library_name="lib${module_name}.a"
1818
declare -r library_path="ios/xcode/build/${library_name}"
1919
declare -r module_package_path="${build_dir}/modules/iphone/${module_name}/${module_version}"

ios/documentation/changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Change Log
22
<pre>
3+
4+
v1.1.1 Replaced deprecated backgroundSessionConfiguration with backgroundSessionConfigurationWithIdentifier. [MOD-1892]
5+
36
v1.1.0 Rebuilt for 64-bit using Hyperloop from May 12, 2014 (git hash b4dc4ae44d951ad5c65860543ac026fb54b419d1) [TIMOB-18090]
47

58
v1.0.1 Rebuilt using Hyperloop from May 12, 2014 (git hash b4dc4ae44d951ad5c65860543ac026fb54b419d1)

ios/manifest

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
# this is your module manifest and used by Titanium
33
# during compilation, packaging, distribution, etc.
44
#
5-
version: 1.1.0
5+
version: 1.1.1
66
apiversion: 2
77
architectures: i386 x86_64 armv7 arm64
88
description: Allows access to NSURLSession for background network sessions.
99
author: srahim
1010
license: Apache Public License v2
11-
copyright: Copyright (c) 2009-2013 by Appcelerator, Inc.
11+
copyright: Copyright (c) 2009-2015 by Appcelerator, Inc.
1212

1313

1414
# these should not be edited

ios/xcode/urlSession/src/js_Foundation/js_NSURLSessionConfiguration_P.m

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright (c) 2013 by Appcelerator, Inc. All Rights Reserved.
2+
* Copyright (c) 2013-2015 by Appcelerator, Inc. All Rights Reserved.
33
* Licensed under the terms of the Apache Public License
44
* Please see the LICENSE included with this distribution for details.
55
*
@@ -1920,7 +1920,16 @@ JSValueRef backgroundSessionConfigurationForNSURLSessionConfigurationConstructor
19201920
{
19211921
bool identifier$0$free = false;
19221922
NSString * identifier$0 = HyperloopJSValueRefToNSString(ctx,arguments[0],exception,&identifier$0$free);
1923-
NSURLSessionConfiguration * result$ = [NSURLSessionConfiguration backgroundSessionConfiguration:identifier$0];
1923+
NSURLSessionConfiguration * result$;
1924+
//check if >iOS8
1925+
if ([UIView instancesRespondToSelector:@selector(layoutMarginsDidChange)])
1926+
{
1927+
result$ = [NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:identifier$0];
1928+
}
1929+
else
1930+
{
1931+
result$ = [NSURLSessionConfiguration backgroundSessionConfiguration:identifier$0];
1932+
}
19241933
JSValueRef result = HyperloopNSURLSessionConfigurationToJSValueRef(ctx, result$);
19251934
if (identifier$0$free)
19261935
{

0 commit comments

Comments
 (0)