0

I have two questions basically.

Scenario is that I have a(n) NMI Payment Gateway SDK

  1. the SDK or library won't work under simulator environment. Though it is logically right since the sdk is for reading mag data I can't test other parts of my app on a simulator ( And I have limited resource on device ). Is there a way to recompile the sdk or based on my research how can I create a static library so that I can generate a i386 architecture based sdk. Or better yet is there a way that I can check if environment is i386 then don't load the sdk?

  2. I tried creating a(n) app using the SDK mentioned above. I would like to run it using an iPhone5s device and arch (armv64, armv7 and armv7s) but it says 'undefined symbols for armv7'. Would there be a way to somehow recompile the sdk and enable it to run on newer architecture?

Any help is much appreciated. THANKS

n0minal
  • 3,195
  • 9
  • 46
  • 71
  • 1
    So you are using the SDK currently as a compiled static library? If you have the sources (which you imply you do) then add the source as a separate static library project (using an Xcode Workspace) and Xcode will compile the SDK for whatever arch is required by the project. – trojanfoe Feb 27 '14 at 12:40
  • @trojanfoe I've googled that, but what puzzles me is can you just create a static library project add the SDK files ( header files and .a file) then compile? – n0minal Feb 27 '14 at 14:10
  • No, you must have the source. – trojanfoe Feb 27 '14 at 14:33
  • @trojanfoe that would be the header files and the compiled library file .a right? or not? because that is the only file(s) I have for that library. – n0minal Feb 28 '14 at 02:05

1 Answers1

0

We use different targets for simulator and for device, and in code use macro TARGET_IPHONE_SIMULATOR.

example:

#if (TARGET_IPHONE_SIMULATOR)
NSLog(@"device");
#else 
NSLog(@"simulator");
#endif
sage444
  • 5,661
  • 4
  • 33
  • 60