tidev / ti.nfc

Read Android NFC sensors with the Titanium SDK.
Other
26 stars 27 forks source link

Building App with ti.nfc on Ti 7.1.0 #22

Open yozef opened 6 years ago

yozef commented 6 years ago

Running on Ti 7.1.0.GA Mac OSX Installed Module locally in project (and tried globally) Test on Simulator iPhone X (OS 11.3)

Error on Building:

[INFO] :   Invoking xcodebuild
[ERROR] :  ** BUILD FAILED **
[ERROR] :  The following build commands failed:
[ERROR] :   Ld build/Products/Debug-iphonesimulator/NFCTest.app/NFCTest normal x86_64
[ERROR] :  (1 failure)

Incidentally, I tried also with Ti 7.0.2

part of my tiapp.xml:

<property name="run-on-main-thread" type="bool">true</property>
    <ios>
        <enable-launch-screen-storyboard>false</enable-launch-screen-storyboard>
        <use-app-thinning>true</use-app-thinning>
        <entitlements>
            <dict>
                <key>com.apple.developer.nfc.readersession.formats</key>
                <array>
                    <string>NDEF</string>
                </array>
            </dict>
        </entitlements>
        <plist>
            <dict>
                <key>NFCReaderUsageDescription</key>
                <string>n.b. some privacy info goes here</string>
hansemannn commented 6 years ago

Can you attach a trace log, uncovering the underlaying error?

yozef commented 6 years ago

sure. I've attached it here: https://www.dropbox.com/s/wofgb3rhmgb470h/NFCapp_traceLog.txt?dl=0

Looking at the trace log, could this be the culprit?

[TRACE] :  Undefined symbols for architecture x86_64:
[TRACE] :    "_OBJC_CLASS_$_NFCNDEFReaderSession", referenced from:
[TRACE] :        objc-class-ref in libti.nfc.a(TiNfcNfcAdapterProxy.o)
[TRACE] :  ld: symbol(s) not found for architecture x86_64
[TRACE] :  clang: error: linker command failed with exit code 1 (use -v to see invocation)

Also, the code is supper simple (basically the example code)

hansemannn commented 6 years ago

Sure you are building with Xcode 9? The module is used in production for many devs.

yozef commented 6 years ago

yeah I'm sure it looks like a neat module.

Using XCode 9.3.1

hansemannn commented 6 years ago

Hehe, yeah. I rather meant that it has to be something with your env then. Do you still have Xcode 8 installed aside Xcode 9? it may select the wrong one accidentally.

yozef commented 6 years ago

I hate bothering you with this.

I tried again on another computer with XCode 9.2 & Ti SDK 7.1.0.GA and got the same error when building.

n.b. I installed the module globally & locally within the modules folder of the project. Also I only have one XCode version running on each machine.

mpinch commented 6 years ago

I have same issue with same error message; running example app. I'm on xCode 9.4 & have tried Ti SDK 6.3.0GA up to 7.3.1GA release

[TRACE] :  Undefined symbols for architecture x86_64:
[TRACE] :    "_OBJC_CLASS_$_NFCNDEFReaderSession", referenced from:
[TRACE] :        objc-class-ref in libti.nfc.a(TiNfcNfcAdapterProxy.o)
[TRACE] :  ld: symbol(s) not found for architecture x86_64
[TRACE] :  clang: error: linker command failed with exit code 1 (use -v to see invocation)

Also to add, I've tried the titanium library and local project installation of the module with the same results. Just simply including the module with a hello world app (no code references to the ti.nfc module) it still fails as above.