cancel
Showing results for 
Search instead for 
Did you mean: 

Error while compiling latest IOS NFC source code

SVemp.1
Associate III

Hi,

I am trying to compile the IOS NFC tap source code and I am getting open ssl & J2Objc hearder not found errors.

We are trying to read and write with the ST25DV series of tags.

Details

 Xcode Version :   15.3
 min dev            :   15.0

Downloaded source code version : 7.4.0

Does the Source code support the latest versions of IOS?

Any extra steps needed for proper compilation?

Error:

Compilation errorCompilation error

 

Thanks,

Suresh

 

 

Suresh
1 ACCEPTED SOLUTION

Accepted Solutions
SVemp.1
Associate III

Hi Victor,

Sorry for late reply, Just wanted to make sure everything is working fine. We can close this thread as it working fine.

Changing to version 2.4 from 2.8 is resolved the compile issue.

Just wanted to iterate all the steps for people new to IOS.

1. Downloaded IOS NFC tap source code(STSW-ST25IOS001) (Version 7.4.0 )

2.Check compatible version of J2OJBC version(2.4 is compatible for 7.4.0)

2.Downloaded Source code from https://github.com/google/j2objc/releases 

SVemp1_5-1717572735216.png

 

 

 

3. Goto downloaded folder and Build using command $make dist . It took some time and created dist folder with lib,frameworks,include

4.Linking JRE also done. Make sure there no inverted colons in path i.e "ljre_emul liconv". Path should look like below.

SVemp1_6-1717572965320.png

 

 

5. Updated search paths with dist folder.

SVemp1_2-1717572537983.png

Example: Home path should be   => J2objFolder/dist/

 

6. Update Bundle path. Updating bundle path may remove all above settings. So recheck again.

7. Update header file in bridge.

Compile the code.

 

Thanks,

Suresh

View solution in original post

22 REPLIES 22
victor laraison
ST Employee

hello ,

Have you included J2OBJC headers and library into your environement ? 
Please , check the J2OBJC_HOME variable into Xcode, and update it if needed. 

In addiition, check your Header and User Include search path into build setting for your target.

Here attached, a short presentation on how to configure Xcode for iOS NFC Tap and using J2OBJC. Ref to slides #9 => #12

Hope it helps

Br,

 

Hi Victor,

Thanks for the reply.

We have tried the steps you mentioned, But errors still occuring.

1000025758.png

 We have followed steps in 9 to 12 pages.

We have a system with below details.

Apple M2 pro.

Mac os sonoma 14.4.1

Will the given ios source code will build with this configuration?

Please let us know if any extra steps required for build.?

 

Regards,

Suresh

 

Suresh
SVemp.1
Associate III

Hi Victor,

Thanks for the reply.

We have tried the steps you mentioned, But errors still occuring.

Screenshot 2024-05-20 at 9.18.03 AM.png

 

We have followed steps in 9 to 12 pages.

We have a system with below details.

Apple M2 pro.

Mac os sonoma 14.4.1

Will the given ios source code will build with this configuration?

Please let us know if any extra steps required for build.?

 

Regards,

Suresh

 

Suresh
victor laraison
ST Employee

hi Suresh,

I redo  from clean environment, and all is working fine. 

Please, could you check in "bn.h" file in which case BN_ULONG is defined ? THIRTY_TWO_BIT, SIXTY_FOUR_BIT_LONG or SIXTY_FOUR_BIT ? 

At my end, I'm using "THIRTY_TWO_BIT". 

I have the feeling that none of these are used in your end....

 

Let me know.

 

SVemp.1
Associate III

Hi Victor,

I am still facing issue after these changes.

Could you send your System configuration details? So that i will try build it in same environment.

 

Thanks,

Suresh

 

Suresh
victor laraison
ST Employee

just to be sure : you 're building on iOS Device (iphone) or with simulator ? 

victor laraison
ST Employee

as ios Corenfc is not supported in simulator mode, we never try with this configuration. We only support iOS Real Device (iphone) with the App. 
Please, could you switch to real device, then let me know status ? 

Thx and br,

Vincent 

SVemp.1
Associate III

Hi Victor,

We are building with IOS device (iPhone XR ) only.

 

Thanks,

Suresh

Suresh
victor laraison
ST Employee

I 'm able to reproduce issue only in simulator mode...anyway...

Please, could you tell me which include file "# include <openssl/opensslconf_...." is called in the file "opensslconf.h" ? 

#include <TargetConditionals.h>

#if TARGET_OS_IOS && TARGET_OS_SIMULATOR && TARGET_CPU_X86_64
# include <openssl/opensslconf_ios_x86_64.h>
#elif TARGET_OS_IOS && TARGET_OS_SIMULATOR && TARGET_CPU_X86
# include <openssl/opensslconf_ios_i386.h>
#elif TARGET_OS_IOS && TARGET_OS_EMBEDDED && TARGET_CPU_ARM64
# include <openssl/opensslconf_ios_arm64.h>
#elif TARGET_OS_IOS && TARGET_OS_EMBEDDED && TARGET_CPU_ARM && defined(__ARM_ARCH_7S__)
# include <openssl/opensslconf_ios_armv7s.h>
#elif TARGET_OS_IOS && TARGET_OS_EMBEDDED && TARGET_CPU_ARM && !defined(__ARM_ARCH_7S__)
# include <openssl/opensslconf_ios_armv7.h>
#elif TARGET_OS_TV && TARGET_OS_SIMULATOR && TARGET_CPU_X86_64
# include <openssl/opensslconf_tvos_x86_64.h>
#elif TARGET_OS_TV && TARGET_OS_EMBEDDED && TARGET_CPU_ARM64
# include <openssl/opensslconf_tvos_arm64.h>
#else
# error Unable to determine target or target not included in OpenSSL build
#endif