Community
Topic: Xamarin component
Run Xamarin.iOS app in the simulator (SOLVED)
The SDK does not support the iOS simulator.
SDK supports armv7 and arm64 architectures. It doesn't support x86_64 platform (iOS Simulators)
I want to exclude the SDK only when building for the simulator. Is it possible to add some weak linking to the SDK or something like that?
Thanks
Hello,
you could try this steps in order to remove pikkart SDK on x86_64 target:
- add #if !(TARGET_OS_SIMULATOR) ... #endif in file header where you include Pikkart SDK header files
- Instead of use "Link with Libraries" section in general tab of your xcode project, try to use OTHER_LDFLAGS in xcode project "Build Settings" and add a variant depending on your configuration (for example, on debug configuration):
//:configuration = Debug
OTHER_LDFLAGS = -framework pikkartAR
OTHER_LDFLAGS[sdk=iphonesimulator*] =
Regards
Hey,
Thanks a lot for your help. I'm using Visual Studio and Xamarin.iOS, not Xcode. I have the following questions:
- I don't have header files. Can I use this directives on the .cs that is using the pikkart sdk?
- How can I configure this on Visual Studio? I cannot find those options.
Thanks once again.
Best regards.
Hi,
you should try to use the compiler define symbols in your iOS project options.
In your Debug|iPhoneSimulator Compiler Configuration, you could add some custom define symbols (for example __IOS_SIMULATOR__).
Then, in your code, you could try to use conditional compilation as the following example:
#if __IOSSIMULATOR__
using Pikkart.ArSdk.Recognition;
#endif
Obviously, you should check our code in order to not use Pikkart SDK Recognition classes when you compile for simulator target
For reference, try to follow this link from xamarin forum:
https://forums.xamarin.com/discussion/20297/if-ios-seems-not-working
Kind Regards