Skip to content

Commit

Permalink
Apple: Fixed cocoapods integration for PowerAuth2 lib
Browse files Browse the repository at this point in the history
  • Loading branch information
hvge committed May 25, 2021
1 parent bfc7992 commit 5d4db90
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 9 deletions.
4 changes: 1 addition & 3 deletions PowerAuth2.podspec
Expand Up @@ -35,10 +35,8 @@ Pod::Spec.new do |s|
s.source_files = 'Build/PowerAuth2/**/*.{h,m}'
s.private_header_files = 'Build/PowerAuth2/Private/*.h'
s.tvos.exclude_files = [
'Build/PowerAuth2/PowerAuthWC*.{h,m}',
'Build/PowerAuth2/Private/PA2WC*.{h,m}',
'Build/PowerAuth2/PowerAuthSDK+WatchSupport.m',
'Build/PowerAuth2/PowerAuthToken+WatchSupport.{h,m}'
'Build/PowerAuth2/Private/PowerAuthWC*.{h,m}'
]
s.requires_arc = true

Expand Down
6 changes: 6 additions & 0 deletions proj-xcode/PowerAuth2.xcodeproj/project.pbxproj
Expand Up @@ -320,6 +320,9 @@
BFEC963E21B6990400FB5165 /* PowerAuthCustomHeaderRequestInterceptor.h in Headers */ = {isa = PBXBuildFile; fileRef = BFEC963C21B6990400FB5165 /* PowerAuthCustomHeaderRequestInterceptor.h */; settings = {ATTRIBUTES = (Public, ); }; };
BFF6716B243376B0009279CA /* PowerAuthActivation.h in Headers */ = {isa = PBXBuildFile; fileRef = BFF67169243376B0009279CA /* PowerAuthActivation.h */; settings = {ATTRIBUTES = (Public, ); }; };
BFF6716C243376B0009279CA /* PowerAuthActivation.m in Sources */ = {isa = PBXBuildFile; fileRef = BFF6716A243376B0009279CA /* PowerAuthActivation.m */; };
BFF711DE265D4FC800DB696A /* PowerAuthWCSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = BFA0E2A1200D12420011F0A6 /* PowerAuthWCSessionManager.m */; };
BFF711E5265D500300DB696A /* PowerAuthSDK+WatchSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = BF462B7B201112E200529EFC /* PowerAuthSDK+WatchSupport.m */; };
BFF711E6265D505E00DB696A /* PowerAuthToken+WatchSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = BF462B752011013800529EFC /* PowerAuthToken+WatchSupport.m */; };
BFFB0B9D2167A541004A06E2 /* PA2CreateActivationRequestData.h in Headers */ = {isa = PBXBuildFile; fileRef = BFFB0B9B2167A541004A06E2 /* PA2CreateActivationRequestData.h */; };
BFFB0B9E2167A541004A06E2 /* PA2CreateActivationRequestData.m in Sources */ = {isa = PBXBuildFile; fileRef = BFFB0B9C2167A541004A06E2 /* PA2CreateActivationRequestData.m */; };
BFFB0BA12167A9B4004A06E2 /* PA2CreateActivationResponseData.h in Headers */ = {isa = PBXBuildFile; fileRef = BFFB0B9F2167A9B4004A06E2 /* PA2CreateActivationResponseData.h */; };
Expand Down Expand Up @@ -1548,6 +1551,7 @@
BF5EB4B624C85FE200F9DDB2 /* PA2Request.m in Sources */,
BF5EB4B724C85FE200F9DDB2 /* PA2VaultUnlockResponse.m in Sources */,
BF5EB4B824C85FE200F9DDB2 /* PA2PrivateTokenData.m in Sources */,
BFF711E6265D505E00DB696A /* PowerAuthToken+WatchSupport.m in Sources */,
BF5EB4BA24C85FE200F9DDB2 /* PA2CreateActivationRequest.m in Sources */,
BF5EB4BC24C85FE200F9DDB2 /* PA2ValidateSignatureRequest.m in Sources */,
BF08251C2630514D00B34E24 /* PowerAuthErrorConstants.m in Sources */,
Expand All @@ -1574,9 +1578,11 @@
BF5EB4D424C85FE200F9DDB2 /* PA2HttpClient.m in Sources */,
BF5EB4D524C85FE200F9DDB2 /* PA2VaultUnlockRequest.m in Sources */,
BF5EB4D624C85FE200F9DDB2 /* PowerAuthLog.m in Sources */,
BFF711DE265D4FC800DB696A /* PowerAuthWCSessionManager.m in Sources */,
BF5EB4D924C85FE200F9DDB2 /* PowerAuthActivation.m in Sources */,
BF5EB4DA24C85FE200F9DDB2 /* PA2CreateActivationRecoveryData.m in Sources */,
BF5EB4DB24C85FE200F9DDB2 /* PowerAuthAuthorizationHttpHeader.m in Sources */,
BFF711E5265D500300DB696A /* PowerAuthSDK+WatchSupport.m in Sources */,
BF5EB4DC24C85FE200F9DDB2 /* PowerAuthAuthentication.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
8 changes: 8 additions & 0 deletions proj-xcode/PowerAuth2/PowerAuthToken+WatchSupport.m
Expand Up @@ -18,6 +18,10 @@
#import <PowerAuth2/PowerAuthConfiguration.h>
#import <PowerAuth2/PowerAuthLog.h>

// -----------------------------------------------------------------------
#if defined(PA2_WATCH_SUPPORT)
// -----------------------------------------------------------------------

#import "PA2PrivateTokenInterfaces.h"
#import "PowerAuthWCSessionManager+Private.h"
#import "PA2WCSessionPacket_TokenData.h"
Expand Down Expand Up @@ -130,3 +134,7 @@ - (void) removeFromWatchWithCompletion:(void(^ _Nonnull)(NSError * _Nullable err
}

@end

// -----------------------------------------------------------------------
#endif // defined(PA2_WATCH_SUPPORT)
// -----------------------------------------------------------------------
8 changes: 8 additions & 0 deletions proj-xcode/PowerAuth2/PowerAuthWCSessionManager.m
Expand Up @@ -17,6 +17,11 @@
// PA2_SHARED_SOURCE PowerAuth2ForWatch .

#import <PowerAuth2/PowerAuthWCSessionManager.h>

// -----------------------------------------------------------------------
#if defined(PA2_WATCH_SUPPORT)
// -----------------------------------------------------------------------

#import <PowerAuth2/PowerAuthErrorConstants.h>
#import <PowerAuth2/PowerAuthLog.h>

Expand Down Expand Up @@ -500,3 +505,6 @@ - (void) sendImpl:(PA2WCSessionPacket*)request

#pragma clang diagnostic pop // pop "-Wunguarded-availability"

// -----------------------------------------------------------------------
#endif // defined(PA2_WATCH_SUPPORT)
// -----------------------------------------------------------------------
3 changes: 1 addition & 2 deletions proj-xcode/PowerAuth2/private/PowerAuthSDK+Private.h
Expand Up @@ -21,8 +21,6 @@
#import "PowerAuthActivationStatus+Private.h"
#import "PowerAuthActivationCode+Private.h"

#import "PA2WCSessionDataHandler.h"

@import PowerAuthCore;

// Exposing several private interfaces
Expand Down Expand Up @@ -56,6 +54,7 @@
// -----------------------------------------------------------------------
#if defined(PA2_WATCH_SUPPORT)
// -----------------------------------------------------------------------
#import "PA2WCSessionDataHandler.h"
// Declaration required by watchSDK integration (see PowerAuthSDK+WatchSupport.m)
@interface PowerAuthSDK (WatchSupportPrivate) <PA2WCSessionDataHandler>
@end
Expand Down
8 changes: 8 additions & 0 deletions proj-xcode/PowerAuth2ForWatch/PowerAuthWCSessionManager.m
Expand Up @@ -17,6 +17,11 @@
// PA2_SHARED_SOURCE PowerAuth2ForWatch .

#import <PowerAuth2ForWatch/PowerAuthWCSessionManager.h>

// -----------------------------------------------------------------------
#if defined(PA2_WATCH_SUPPORT)
// -----------------------------------------------------------------------

#import <PowerAuth2ForWatch/PowerAuthErrorConstants.h>
#import <PowerAuth2ForWatch/PowerAuthLog.h>

Expand Down Expand Up @@ -500,3 +505,6 @@ - (void) sendImpl:(PA2WCSessionPacket*)request

#pragma clang diagnostic pop // pop "-Wunguarded-availability"

// -----------------------------------------------------------------------
#endif // defined(PA2_WATCH_SUPPORT)
// -----------------------------------------------------------------------
17 changes: 16 additions & 1 deletion scripts/deploy-build.sh
Expand Up @@ -215,7 +215,22 @@ function DEPLOY_IOS
####
LOG "----- Publishing ${PODSPEC_COR} to CocoaPods..."
pod trunk push ${PODSPEC_COR}
LOG "----- Publishing ${PODSPEC} to CocoaPods..."

# There's now way to test whether core has been really published.
#
# We can use --synchronized option, but it will clone the gigantic
# git repository with all specs, so update will take the same time
# as a plain wait.

LOG_LINE
LOG "Waiting for several minutes to propagate ${PODSPEC_COR} to trunk..."
for c in {20..1}; do
LOG " - $c minute(s) to go..."
sleep 60
done
LOG_LINE

LOG "----- Publishing ${PODSPEC} to CocoaPods..."
pod trunk push ${PODSPEC}
LOG "----- Publishing ${PODSPEC_WOS} to CocoaPods..."
pod trunk push ${PODSPEC_WOS}
Expand Down
4 changes: 1 addition & 3 deletions scripts/templates/PowerAuth2.podspec
Expand Up @@ -35,10 +35,8 @@ Pod::Spec.new do |s|
s.source_files = 'Build/PowerAuth2/**/*.{h,m}'
s.private_header_files = 'Build/PowerAuth2/Private/*.h'
s.tvos.exclude_files = [
'Build/PowerAuth2/PowerAuthWC*.{h,m}',
'Build/PowerAuth2/Private/PA2WC*.{h,m}',
'Build/PowerAuth2/PowerAuthSDK+WatchSupport.m',
'Build/PowerAuth2/PowerAuthToken+WatchSupport.{h,m}'
'Build/PowerAuth2/Private/PowerAuthWC*.{h,m}'
]
s.requires_arc = true

Expand Down

0 comments on commit 5d4db90

Please sign in to comment.