Skip to content

Commit

Permalink
Supports Swift 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
tetujin committed Nov 21, 2018
1 parent 922260c commit 2011f3f
Show file tree
Hide file tree
Showing 10 changed files with 100 additions and 167 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Carthage/Build
# Note: if you ignore the Pods directory, make sure to uncomment
# `pod install` in .travis.yml
#
Example/Pods
Example/Podfile.lock
Pods/
Podfile.lock
Pods/
com.awareframework.ios.sensor.magnetometer.xcworkspace/
# com.awareframework.ios.sensor.magnetometer.xcworkspace/
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# * https://www.objc.io/issues/6-build-tools/travis-ci/
# * https://github.com/supermarin/xcpretty#usage

osx_image: xcode7.3
osx_image: xcode10.1
language: objective-c
# cache: cocoapods
# podfile: Example/Podfile
podfile: Example/Podfile
# before_install:
# - gem install cocoapods # Since Travis is not always on latest version
# - pod install --project-directory=Example
script:
- set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/com.awareframework.ios.sensor.magnetometer.xcworkspace -scheme com.awareframework.ios.sensor.magnetometer-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty
- pod lib lint
- set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/com.awareframework.ios.sensor.magnetometer.xcworkspace -scheme com.awareframework.ios.sensor.magnetometer-Example -sdk iphonesimulator10.0 ONLY_ACTIVE_ARCH=NO | xcpretty
- pod lib lint --allow-warnings
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,8 @@
607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; };
607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; };
607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; };
607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; };
EC9A302C2C3B43D61E6B5BC7 /* Pods_com_awareframework_ios_sensor_magnetometer_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB709AD932E4A928BCB2DF6E /* Pods_com_awareframework_ios_sensor_magnetometer_Tests.framework */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 607FACC81AFB9204008FA782 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 607FACCF1AFB9204008FA782;
remoteInfo = com.awareframework.ios.sensor.magnetometer;
};
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
2C681EC0B5C4CDAB17028DA2 /* Pods-com.awareframework.ios.sensor.magnetometer_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-com.awareframework.ios.sensor.magnetometer_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-com.awareframework.ios.sensor.magnetometer_Example/Pods-com.awareframework.ios.sensor.magnetometer_Example.debug.xcconfig"; sourceTree = "<group>"; };
573841A55D19959ECE4D61CF /* Pods-com.awareframework.ios.sensor.magnetometer_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-com.awareframework.ios.sensor.magnetometer_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-com.awareframework.ios.sensor.magnetometer_Tests/Pods-com.awareframework.ios.sensor.magnetometer_Tests.debug.xcconfig"; sourceTree = "<group>"; };
Expand All @@ -37,13 +25,11 @@
607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
607FACE51AFB9204008FA782 /* com.awareframework.ios.sensor.magnetometer_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = com.awareframework.ios.sensor.magnetometer_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = "<group>"; };
7BCE819A2BB2741BBEF600BF /* Pods-com.awareframework.ios.sensor.magnetometer_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-com.awareframework.ios.sensor.magnetometer_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-com.awareframework.ios.sensor.magnetometer_Example/Pods-com.awareframework.ios.sensor.magnetometer_Example.release.xcconfig"; sourceTree = "<group>"; };
8133371A7168CAA5F8EEB9B1 /* Pods_com_awareframework_ios_sensor_magnetometer_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_com_awareframework_ios_sensor_magnetometer_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
BDC90A7A9793C44838ED7DA2 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
DB709AD932E4A928BCB2DF6E /* Pods_com_awareframework_ios_sensor_magnetometer_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_com_awareframework_ios_sensor_magnetometer_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
E18E8290A0994804BC467432 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
F3FD70760ABD87C95B1DD33C /* com.awareframework.ios.sensor.magnetometer.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = com.awareframework.ios.sensor.magnetometer.podspec; path = ../com.awareframework.ios.sensor.magnetometer.podspec; sourceTree = "<group>"; };
FF9714D43A4F9A99E9E8B4BF /* Pods-com.awareframework.ios.sensor.magnetometer_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-com.awareframework.ios.sensor.magnetometer_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-com.awareframework.ios.sensor.magnetometer_Tests/Pods-com.awareframework.ios.sensor.magnetometer_Tests.release.xcconfig"; sourceTree = "<group>"; };
Expand All @@ -58,14 +44,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
607FACE21AFB9204008FA782 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
EC9A302C2C3B43D61E6B5BC7 /* Pods_com_awareframework_ios_sensor_magnetometer_Tests.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
Expand All @@ -84,7 +62,6 @@
isa = PBXGroup;
children = (
8133371A7168CAA5F8EEB9B1 /* Pods_com_awareframework_ios_sensor_magnetometer_Example.framework */,
DB709AD932E4A928BCB2DF6E /* Pods_com_awareframework_ios_sensor_magnetometer_Tests.framework */,
);
name = Frameworks;
sourceTree = "<group>";
Expand All @@ -105,7 +82,6 @@
isa = PBXGroup;
children = (
607FACD01AFB9204008FA782 /* com.awareframework.ios.sensor.magnetometer_Example.app */,
607FACE51AFB9204008FA782 /* com.awareframework.ios.sensor.magnetometer_Tests.xctest */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -181,25 +157,6 @@
productReference = 607FACD01AFB9204008FA782 /* com.awareframework.ios.sensor.magnetometer_Example.app */;
productType = "com.apple.product-type.application";
};
607FACE41AFB9204008FA782 /* com.awareframework.ios.sensor.magnetometer_Tests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "com.awareframework.ios.sensor.magnetometer_Tests" */;
buildPhases = (
A50EE5426899D5AAF748DB85 /* [CP] Check Pods Manifest.lock */,
607FACE11AFB9204008FA782 /* Sources */,
607FACE21AFB9204008FA782 /* Frameworks */,
607FACE31AFB9204008FA782 /* Resources */,
);
buildRules = (
);
dependencies = (
607FACE71AFB9204008FA782 /* PBXTargetDependency */,
);
name = com.awareframework.ios.sensor.magnetometer_Tests;
productName = Tests;
productReference = 607FACE51AFB9204008FA782 /* com.awareframework.ios.sensor.magnetometer_Tests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
Expand All @@ -215,11 +172,6 @@
DevelopmentTeam = FH352PYMNC;
LastSwiftMigration = 0900;
};
607FACE41AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
LastSwiftMigration = 0900;
TestTargetID = 607FACCF1AFB9204008FA782;
};
};
};
buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "com.awareframework.ios.sensor.magnetometer" */;
Expand All @@ -236,7 +188,6 @@
projectRoot = "";
targets = (
607FACCF1AFB9204008FA782 /* com.awareframework.ios.sensor.magnetometer_Example */,
607FACE41AFB9204008FA782 /* com.awareframework.ios.sensor.magnetometer_Tests */,
);
};
/* End PBXProject section */
Expand All @@ -252,38 +203,9 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
607FACE31AFB9204008FA782 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
A50EE5426899D5AAF748DB85 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-com.awareframework.ios.sensor.magnetometer_Tests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
E309A54DD9271BB65959C2CC /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -352,24 +274,8 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
607FACE11AFB9204008FA782 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
607FACEC1AFB9204008FA782 /* Tests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
607FACE71AFB9204008FA782 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 607FACCF1AFB9204008FA782 /* com.awareframework.ios.sensor.magnetometer_Example */;
targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
607FACD91AFB9204008FA782 /* Main.storyboard */ = {
isa = PBXVariantGroup;
Expand Down Expand Up @@ -523,46 +429,6 @@
};
name = Release;
};
607FACF31AFB9204008FA782 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 573841A55D19959ECE4D61CF /* Pods-com.awareframework.ios.sensor.magnetometer_Tests.debug.xcconfig */;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/com.awareframework.ios.sensor.magnetometer_Example.app/com.awareframework.ios.sensor.magnetometer_Example";
};
name = Debug;
};
607FACF41AFB9204008FA782 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = FF9714D43A4F9A99E9E8B4BF /* Pods-com.awareframework.ios.sensor.magnetometer_Tests.release.xcconfig */;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
INFOPLIST_FILE = Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/com.awareframework.ios.sensor.magnetometer_Example.app/com.awareframework.ios.sensor.magnetometer_Example";
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
Expand All @@ -584,15 +450,6 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "com.awareframework.ios.sensor.magnetometer_Tests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
607FACF31AFB9204008FA782 /* Debug */,
607FACF41AFB9204008FA782 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 607FACC81AFB9204008FA782 /* Project object */;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -40,7 +40,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
Expand Down Expand Up @@ -70,7 +69,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?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>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ class ViewController: UIViewController {
}

class Observer:MagnetometerObserver {
func onChanged(data: MagnetometerData) {

func onDataChanged(data: MagnetometerData) {
print(data)
}
}
Expand Down
Loading

0 comments on commit 2011f3f

Please sign in to comment.