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

Already on GitHub? Sign in to your account

Restricting pods to certain architectures #1790

Closed
Dan2552 opened this Issue Feb 5, 2014 · 7 comments

Comments

Projects
None yet
4 participants

Dan2552 commented Feb 5, 2014

It would be nice to be able to restrict pods from certain architectures.

I ask because the pod OpenTok pod (e.g. OpenTokSDK-WebRTC) will not work on the simulator because it's not compatible with the architecture.

Owner

alloy commented Feb 5, 2014

iirc, Xcode already allows you to limit build settings to archs, so this should be reasonably feasible. E.g. OTHER_LDFLAGS[arch=armv7,armv7s] = -l Pod-OpenTok.

@alloy alloy added the Enhancement label Feb 5, 2014

Dan2552 commented Mar 14, 2014

is there any way to do this already with the post_install block?

@joelparsons closed with reason "this issue is not reproducible"

Owner

alloy commented Mar 29, 2014

@joelparsons Are you sure? Because the OpenTokSDK README mentions: “You need to test OpenTok apps on an iOS device running iOS 5”. I.e. alluding to this pod not working on the simulator.

Contributor

joelparsons commented Mar 29, 2014

I made a sample project with the pod and included its classes and it built successfully. If it builds then even if it doesn't work the optional compilation setting is technically not necessary?

Dan2552 commented Mar 29, 2014

I should have got back earlier, last week I discovered I could compile the app using #if TARGET_IPHONE_SIMULATOR.

So I guess the problem is out of Cocoapods scope.

(I just stubbed out my VideoSession class, which is the only class that referenced the OpenTok library classes if anybody stumbles across this):

 #import "VideoSession.h"

 #if TARGET_IPHONE_SIMULATOR
 @implementation VideoSession
 @end
 #else

 #import "OpenTok.h"

 @interface VideoSession ()
 @property (strong, nonatomic) OTSession *session;
 @property (strong, nonatomic) OTPublisher *publisher;
 @property (strong, nonatomic) OTSubscriber *subscriber;
 @property (strong, nonatomic) UIView *publisherView;
 @property (strong, nonatomic) UIView *subscriberView;
 @end

 @implementation VideoSession
  // real implementation
 @end
 #endif
Owner

alloy commented Mar 29, 2014

@joelparsons Gotcha, sounds good indeed.

@Dan2552 Thanks for the update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment