Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ios fixes #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions RNSpotifyRemote.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ Pod::Spec.new do |s|
s.platform = :ios, "9.0"

s.source = { :git => package['repository']['url'], :tag => "v#{s.version}", :submodules => true }
s.source_files = "ios/*.{h,m}","ios/external/SpotifySDK/SpotifyiOS.framework/**/Headers/*.{h,m}"
s.preserve_path = "ios/external/SpotifySDK/SpotifyiOS.framework"
s.vendored_frameworks = "ios/external/SpotifySDK/SpotifyiOS.framework"
s.source_files = "ios/*.{h,m}"
s.preserve_path = "ios/external/SpotifySDK/SpotifyiOS.xcframework"

s.vendored_frameworks = "ios/external/SpotifySDK/SpotifyiOS.xcframework"

s.dependency 'React-Core'

Expand Down
2 changes: 1 addition & 1 deletion ios/RNSpotifyItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2018 Facebook. All rights reserved.
//

#import <SpotifyiOS.h>
@import SpotifyiOS;

#ifndef RNSpotifyItem_h
#define RNSpotifyItem_h
Expand Down
2 changes: 1 addition & 1 deletion ios/RNSpotifyRemoteAppRemote.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#import "RNSpotifyRemoteAppRemote.h"
#import <AVFoundation/AVFoundation.h>
#import <React/RCTConvert.h>
#import <SpotifyiOS.h>
@import SpotifyiOS;
#import "RNSpotifyRemoteConvert.h"
#import "RNSpotifyItem.h"
#import "RNSpotifyRemoteError.h"
Expand Down
16 changes: 2 additions & 14 deletions ios/RNSpotifyRemoteAuth.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#import "RNSpotifyRemoteAuth.h"
#import <AVFoundation/AVFoundation.h>
#import <React/RCTConvert.h>
#import <SpotifyiOS.h>
@import SpotifyiOS;
#import "RNSpotifyRemoteConvert.h"
#import "RNSpotifyItem.h"
#import "RNSpotifyRemoteError.h"
Expand Down Expand Up @@ -255,19 +255,7 @@ - (void)initializeSessionManager:(NSDictionary*)options completionCallback:(RNSp
if (@available(iOS 11, *)) {
RCTExecuteOnMainQueue(^{
// Use this on iOS 11 and above to take advantage of SFAuthenticationSession
[ self->_sessionManager
initiateSessionWithScope:scope
options:SPTDefaultAuthorizationOption
];
});
} else {
RCTExecuteOnMainQueue(^{
// Use this on iOS versions < 11 to use SFSafariViewController
[ self->_sessionManager
initiateSessionWithScope:scope
options:SPTDefaultAuthorizationOption
presentingViewController:[UIApplication sharedApplication].keyWindow.rootViewController
];
[ self->_sessionManager initiateSessionWithScope:scope options:SPTDefaultAuthorizationOption campaign:NULL];
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion ios/RNSpotifyRemoteConvert.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#import <Foundation/Foundation.h>
#import <SpotifyiOS.h>
@import SpotifyiOS;
#import "RNSpotifyRemoteError.h"

@interface RNSpotifyRemoteConvert : NSObject
Expand Down
2 changes: 1 addition & 1 deletion ios/RNSpotifyRemoteError.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import "RNSpotifyRemoteError.h"
#import <SpotifyiOS.h>
@import SpotifyiOS;


@interface RNSpotifyRemoteErrorCode()
Expand Down
2 changes: 1 addition & 1 deletion ios/external/SpotifySDK
Submodule SpotifySDK updated 216 files