Browse Source

chore: 🤖 update to xcode 11.2 and swift 5

Ref: #3
master
Josh Habdas 1 year ago
parent
commit
4b7178e9e7
Signed by: jhabdas GPG Key ID: B148B31154C75A74
8 changed files with 9802 additions and 2033 deletions
  1. +5
    -1
      Podfile.lock
  2. +1
    -1
      README.md
  3. +69
    -16
      WLPN.xcodeproj/project.pbxproj
  4. +10
    -14
      WLPN.xcodeproj/xcshareddata/xcschemes/WLPN.xcscheme
  5. +8
    -0
      WLPN.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  6. +4
    -2
      iOS/Classes/AudioManager.m
  7. +6
    -6
      iOS/Classes/RootViewController.swift
  8. +9699
    -1993
      npm-shrinkwrap.json

+ 5
- 1
Podfile.lock View File

@ -4,9 +4,13 @@ PODS:
DEPENDENCIES:
- StreamingKit (~> 0.1)
SPEC REPOS:
https://github.com/cocoapods/specs.git:
- StreamingKit
SPEC CHECKSUMS:
StreamingKit: f00c054cfd0f59d88c8be7a2270e208302ce48c4
PODFILE CHECKSUM: ccf5729fe1c31145c41ef80addaf6d4374c37c12
COCOAPODS: 1.0.1
COCOAPODS: 1.5.2

+ 1
- 1
README.md View File

@ -28,7 +28,7 @@ Never listen to a radio commercial again. The free [Lumpen Radio app](https://ap
## Development
Looking to build your own React Native project with ES6/7? Check out my [React Native Starter Kit](https://github.com/jhabdas/react-native-webpack-starter-kit). Otherwise proceed enthusiastically.
Looking to build your own React Native project with ES6/7? Check out my [React Native Starter Kit](https://git.habd.as/jhabdas/react-native-webpack-starter-kit). Otherwise proceed enthusiastically.
1. Clone this project.
2. Install dependencies.

+ 69
- 16
WLPN.xcodeproj/project.pbxproj View File

@ -14,7 +14,6 @@
00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; };
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; };
00E356F31AD99517003FC87E /* WLPNTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* WLPNTests.m */; };
0BC1CA72532579F9E2CCB620 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 16163A4DE2078135E9435029 /* libPods.a */; };
133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; };
13B07FBD1A68108700A75B9A /* LaunchScreen~iphone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen~iphone.xib */; };
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
@ -33,6 +32,7 @@
DDF8C1BE1B012E4F0000C2B4 /* AudioManager.m in Sources */ = {isa = PBXBuildFile; fileRef = DDF8C1BC1B012E4F0000C2B4 /* AudioManager.m */; };
DDF941161B73DB65007A3B75 /* libReactNativeLocalization.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DDF941151B73DB3E007A3B75 /* libReactNativeLocalization.a */; };
DDF941231B73FFFE007A3B75 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = DDF941251B73FFFE007A3B75 /* Localizable.strings */; };
E04C1CDD4423258F0D3A2758 /* libPods-WLPN.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 503AE5484C4549A8ED39C32D /* libPods-WLPN.a */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@ -145,11 +145,11 @@
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = iOS/Info.plist; sourceTree = "<group>"; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = iOS/main.m; sourceTree = "<group>"; };
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
16163A4DE2078135E9435029 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
3BF3E2CDD07E93A19DFFB2CB /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
40F8BDECA5F81ADA12E89DFE /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
46C49F16310CC6366516695E /* Pods-WLPN.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WLPN.debug.xcconfig"; path = "Pods/Target Support Files/Pods-WLPN/Pods-WLPN.debug.xcconfig"; sourceTree = "<group>"; };
503AE5484C4549A8ED39C32D /* libPods-WLPN.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-WLPN.a"; sourceTree = BUILT_PRODUCTS_DIR; };
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
AD7145D6C61F2A4219212ECC /* Pods-WLPN.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WLPN.release.xcconfig"; path = "Pods/Target Support Files/Pods-WLPN/Pods-WLPN.release.xcconfig"; sourceTree = "<group>"; };
DD1EC6B81B41DFDE002B4339 /* LaunchScreen~ipad.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = "LaunchScreen~ipad.xib"; path = "iOS/Resources/LaunchScreen~ipad.xib"; sourceTree = "<group>"; };
DD3B4C341AFDC76C00BCD40D /* libPods-StreamingKit.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libPods-StreamingKit.a"; path = "Pods/../build/Debug-iphoneos/libPods-StreamingKit.a"; sourceTree = "<group>"; };
DD3C9D051B57680E00885527 /* RootViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = RootViewController.swift; path = iOS/Classes/RootViewController.swift; sourceTree = "<group>"; };
@ -198,7 +198,7 @@
00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */,
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
0BC1CA72532579F9E2CCB620 /* libPods.a in Frameworks */,
E04C1CDD4423258F0D3A2758 /* libPods-WLPN.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -288,11 +288,11 @@
name = Products;
sourceTree = "<group>";
};
6F0606FA8C62EE74A598B2DE /* Pods */ = {
26AB4B7FD849739EBD2976A0 /* Pods */ = {
isa = PBXGroup;
children = (
3BF3E2CDD07E93A19DFFB2CB /* Pods.debug.xcconfig */,
40F8BDECA5F81ADA12E89DFE /* Pods.release.xcconfig */,
46C49F16310CC6366516695E /* Pods-WLPN.debug.xcconfig */,
AD7145D6C61F2A4219212ECC /* Pods-WLPN.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
@ -310,7 +310,7 @@
children = (
DD96202E1BACAE1A0056F1E1 /* libStreamingKit.a */,
DD3B4C341AFDC76C00BCD40D /* libPods-StreamingKit.a */,
16163A4DE2078135E9435029 /* libPods.a */,
503AE5484C4549A8ED39C32D /* libPods-WLPN.a */,
);
name = Frameworks;
sourceTree = "<group>";
@ -349,8 +349,8 @@
832341AE1AAA6A7D00B99B32 /* Libraries */,
00E356EF1AD99517003FC87E /* WLPNTests */,
83CBBA001A601CBA00E9B192 /* Products */,
6F0606FA8C62EE74A598B2DE /* Pods */,
7BC1E3E98E014CD4DA009A1D /* Frameworks */,
26AB4B7FD849739EBD2976A0 /* Pods */,
);
indentWidth = 2;
sourceTree = "<group>";
@ -443,6 +443,7 @@
isa = PBXNativeTarget;
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "WLPN" */;
buildPhases = (
643EAFB3A9EC87CA36599DAE /* [CP] Check Pods Manifest.lock */,
13B07F871A680F5B00A75B9A /* Sources */,
13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */,
@ -463,7 +464,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0700;
LastUpgradeCheck = 1120;
ORGANIZATIONNAME = "Public Media Institute";
TargetAttributes = {
00E356ED1AD99517003FC87E = {
@ -482,7 +483,7 @@
};
buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "WLPN" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
@ -664,6 +665,27 @@
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
643EAFB3A9EC87CA36599DAE /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-WLPN-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;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
00E356EA1AD99517003FC87E /* Sources */ = {
isa = PBXSourcesBuildPhase;
@ -761,7 +783,7 @@
};
13B07F941A680F5B00A75B9A /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 3BF3E2CDD07E93A19DFFB2CB /* Pods.debug.xcconfig */;
baseConfigurationReference = 46C49F16310CC6366516695E /* Pods-WLPN.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
@ -774,6 +796,7 @@
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/node_modules/react-native/React/**",
"$(PODS_ROOT)/**",
);
INFOPLIST_FILE = "$(SRCROOT)/iOS/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
@ -787,13 +810,14 @@
SKIP_INSTALL = NO;
SWIFT_OBJC_BRIDGING_HEADER = "iOS/WLPN-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
13B07F951A680F5B00A75B9A /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 40F8BDECA5F81ADA12E89DFE /* Pods.release.xcconfig */;
baseConfigurationReference = AD7145D6C61F2A4219212ECC /* Pods-WLPN.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
@ -804,6 +828,7 @@
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/node_modules/react-native/React/**",
"$(PODS_ROOT)/**",
);
INFOPLIST_FILE = "$(SRCROOT)/iOS/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
@ -816,6 +841,7 @@
PROVISIONING_PROFILE = "";
SKIP_INSTALL = NO;
SWIFT_OBJC_BRIDGING_HEADER = "iOS/WLPN-Bridging-Header.h";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
@ -824,17 +850,28 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@ -843,6 +880,7 @@
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
@ -859,8 +897,9 @@
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/node_modules/react-native/React/**",
"$(PODS_ROOT)/Pods/Headers/Public/StreamingKit",
);
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "";
@ -872,17 +911,28 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@ -890,6 +940,7 @@
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
@ -900,11 +951,13 @@
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/node_modules/react-native/React/**",
"$(PODS_ROOT)/Pods/Headers/Public/StreamingKit",
);
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_LDFLAGS = "";
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
VALIDATE_PRODUCT = YES;
};
name = Release;

+ 10
- 14
WLPN.xcodeproj/xcshareddata/xcschemes/WLPN.xcscheme View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0700"
LastUpgradeVersion = "1120"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@ -41,6 +41,15 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "WLPN.app"
BlueprintName = "WLPN"
ReferencedContainer = "container:WLPN.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
@ -53,17 +62,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "WLPN.app"
BlueprintName = "WLPN"
ReferencedContainer = "container:WLPN.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
@ -85,8 +83,6 @@
ReferencedContainer = "container:WLPN.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"

+ 8
- 0
WLPN.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist View File

@ -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>

+ 4
- 2
iOS/Classes/AudioManager.m View File

@ -271,14 +271,16 @@ RCT_EXPORT_METHOD(getStatus: (RCTResponseSenderBlock) callback)
commandCenter.previousTrackCommand.enabled = NO;
}
- (void)didReceivePlayCommand:(MPRemoteCommand *)event
- (MPRemoteCommandHandlerStatus)didReceivePlayCommand:(MPRemoteCommand *)event
{
[self play];
return MPRemoteCommandHandlerStatusSuccess;
}
- (void)didReceivePauseCommand:(MPRemoteCommand *)event
- (MPRemoteCommandHandlerStatus)didReceivePauseCommand:(MPRemoteCommand *)event
{
[self pause];
return MPRemoteCommandHandlerStatusSuccess;
}
- (void)unregisterRemoteControlEvents

+ 6
- 6
iOS/Classes/RootViewController.swift View File

@ -5,23 +5,23 @@ import UIKit
class RootViewController: UIViewController {
// Allow background observation of remote control events
override func canBecomeFirstResponder() -> Bool {
override var canBecomeFirstResponder: Bool {
return true
}
override func viewDidAppear(animated: Bool) {
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
// Start listening for remote control events
self.becomeFirstResponder()
UIApplication.sharedApplication().beginReceivingRemoteControlEvents()
UIApplication.shared.beginReceivingRemoteControlEvents()
}
override func viewWillDisappear(animated: Bool) {
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
// Stop listening for remote control events
self.resignFirstResponder()
UIApplication.sharedApplication().endReceivingRemoteControlEvents()
UIApplication.shared.endReceivingRemoteControlEvents()
}
}
}

+ 9699
- 1993
npm-shrinkwrap.json
File diff suppressed because it is too large
View File


Loading…
Cancel
Save